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

ci: stop building alpine docker image #9917

Merged
merged 2 commits into from
Feb 9, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .ci/docker-compose-file/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ LDAP_TAG=2.4.50
INFLUXDB_TAG=2.5.0

TARGET=emqx/emqx
EMQX_TAG=build-alpine-amd64
17 changes: 4 additions & 13 deletions .github/workflows/build_and_push_docker_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,10 @@ jobs:
matrix:
profile:
- "${{ needs.prepare.outputs.PROFILE }}"
flavor:
- ''
- '-elixir'
registry:
- 'docker.io'
- 'public.ecr.aws'
os:
- [alpine3.15.1, "alpine:3.15.1", "deploy/docker/Dockerfile.alpine"]
- [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
# NOTE: 'otp' and 'elixir' are to configure emqx-builder image
# only support latest otp and elixir, not a matrix
Expand All @@ -133,12 +129,11 @@ jobs:
otp:
- 24.3.4.2-1 # switch to 25 once ready to release 5.1
elixir:
- 1.13.4 # update to latest
- 'no_elixir'
- '1.13.4' # update to latest
exclude: # TODO: publish enterprise to ecr too?
- registry: 'public.ecr.aws'
profile: emqx-enterprise
- flavor: '-elixir'
os: [alpine3.15.1, "alpine:3.15.1", "deploy/docker/Dockerfile.alpine"]

steps:
- uses: actions/download-artifact@v3
Expand Down Expand Up @@ -173,14 +168,10 @@ jobs:
run: |
extra_labels=
img_suffix=
flavor="${{ matrix.flavor }}"
if [ "${{ matrix.flavor }}" = '-elixir' ]; then
if [ "${{ matrix.elixir }}" != 'no_elixir' ]; then
img_suffix="-elixir"
extra_labels="org.opencontainers.image.elixir.version=${{ matrix.elixir }}"
fi
if [[ "${{ matrix.os[0] }}" =~ "alpine" ]]; then
img_suffix="${img_suffix}-alpine"
fi

echo "img_suffix=$img_suffix" >> $GITHUB_OUTPUT
echo "extra_labels=$extra_labels" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -209,6 +200,6 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
EMQX_NAME=${{ matrix.profile }}${{ matrix.flavor }}
EMQX_NAME=${{ matrix.profile }}${{ steps.pre-meta.outputs.img_suffix }}
file: source/${{ matrix.os[2] }}
context: source
4 changes: 2 additions & 2 deletions .github/workflows/run_fvt_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
prepare:
runs-on: ubuntu-20.04
# prepare source with any OTP version, no need for a matrix
container: ghcr.io/emqx/emqx-builder/5.0-27:1.13.4-24.3.4.2-1-alpine3.15.1
container: ghcr.io/emqx/emqx-builder/5.0-27:1.13.4-24.3.4.2-1-debian11

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
- mnesia
- rlog
os:
- ["alpine3.15.1", "alpine:3.15.1"]
- ["debian11", "debian:11-slim"]
builder:
- 5.0-27
otp:
Expand Down
8 changes: 1 addition & 7 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,7 @@ make_tgz() {
make_docker() {
EMQX_BUILDER="${EMQX_BUILDER:-${EMQX_DEFAULT_BUILDER}}"
EMQX_RUNNER="${EMQX_RUNNER:-${EMQX_DEFAULT_RUNNER}}"
if [ -z "${EMQX_DOCKERFILE:-}" ]; then
if [[ "$EMQX_BUILDER" =~ "alpine" ]]; then
EMQX_DOCKERFILE='deploy/docker/Dockerfile.alpine'
else
EMQX_DOCKERFILE='deploy/docker/Dockerfile'
fi
fi
EMQX_DOCKERFILE="${EMQX_DOCKERFILE:-deploy/docker/Dockerfile}"
if [[ "$PROFILE" = *-elixir ]]; then
PKG_VSN="$PKG_VSN-elixir"
fi
Expand Down
1 change: 1 addition & 0 deletions changes/v5.0.17/feat-9917.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Stop building -alpine docker image because it's size is larger than the regular one based on debian slim
1 change: 1 addition & 0 deletions changes/v5.0.17/feat-9917.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
停止构建-alpine docker镜像,因为它的大小比基于debian slim的普通镜像要大。
id marked this conversation as resolved.
Show resolved Hide resolved
76 changes: 0 additions & 76 deletions deploy/docker/Dockerfile.alpine

This file was deleted.