ci: stop building alpine docker image
This commit is contained in:
parent
373947a4b9
commit
202f6d0181
|
@ -6,4 +6,3 @@ LDAP_TAG=2.4.50
|
||||||
INFLUXDB_TAG=2.5.0
|
INFLUXDB_TAG=2.5.0
|
||||||
|
|
||||||
TARGET=emqx/emqx
|
TARGET=emqx/emqx
|
||||||
EMQX_TAG=build-alpine-amd64
|
|
||||||
|
|
|
@ -117,14 +117,10 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
profile:
|
profile:
|
||||||
- "${{ needs.prepare.outputs.PROFILE }}"
|
- "${{ needs.prepare.outputs.PROFILE }}"
|
||||||
flavor:
|
|
||||||
- ''
|
|
||||||
- '-elixir'
|
|
||||||
registry:
|
registry:
|
||||||
- 'docker.io'
|
- 'docker.io'
|
||||||
- 'public.ecr.aws'
|
- 'public.ecr.aws'
|
||||||
os:
|
os:
|
||||||
- [alpine3.15.1, "alpine:3.15.1", "deploy/docker/Dockerfile.alpine"]
|
|
||||||
- [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
|
- [debian11, "debian:11-slim", "deploy/docker/Dockerfile"]
|
||||||
# NOTE: 'otp' and 'elixir' are to configure emqx-builder image
|
# NOTE: 'otp' and 'elixir' are to configure emqx-builder image
|
||||||
# only support latest otp and elixir, not a matrix
|
# only support latest otp and elixir, not a matrix
|
||||||
|
@ -133,12 +129,11 @@ jobs:
|
||||||
otp:
|
otp:
|
||||||
- 24.3.4.2-1 # switch to 25 once ready to release 5.1
|
- 24.3.4.2-1 # switch to 25 once ready to release 5.1
|
||||||
elixir:
|
elixir:
|
||||||
- 1.13.4 # update to latest
|
- 'no_elixir'
|
||||||
|
- '1.13.4' # update to latest
|
||||||
exclude: # TODO: publish enterprise to ecr too?
|
exclude: # TODO: publish enterprise to ecr too?
|
||||||
- registry: 'public.ecr.aws'
|
- registry: 'public.ecr.aws'
|
||||||
profile: emqx-enterprise
|
profile: emqx-enterprise
|
||||||
- flavor: '-elixir'
|
|
||||||
os: [alpine3.15.1, "alpine:3.15.1", "deploy/docker/Dockerfile.alpine"]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
|
@ -173,14 +168,10 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
extra_labels=
|
extra_labels=
|
||||||
img_suffix=
|
img_suffix=
|
||||||
flavor="${{ matrix.flavor }}"
|
if [ "${{ matrix.elixir }}" != 'no_elixir' ]; then
|
||||||
if [ "${{ matrix.flavor }}" = '-elixir' ]; then
|
|
||||||
img_suffix="-elixir"
|
img_suffix="-elixir"
|
||||||
extra_labels="org.opencontainers.image.elixir.version=${{ matrix.elixir }}"
|
extra_labels="org.opencontainers.image.elixir.version=${{ matrix.elixir }}"
|
||||||
fi
|
fi
|
||||||
if [[ "${{ matrix.os[0] }}" =~ "alpine" ]]; then
|
|
||||||
img_suffix="${img_suffix}-alpine"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "img_suffix=$img_suffix" >> $GITHUB_OUTPUT
|
echo "img_suffix=$img_suffix" >> $GITHUB_OUTPUT
|
||||||
echo "extra_labels=$extra_labels" >> $GITHUB_OUTPUT
|
echo "extra_labels=$extra_labels" >> $GITHUB_OUTPUT
|
||||||
|
@ -209,6 +200,6 @@ jobs:
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
EMQX_NAME=${{ matrix.profile }}${{ matrix.flavor }}
|
EMQX_NAME=${{ matrix.profile }}${{ steps.pre-meta.outputs.img_suffix }}
|
||||||
file: source/${{ matrix.os[2] }}
|
file: source/${{ matrix.os[2] }}
|
||||||
context: source
|
context: source
|
||||||
|
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
prepare:
|
prepare:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
# prepare source with any OTP version, no need for a matrix
|
# 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:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -47,7 +47,7 @@ jobs:
|
||||||
- mnesia
|
- mnesia
|
||||||
- rlog
|
- rlog
|
||||||
os:
|
os:
|
||||||
- ["alpine3.15.1", "alpine:3.15.1"]
|
- ["debian11", "debian:11-slim"]
|
||||||
builder:
|
builder:
|
||||||
- 5.0-27
|
- 5.0-27
|
||||||
otp:
|
otp:
|
||||||
|
|
8
build
8
build
|
@ -322,13 +322,7 @@ make_tgz() {
|
||||||
make_docker() {
|
make_docker() {
|
||||||
EMQX_BUILDER="${EMQX_BUILDER:-${EMQX_DEFAULT_BUILDER}}"
|
EMQX_BUILDER="${EMQX_BUILDER:-${EMQX_DEFAULT_BUILDER}}"
|
||||||
EMQX_RUNNER="${EMQX_RUNNER:-${EMQX_DEFAULT_RUNNER}}"
|
EMQX_RUNNER="${EMQX_RUNNER:-${EMQX_DEFAULT_RUNNER}}"
|
||||||
if [ -z "${EMQX_DOCKERFILE:-}" ]; then
|
EMQX_DOCKERFILE="${EMQX_DOCKERFILE:-deploy/docker/Dockerfile}"
|
||||||
if [[ "$EMQX_BUILDER" =~ "alpine" ]]; then
|
|
||||||
EMQX_DOCKERFILE='deploy/docker/Dockerfile.alpine'
|
|
||||||
else
|
|
||||||
EMQX_DOCKERFILE='deploy/docker/Dockerfile'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [[ "$PROFILE" = *-elixir ]]; then
|
if [[ "$PROFILE" = *-elixir ]]; then
|
||||||
PKG_VSN="$PKG_VSN-elixir"
|
PKG_VSN="$PKG_VSN-elixir"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-26:1.13.4-24.3.4.2-1-alpine3.15.1
|
|
||||||
ARG RUN_FROM=alpine:3.15.1
|
|
||||||
FROM ${BUILD_FROM} AS builder
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
|
||||||
autoconf \
|
|
||||||
automake \
|
|
||||||
bash \
|
|
||||||
bison \
|
|
||||||
bsd-compat-headers \
|
|
||||||
coreutils \
|
|
||||||
curl \
|
|
||||||
flex \
|
|
||||||
g++ \
|
|
||||||
gcc \
|
|
||||||
git \
|
|
||||||
jq \
|
|
||||||
libc-dev \
|
|
||||||
libstdc++ \
|
|
||||||
libtool \
|
|
||||||
make \
|
|
||||||
ncurses-dev \
|
|
||||||
openssl-dev \
|
|
||||||
perl
|
|
||||||
|
|
||||||
COPY . /emqx
|
|
||||||
|
|
||||||
ARG EMQX_NAME=emqx
|
|
||||||
ENV EMQX_RELUP=false
|
|
||||||
|
|
||||||
RUN export PROFILE=${EMQX_NAME%%-elixir} \
|
|
||||||
&& export EMQX_NAME1=$EMQX_NAME \
|
|
||||||
&& export EMQX_NAME=$PROFILE \
|
|
||||||
&& export EMQX_LIB_PATH="_build/$EMQX_NAME/lib" \
|
|
||||||
&& export EMQX_REL_PATH="/emqx/_build/$EMQX_NAME/rel/emqx" \
|
|
||||||
&& export EMQX_REL_FORM='docker' \
|
|
||||||
&& cd /emqx \
|
|
||||||
&& rm -rf $EMQX_LIB_PATH \
|
|
||||||
&& make $EMQX_NAME1 \
|
|
||||||
&& mkdir -p /emqx-rel \
|
|
||||||
&& mv $EMQX_REL_PATH /emqx-rel
|
|
||||||
|
|
||||||
FROM $RUN_FROM
|
|
||||||
|
|
||||||
COPY deploy/docker/docker-entrypoint.sh /usr/bin/
|
|
||||||
COPY --from=builder /emqx-rel/emqx /opt/emqx
|
|
||||||
|
|
||||||
RUN ln -s /opt/emqx/bin/* /usr/local/bin/
|
|
||||||
RUN apk add --no-cache curl ncurses-libs openssl sudo libstdc++ bash
|
|
||||||
|
|
||||||
WORKDIR /opt/emqx
|
|
||||||
|
|
||||||
RUN adduser -D -u 1000 emqx \
|
|
||||||
&& echo "emqx ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
|
|
||||||
|
|
||||||
RUN chgrp -Rf emqx /opt/emqx && chmod -Rf g+w /opt/emqx \
|
|
||||||
&& chown -Rf emqx /opt/emqx
|
|
||||||
|
|
||||||
USER emqx
|
|
||||||
|
|
||||||
VOLUME ["/opt/emqx/log", "/opt/emqx/data"]
|
|
||||||
|
|
||||||
# emqx will occupy these port:
|
|
||||||
# - 1883 port for MQTT
|
|
||||||
# - 8083 for WebSocket/HTTP
|
|
||||||
# - 8084 for WSS/HTTPS
|
|
||||||
# - 8883 port for MQTT(SSL)
|
|
||||||
# - 11883 port for internal MQTT/TCP
|
|
||||||
# - 18083 for dashboard and API
|
|
||||||
# - 4370 default Erlang distrbution port
|
|
||||||
# - 5369 for backplain gen_rpc
|
|
||||||
EXPOSE 1883 8083 8084 8883 11883 18083 4370 5369
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
|
||||||
|
|
||||||
CMD ["/opt/emqx/bin/emqx", "foreground"]
|
|
Loading…
Reference in New Issue