Skip to content

Commit

Permalink
Merge branch 'master' into nick-redis_cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
nick2wang authored Feb 21, 2022
2 parents 002db81 + 62fedad commit a8c9b77
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 10 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/docker-base-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Docker Base image

on:
push:
branches:
- 'master'
paths:
- 'src/docker/Dockerfile-base'
pull_request:
branches:
- 'master'
paths:
- 'src/docker/Dockerfile-base'

jobs:
push_to_registries:
name: Build and push Docker Base images
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
tags: |
type=sha
images: |
hhyo/archery-base
- name: Build and push Docker Base images
uses: docker/build-push-action@v2
with:
context: .
file: src/docker/Dockerfile-base
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
5 changes: 1 addition & 4 deletions src/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM hhyo/archery-base:1.3
FROM hhyo/archery-base:sha-3c64fc8

WORKDIR /opt/archery

Expand All @@ -14,9 +14,6 @@ RUN cd /opt \
&& mv /opt/sqladvisor /opt/archery/src/plugins/ \
&& mv /opt/soar /opt/archery/src/plugins/ \
&& mv /opt/tmp_binlog2sql /opt/archery/src/plugins/binlog2sql \
#my2sql
&& wget https://raw.githubusercontent.com/liuhr/my2sql/master/releases/centOS_release_7.x/my2sql -O my2sql \
&& chmod a+x my2sql \
&& mv /opt/my2sql /opt/archery/src/plugins/

#port
Expand Down
14 changes: 8 additions & 6 deletions src/docker/Dockerfile-base
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
FROM docker.io/centos:7

ENV PYTHON_VERSION 3.8.6
ENV PYTHON_VERSION 3.9.10
ENV DOCKERIZE_VERSION v0.6.1
ENV SOAR_VERSION 0.11.0

ENV TZ=Asia/Shanghai
ENV LANG en_US.UTF-8

WORKDIR /opt

#locale
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
&& yum -y install kde-l10n-Chinese \
&& yum -y install glibc-common \
&& localedef -c -f UTF-8 -i zh_CN zh_CN.utf8

ENV LC_ALL zh_CN.utf8
ENV LANG zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8


#python
RUN yum -y install libffi-devel wget gcc make zlib-devel openssl openssl-devel ncurses-devel openldap-devel gettext bzip2-devel \
RUN yum -y install libffi-devel wget gcc make zlib-devel openssl openssl-devel ncurses-devel openldap-devel gettext bzip2-devel xz-devel \
&& cd /opt \
&& wget "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" \
&& tar -xvJf Python-$PYTHON_VERSION.tar.xz \
Expand Down Expand Up @@ -70,9 +72,9 @@ RUN cd /opt \
&& curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo \
&& ACCEPT_EULA=Y yum -y install msodbcsql17 \
&& yum -y install unixODBC-devel \
#oracle instantclient
#oracle
&& yum -y install http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.3-basiclite-19.3.0.0.0-1.x86_64.rpm \
#mongo instantclient
#mongo
&& wget -c https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-3.6.20.tgz \
&& tar -xvf mongodb-linux-x86_64-rhel70-3.6.20.tgz \
&& cp mongodb-linux-x86_64-rhel70-3.6.20/bin/mongo /usr/local/bin/mongo \
Expand Down

0 comments on commit a8c9b77

Please sign in to comment.