Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨调整dockerfile的基础镜像与补充相关组件依赖 #1097

Merged
merged 7 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,18 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

# 3. 设置 docker 环境
# 3. 下载二进制文件
- name: Download Binary Files
run: bash ./scripts/base/install_bin.sh

# 4. 设置 docker 环境
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# 4. 构建并推送镜像
# 5. 构建并推送镜像
- name: Build and push with latest tag and release tag
id: docker_build
uses: docker/build-push-action@v2
Expand All @@ -80,6 +84,6 @@ jobs:
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ matrix.image }}:beta
if: ${{ github.event_name == 'workflow_dispatch' }}

# 5. 打印docker镜像SHA256值
# 6. 打印docker镜像SHA256值
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
run: echo ${{ steps.docker_build.outputs.digest }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM python:3.7-slim-bullseye
ENV REDIS_PASSWD=tca2022
ENV MYSQL_PASSWORD=TCA!@#2021

ARG EXTRA_TOOLS="gnupg curl wget jq net-tools procps python3-dev default-libmysqlclient-dev locales inotify-tools gcc subversion git telnet iputils-ping vim openssh-client redis nginx unzip libsasl2-dev libldap2-dev libssl-dev"
ARG EXTRA_TOOLS="gnupg curl wget jq net-tools procps python3-dev default-libmysqlclient-dev locales inotify-tools gcc subversion git telnet iputils-ping vim openssh-client redis nginx unzip libsasl2-dev libldap2-dev libssl-dev"

# RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
# && echo 'deb http://mirrors.tencent.com/debian/ bullseye main non-free contrib' > /etc/apt/sources.list \
Expand Down
2 changes: 1 addition & 1 deletion client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7.12-slim
FROM python:3.7-slim-bullseye

ARG EXTRA_TOOLS="curl wget python3-dev git git-lfs vim-tiny gcc locales subversion telnet procps openssh-client libreadline-dev"

Expand Down
4 changes: 2 additions & 2 deletions scripts/base/install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ function pre_install_for_python() {
LOG_INFO "[PythonInstall] Pre install tools"
case "$LINUX_OS" in
centos|rhel|sles|tlinux|tencentos)
tools="wget zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel xz-devel"
tools="wget zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel xz-devel openldap-devel"
LOG_INFO " Start run: yum install tools: $tools"
yum -q -y install $tools || error_exit "[PythonInstall] pre install tools failed"
;;
ubuntu|debian|raspbian)
tools="wget build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev tk-dev gcc make"
tools="wget build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev tk-dev gcc make libsasl2-dev libldap2-dev libssl-dev"
LOG_INFO " Start run: apt-get update and apt-get install $tools"
apt-get update -qq >/dev/null || error_exit "[PythonInstall] pre install tools failed"
DEBIAN_FRONTEND=noninteractive apt-get -y install -qq $tools >/dev/null || error_exit "[PythonInstall] pre install tools failed"
Expand Down
Loading