From 327af8bb4ea2b39b4b1f0f76b9188cab056800e6 Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Mon, 21 Oct 2019 16:48:41 -0700 Subject: [PATCH 01/15] restructure --- elixir/1.9.1/Dockerfile | 50 ----------------------- erlang/22.0.7/Dockerfile | 85 ---------------------------------------- erlang/22.1.2/Dockerfile | 85 ---------------------------------------- 3 files changed, 220 deletions(-) delete mode 100644 elixir/1.9.1/Dockerfile delete mode 100644 erlang/22.0.7/Dockerfile delete mode 100644 erlang/22.1.2/Dockerfile diff --git a/elixir/1.9.1/Dockerfile b/elixir/1.9.1/Dockerfile deleted file mode 100644 index 2dbcd7a..0000000 --- a/elixir/1.9.1/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -FROM avvo/erlang:22.0.7 - -# Adapted from: -# https://github.com/c0b/docker-elixir/blob/master/1.9/Dockerfile -# -# For latest NODE_VERSION, see: https://github.com/nodesource/distributions/tree/master/deb - -ENV \ - ELIXIR_VERSION='v1.9.1' \ - ELIXIR_DOWNLOAD_SHA256="94daa716abbd4493405fb2032514195077ac7bc73dc2999922f13c7d8ea58777" \ - NODE_VERSION='10' \ - HOME='/opt/app/' \ - LANG='C.UTF-8' \ - MIX_ENV='test' \ - TERM='xterm' - -WORKDIR "${HOME}" - -RUN \ - set -xe \ - && apt-get update -qq \ - && apt-get upgrade -y \ - && apt-get install -y \ - build-essential \ - git \ - libmysqlclient-dev \ - postgresql-client \ - mysql-client \ - software-properties-common \ - && ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \ - && curl -fSL -o elixir-src.tar.gz "${ELIXIR_DOWNLOAD_URL}" \ - && echo "${ELIXIR_DOWNLOAD_SHA256} elixir-src.tar.gz" | sha256sum -c - \ - && mkdir -p /usr/local/src/elixir \ - && tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz \ - && rm elixir-src.tar.gz \ - && cd /usr/local/src/elixir \ - && make install clean \ - && cd "${HOME}" \ - && curl -sL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - \ - && apt-get update -qq \ - && apt-get upgrade -y \ - && apt-get install -y \ - nodejs \ - && rm -rf '/var/lib/apt/lists/*' \ - && mix local.hex --force \ - && mix local.rebar --force \ - && mkdir -p '/root/.ssh' \ - && ssh-keyscan -t rsa github.com > '/root/.ssh/known_hosts' \ - && chmod 700 '/root/.ssh' \ - && chmod 600 '/root/.ssh/known_hosts' diff --git a/erlang/22.0.7/Dockerfile b/erlang/22.0.7/Dockerfile deleted file mode 100644 index ff0db2d..0000000 --- a/erlang/22.0.7/Dockerfile +++ /dev/null @@ -1,85 +0,0 @@ -FROM avvo/ubuntu:xenial - -# Adapted from: https://github.com/erlang/docker-erlang-otp/blob/master/22/Dockerfile - -ENV \ - OTP_VERSION="22.0.7" \ - OTP_DOWNLOAD_SHA256="04c090b55ec4a01778e7e1a5b7fdf54012548ca72737965b7aa8c4d7878c92bc" \ - REBAR_VERSION="2.6.4" \ - REBAR_DOWNLOAD_SHA256="577246bafa2eb2b2c3f1d0c157408650446884555bf87901508ce71d5cc0bd07" \ - REBAR3_VERSION="3.11.1" \ - REBAR3_DOWNLOAD_SHA256="a1822db5210b96b5f8ef10e433b22df19c5fc54dfd847bcaab86c65151ce4171" - -# We'll install the build dependencies for erlang-odbc along with the erlang -# build process: -RUN set -xe \ - && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && runtimeDeps=' \ - apt-transport-https \ - ca-certificates \ - curl \ - libgcrypt11-dev \ - libodbc1 \ - libsctp1 \ - libssl-dev \ - libwxgtk3.0 \ - openssh-client \ - ' \ - && buildDeps=' \ - autoconf \ - build-essential \ - libncurses5-dev \ - libncursesw5-dev \ - unixodbc-dev \ - libsctp-dev \ - libwxgtk3.0-dev \ - ' \ - && apt-get update \ - && apt-get install -y --no-install-recommends $runtimeDeps \ - && apt-get install -y --no-install-recommends $buildDeps \ - && curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \ - && echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \ - && export ERL_TOP="/usr/src/otp_src_${OTP_VERSION%%@*}" \ - && mkdir -vp "${ERL_TOP}" \ - && tar -xzf otp-src.tar.gz -C "${ERL_TOP}" --strip-components=1 \ - && rm otp-src.tar.gz \ - && ( \ - cd "${ERL_TOP}" \ - && ./otp_build autoconf \ - && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ - && ./configure --build="${gnuArch}" \ - && make -j$(nproc) \ - && make install \ - ) \ - && find /usr/local -name examples | xargs rm -rf \ - && apt-get purge -y --auto-remove ${buildDeps} \ - && rm -rf "${ERL_TOP}" /var/lib/apt/lists/* - -CMD ["erl"] - -# extra useful tools here: rebar & rebar3 - -RUN set -xe \ - && REBAR_DOWNLOAD_URL="https://github.com/rebar/rebar/archive/${REBAR_VERSION}.tar.gz" \ - && mkdir -p /usr/src/rebar-src \ - && curl -fSL -o rebar-src.tar.gz "${REBAR_DOWNLOAD_URL}" \ - && echo "${REBAR_DOWNLOAD_SHA256} rebar-src.tar.gz" | sha256sum -c - \ - && tar -xzf rebar-src.tar.gz -C /usr/src/rebar-src --strip-components=1 \ - && rm rebar-src.tar.gz \ - && cd /usr/src/rebar-src \ - && ./bootstrap \ - && install -v ./rebar /usr/local/bin/ \ - && rm -rf /usr/src/rebar-src - - -RUN set -xe \ - && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ - && mkdir -p /usr/src/rebar3-src \ - && curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \ - && echo "${REBAR3_DOWNLOAD_SHA256} rebar3-src.tar.gz" | sha256sum -c - \ - && tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 \ - && rm rebar3-src.tar.gz \ - && cd /usr/src/rebar3-src \ - && HOME=$PWD ./bootstrap \ - && install -v ./rebar3 /usr/local/bin/ \ - && rm -rf /usr/src/rebar3-src diff --git a/erlang/22.1.2/Dockerfile b/erlang/22.1.2/Dockerfile deleted file mode 100644 index c5f7d7b..0000000 --- a/erlang/22.1.2/Dockerfile +++ /dev/null @@ -1,85 +0,0 @@ -FROM avvo/ubuntu:18.04 - -# Adapted from: https://github.com/erlang/docker-erlang-otp/blob/master/22/Dockerfile - -ENV \ - OTP_VERSION="22.1.2" \ - OTP_DOWNLOAD_SHA256="e8ba2c0613f8d505431b86411dd950b91f83f3c4777ce9f03bacb4f76133db4b" \ - REBAR_VERSION="2.6.4" \ - REBAR_DOWNLOAD_SHA256="577246bafa2eb2b2c3f1d0c157408650446884555bf87901508ce71d5cc0bd07" \ - REBAR3_VERSION="3.12.0" \ - REBAR3_DOWNLOAD_SHA256="8ac45498f03e293bc6342ec431888f9a81a4fb9e1177a69965238d127c00a79e" - -# We'll install the build dependencies for erlang-odbc along with the erlang -# build process: -RUN set -xe \ - && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ - && runtimeDeps=' \ - apt-transport-https \ - ca-certificates \ - curl \ - libgcrypt11-dev \ - libodbc1 \ - libsctp1 \ - libssl-dev \ - libwxgtk3.0 \ - openssh-client \ - ' \ - && buildDeps=' \ - autoconf \ - build-essential \ - libncurses5-dev \ - libncursesw5-dev \ - unixodbc-dev \ - libsctp-dev \ - libwxgtk3.0-dev \ - ' \ - && apt-get update \ - && apt-get install -y --no-install-recommends $runtimeDeps \ - && apt-get install -y --no-install-recommends $buildDeps \ - && curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \ - && echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \ - && export ERL_TOP="/usr/src/otp_src_${OTP_VERSION%%@*}" \ - && mkdir -vp $ERL_TOP \ - && tar -xzf otp-src.tar.gz -C $ERL_TOP --strip-components=1 \ - && rm otp-src.tar.gz \ - && ( \ - cd $ERL_TOP \ - && ./otp_build autoconf \ - && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ - && ./configure --build="${gnuArch}" \ - && make -j$(nproc) \ - && make install \ - ) \ - && find /usr/local -name examples | xargs rm -rf \ - && apt-get purge -y --auto-remove ${buildDeps} \ - && rm -rf $ERL_TOP /var/lib/apt/lists/* - -CMD ["erl"] - -# extra useful tools here: rebar & rebar3 - -RUN set -xe \ - && REBAR_DOWNLOAD_URL="https://github.com/rebar/rebar/archive/${REBAR_VERSION}.tar.gz" \ - && mkdir -p /usr/src/rebar-src \ - && curl -fSL -o rebar-src.tar.gz "$REBAR_DOWNLOAD_URL" \ - && echo "$REBAR_DOWNLOAD_SHA256 rebar-src.tar.gz" | sha256sum -c - \ - && tar -xzf rebar-src.tar.gz -C /usr/src/rebar-src --strip-components=1 \ - && rm rebar-src.tar.gz \ - && cd /usr/src/rebar-src \ - && ./bootstrap \ - && install -v ./rebar /usr/local/bin/ \ - && rm -rf /usr/src/rebar-src - - -RUN set -xe \ - && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ - && mkdir -p /usr/src/rebar3-src \ - && curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \ - && echo "$REBAR3_DOWNLOAD_SHA256 rebar3-src.tar.gz" | sha256sum -c - \ - && tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 \ - && rm rebar3-src.tar.gz \ - && cd /usr/src/rebar3-src \ - && HOME=$PWD ./bootstrap \ - && install -v ./rebar3 /usr/local/bin/ \ - && rm -rf /usr/src/rebar3-src From 46b75958ce1e603068f6c13ef6dd32b634a773d9 Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Thu, 24 Oct 2019 16:34:51 -0700 Subject: [PATCH 02/15] Add alpine based images and restructuring Restructire folders: put Dockerfiles for alpine and ubuntu in the folders with respective names --- README.md | 12 ++-- elixir/1.6.0/{ => ubuntu}/Dockerfile | 0 elixir/1.6.1/{ => ubuntu}/Dockerfile | 0 elixir/1.6.2/{ => ubuntu}/Dockerfile | 0 elixir/1.6.3/{ => ubuntu}/Dockerfile | 0 elixir/1.7.4/{ => ubuntu}/Dockerfile | 0 elixir/1.9.1/ubuntu/Dockerfile | 50 ++++++++++++++++ elixir/1.9.2/alpine/Dockerfile | 80 +++++++++++++++++++++++++ erlang/20.2.4/{ => ubuntu}/Dockerfile | 0 erlang/20.3/{ => ubuntu}/Dockerfile | 0 erlang/20/{ => ubuntu}/Dockerfile | 0 erlang/22.1.2/ubuntu/Dockerfile | 85 +++++++++++++++++++++++++++ erlang/22.1.3/alpine/Dockerfile | 68 +++++++++++++++++++++ push.sh | 10 ++-- 14 files changed, 295 insertions(+), 10 deletions(-) rename elixir/1.6.0/{ => ubuntu}/Dockerfile (100%) rename elixir/1.6.1/{ => ubuntu}/Dockerfile (100%) rename elixir/1.6.2/{ => ubuntu}/Dockerfile (100%) rename elixir/1.6.3/{ => ubuntu}/Dockerfile (100%) rename elixir/1.7.4/{ => ubuntu}/Dockerfile (100%) create mode 100644 elixir/1.9.1/ubuntu/Dockerfile create mode 100644 elixir/1.9.2/alpine/Dockerfile rename erlang/20.2.4/{ => ubuntu}/Dockerfile (100%) rename erlang/20.3/{ => ubuntu}/Dockerfile (100%) rename erlang/20/{ => ubuntu}/Dockerfile (100%) create mode 100644 erlang/22.1.2/ubuntu/Dockerfile create mode 100644 erlang/22.1.3/alpine/Dockerfile diff --git a/README.md b/README.md index e4d3a14..6113de2 100644 --- a/README.md +++ b/README.md @@ -15,20 +15,20 @@ These Dockerfiles are used to build docker images we use for various Calling `push.sh` with no argument will use the directory name as the tag. For example, the following command will push an `erlang` image with the tags -`20.2.4` and `latest` to Dockerhub: +`22-alpine` and `alpine-latest` to Dockerhub: ``` -cd erlang/20.2.4 -../../push.sh +cd erlang/22/alpine +../../../push.sh ``` If an argument is passed to `push.sh`, it will be used as a suffix appended with a `-` to the current directory name. For example, the following command will -push an `elixir` image with the tags `1.6.2-b` and `latest` to Dockerhub: +push an `elixir` image with the tags `1.6.2-alpine-b` and `alpine-latest` to Dockerhub: ``` -cd elixir/1.6.2 -../../push.sh b +cd elixir/1.6.2/alpine +../../../push.sh b ``` #### Notes diff --git a/elixir/1.6.0/Dockerfile b/elixir/1.6.0/ubuntu/Dockerfile similarity index 100% rename from elixir/1.6.0/Dockerfile rename to elixir/1.6.0/ubuntu/Dockerfile diff --git a/elixir/1.6.1/Dockerfile b/elixir/1.6.1/ubuntu/Dockerfile similarity index 100% rename from elixir/1.6.1/Dockerfile rename to elixir/1.6.1/ubuntu/Dockerfile diff --git a/elixir/1.6.2/Dockerfile b/elixir/1.6.2/ubuntu/Dockerfile similarity index 100% rename from elixir/1.6.2/Dockerfile rename to elixir/1.6.2/ubuntu/Dockerfile diff --git a/elixir/1.6.3/Dockerfile b/elixir/1.6.3/ubuntu/Dockerfile similarity index 100% rename from elixir/1.6.3/Dockerfile rename to elixir/1.6.3/ubuntu/Dockerfile diff --git a/elixir/1.7.4/Dockerfile b/elixir/1.7.4/ubuntu/Dockerfile similarity index 100% rename from elixir/1.7.4/Dockerfile rename to elixir/1.7.4/ubuntu/Dockerfile diff --git a/elixir/1.9.1/ubuntu/Dockerfile b/elixir/1.9.1/ubuntu/Dockerfile new file mode 100644 index 0000000..2dbcd7a --- /dev/null +++ b/elixir/1.9.1/ubuntu/Dockerfile @@ -0,0 +1,50 @@ +FROM avvo/erlang:22.0.7 + +# Adapted from: +# https://github.com/c0b/docker-elixir/blob/master/1.9/Dockerfile +# +# For latest NODE_VERSION, see: https://github.com/nodesource/distributions/tree/master/deb + +ENV \ + ELIXIR_VERSION='v1.9.1' \ + ELIXIR_DOWNLOAD_SHA256="94daa716abbd4493405fb2032514195077ac7bc73dc2999922f13c7d8ea58777" \ + NODE_VERSION='10' \ + HOME='/opt/app/' \ + LANG='C.UTF-8' \ + MIX_ENV='test' \ + TERM='xterm' + +WORKDIR "${HOME}" + +RUN \ + set -xe \ + && apt-get update -qq \ + && apt-get upgrade -y \ + && apt-get install -y \ + build-essential \ + git \ + libmysqlclient-dev \ + postgresql-client \ + mysql-client \ + software-properties-common \ + && ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \ + && curl -fSL -o elixir-src.tar.gz "${ELIXIR_DOWNLOAD_URL}" \ + && echo "${ELIXIR_DOWNLOAD_SHA256} elixir-src.tar.gz" | sha256sum -c - \ + && mkdir -p /usr/local/src/elixir \ + && tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz \ + && rm elixir-src.tar.gz \ + && cd /usr/local/src/elixir \ + && make install clean \ + && cd "${HOME}" \ + && curl -sL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - \ + && apt-get update -qq \ + && apt-get upgrade -y \ + && apt-get install -y \ + nodejs \ + && rm -rf '/var/lib/apt/lists/*' \ + && mix local.hex --force \ + && mix local.rebar --force \ + && mkdir -p '/root/.ssh' \ + && ssh-keyscan -t rsa github.com > '/root/.ssh/known_hosts' \ + && chmod 700 '/root/.ssh' \ + && chmod 600 '/root/.ssh/known_hosts' diff --git a/elixir/1.9.2/alpine/Dockerfile b/elixir/1.9.2/alpine/Dockerfile new file mode 100644 index 0000000..5ad74f5 --- /dev/null +++ b/elixir/1.9.2/alpine/Dockerfile @@ -0,0 +1,80 @@ +FROM avvo/erlang:22-alpine + +# elixir expects utf8. +ENV ELIXIR_VERSION="v1.9.2" \ + LANG=C.UTF-8 \ + NODE_VERSION='10.16.3' \ + HOME='/opt/app/' \ + MIX_ENV='test' + +RUN set -xe \ + && STARTING_DIR="$(pwd)" \ + && ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \ + && ELIXIR_DOWNLOAD_SHA256="02aaa3ffd21f9cf51aceb3aa5a5bc2c1e2636b1611867e44f19693dcf856e25c" \ + && buildDeps=' \ + ca-certificates \ + curl \ + make \ + ' \ + && apk add --no-cache --virtual .build-deps $buildDeps \ + && curl -fSL -o elixir-src.tar.gz $ELIXIR_DOWNLOAD_URL \ + && echo "$ELIXIR_DOWNLOAD_SHA256 elixir-src.tar.gz" | sha256sum -c - \ + && mkdir -p /usr/local/src/elixir \ + && tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz \ + && rm elixir-src.tar.gz \ + && cd /usr/local/src/elixir \ + && make install clean \ + && apk del .build-deps \ + && mkdir -p $HOME \ + && cd $HOME \ + && addgroup -g 1000 node \ + && adduser -u 1000 -G node -s /bin/sh -D node \ + && apk add --no-cache \ + libstdc++ \ + && apk add --no-cache --virtual .build-deps \ + binutils-gold \ + curl \ + g++ \ + gcc \ + gnupg \ + libgcc \ + linux-headers \ + make \ + python \ + && for key in \ + 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ + FD3A5288F042B6850C66B31F09FE44734EB7990E \ + 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ + DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ + C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ + B9AE9905FFD7803F25714661B63B535A4C206CA9 \ + 77984A986EBC2AA786BC0F66B01FBB92821C587A \ + 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ + 4ED778F539E3634C779C87C6D7062848A1AB005C \ + A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ + B9E2F5981AA6E0CD28160D9FF13993A75599653C \ + ; do \ + gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ + gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ + gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ + done \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \ + && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ + && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ + && grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ + && tar -xf "node-v$NODE_VERSION.tar.xz" \ + && cd "node-v$NODE_VERSION" \ + && ./configure \ + && make -j$(getconf _NPROCESSORS_ONLN) V= \ + && make install \ + && apk del .build-deps \ + && cd .. \ + && rm -Rf "node-v$NODE_VERSION" \ + && rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ + && mix local.hex --force \ + && mix local.rebar --force \ + && mkdir -p '/root/.ssh' \ + && apk add --no-cache openssh-client \ + && ssh-keyscan -t rsa github.com > '/root/.ssh/known_hosts' \ + && chmod 700 '/root/.ssh' \ + && chmod 600 '/root/.ssh/known_hosts' diff --git a/erlang/20.2.4/Dockerfile b/erlang/20.2.4/ubuntu/Dockerfile similarity index 100% rename from erlang/20.2.4/Dockerfile rename to erlang/20.2.4/ubuntu/Dockerfile diff --git a/erlang/20.3/Dockerfile b/erlang/20.3/ubuntu/Dockerfile similarity index 100% rename from erlang/20.3/Dockerfile rename to erlang/20.3/ubuntu/Dockerfile diff --git a/erlang/20/Dockerfile b/erlang/20/ubuntu/Dockerfile similarity index 100% rename from erlang/20/Dockerfile rename to erlang/20/ubuntu/Dockerfile diff --git a/erlang/22.1.2/ubuntu/Dockerfile b/erlang/22.1.2/ubuntu/Dockerfile new file mode 100644 index 0000000..c5f7d7b --- /dev/null +++ b/erlang/22.1.2/ubuntu/Dockerfile @@ -0,0 +1,85 @@ +FROM avvo/ubuntu:18.04 + +# Adapted from: https://github.com/erlang/docker-erlang-otp/blob/master/22/Dockerfile + +ENV \ + OTP_VERSION="22.1.2" \ + OTP_DOWNLOAD_SHA256="e8ba2c0613f8d505431b86411dd950b91f83f3c4777ce9f03bacb4f76133db4b" \ + REBAR_VERSION="2.6.4" \ + REBAR_DOWNLOAD_SHA256="577246bafa2eb2b2c3f1d0c157408650446884555bf87901508ce71d5cc0bd07" \ + REBAR3_VERSION="3.12.0" \ + REBAR3_DOWNLOAD_SHA256="8ac45498f03e293bc6342ec431888f9a81a4fb9e1177a69965238d127c00a79e" + +# We'll install the build dependencies for erlang-odbc along with the erlang +# build process: +RUN set -xe \ + && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ + && runtimeDeps=' \ + apt-transport-https \ + ca-certificates \ + curl \ + libgcrypt11-dev \ + libodbc1 \ + libsctp1 \ + libssl-dev \ + libwxgtk3.0 \ + openssh-client \ + ' \ + && buildDeps=' \ + autoconf \ + build-essential \ + libncurses5-dev \ + libncursesw5-dev \ + unixodbc-dev \ + libsctp-dev \ + libwxgtk3.0-dev \ + ' \ + && apt-get update \ + && apt-get install -y --no-install-recommends $runtimeDeps \ + && apt-get install -y --no-install-recommends $buildDeps \ + && curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \ + && echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \ + && export ERL_TOP="/usr/src/otp_src_${OTP_VERSION%%@*}" \ + && mkdir -vp $ERL_TOP \ + && tar -xzf otp-src.tar.gz -C $ERL_TOP --strip-components=1 \ + && rm otp-src.tar.gz \ + && ( \ + cd $ERL_TOP \ + && ./otp_build autoconf \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure --build="${gnuArch}" \ + && make -j$(nproc) \ + && make install \ + ) \ + && find /usr/local -name examples | xargs rm -rf \ + && apt-get purge -y --auto-remove ${buildDeps} \ + && rm -rf $ERL_TOP /var/lib/apt/lists/* + +CMD ["erl"] + +# extra useful tools here: rebar & rebar3 + +RUN set -xe \ + && REBAR_DOWNLOAD_URL="https://github.com/rebar/rebar/archive/${REBAR_VERSION}.tar.gz" \ + && mkdir -p /usr/src/rebar-src \ + && curl -fSL -o rebar-src.tar.gz "$REBAR_DOWNLOAD_URL" \ + && echo "$REBAR_DOWNLOAD_SHA256 rebar-src.tar.gz" | sha256sum -c - \ + && tar -xzf rebar-src.tar.gz -C /usr/src/rebar-src --strip-components=1 \ + && rm rebar-src.tar.gz \ + && cd /usr/src/rebar-src \ + && ./bootstrap \ + && install -v ./rebar /usr/local/bin/ \ + && rm -rf /usr/src/rebar-src + + +RUN set -xe \ + && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ + && mkdir -p /usr/src/rebar3-src \ + && curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \ + && echo "$REBAR3_DOWNLOAD_SHA256 rebar3-src.tar.gz" | sha256sum -c - \ + && tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 \ + && rm rebar3-src.tar.gz \ + && cd /usr/src/rebar3-src \ + && HOME=$PWD ./bootstrap \ + && install -v ./rebar3 /usr/local/bin/ \ + && rm -rf /usr/src/rebar3-src diff --git a/erlang/22.1.3/alpine/Dockerfile b/erlang/22.1.3/alpine/Dockerfile new file mode 100644 index 0000000..c8bf4e2 --- /dev/null +++ b/erlang/22.1.3/alpine/Dockerfile @@ -0,0 +1,68 @@ +FROM avvo/alpine:3.9 + +# Adapted from: https://github.com/erlang/docker-erlang-otp/blob/master/22/alpine/Dockerfile + +ENV OTP_VERSION="22.1.3" \ + REBAR3_VERSION="3.12.0" + +LABEL org.opencontainers.image.version=$OTP_VERSION + +RUN set -xe \ + && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ + && OTP_DOWNLOAD_SHA256="53a828c1199a41cb54bd3bc6c2c49af977a8834e702c030a5ea34013a3fcacdd" \ + && REBAR3_DOWNLOAD_SHA256="8ac45498f03e293bc6342ec431888f9a81a4fb9e1177a69965238d127c00a79e" \ + && apk add --no-cache --virtual .fetch-deps \ + curl \ + ca-certificates \ + && curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \ + && echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \ + && apk add --no-cache --virtual .build-deps \ + dpkg-dev dpkg \ + gcc \ + g++ \ + libc-dev \ + linux-headers \ + make \ + autoconf \ + ncurses-dev \ + openssl-dev \ + unixodbc-dev \ + lksctp-tools-dev \ + tar \ + && export ERL_TOP="/usr/src/otp_src_${OTP_VERSION%%@*}" \ + && mkdir -vp $ERL_TOP \ + && tar -xzf otp-src.tar.gz -C $ERL_TOP --strip-components=1 \ + && rm otp-src.tar.gz \ + && ( cd $ERL_TOP \ + && ./otp_build autoconf \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure --build="$gnuArch" \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install ) \ + && rm -rf $ERL_TOP \ + && find /usr/local -regex '/usr/local/lib/erlang/\(lib/\|erts-\).*/\(man\|doc\|obj\|c_src\|emacs\|info\|examples\)' | xargs rm -rf \ + && find /usr/local -name src | xargs -r find | grep -v '\.hrl$' | xargs rm -v || true \ + && find /usr/local -name src | xargs -r find | xargs rmdir -vp || true \ + && scanelf --nobanner -E ET_EXEC -BF '%F' --recursive /usr/local | xargs -r strip --strip-all \ + && scanelf --nobanner -E ET_DYN -BF '%F' --recursive /usr/local | xargs -r strip --strip-unneeded \ + && runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )" \ + && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ + && curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \ + && echo "${REBAR3_DOWNLOAD_SHA256} rebar3-src.tar.gz" | sha256sum -c - \ + && mkdir -p /usr/src/rebar3-src \ + && tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 \ + && rm rebar3-src.tar.gz \ + && cd /usr/src/rebar3-src \ + && HOME=$PWD ./bootstrap \ + && install -v ./rebar3 /usr/local/bin/ \ + && rm -rf /usr/src/rebar3-src \ + && apk add --virtual .erlang-rundeps \ + $runDeps \ + lksctp-tools \ + ca-certificates \ + && apk del .fetch-deps .build-deps diff --git a/push.sh b/push.sh index 6fa5996..fcaee71 100755 --- a/push.sh +++ b/push.sh @@ -1,12 +1,14 @@ #!/usr/bin/env bash set -xe -IMAGE="avvo/$(basename $(dirname $(pwd)))" -TAG="$(basename $(pwd))" +IMAGE="avvo/$(basename $(dirname $(dirname $(pwd))))" +VERSION="$(basename $(dirname $(pwd)))" +BASE="$(basename $(pwd))" +TAG="${VERSION}-${BASE}" if [ -n "${1}" ]; then TAG="${TAG}-${1}" fi -docker build -t "${IMAGE}:${TAG}" -t "${IMAGE}:latest" . +docker build -t "${IMAGE}:${TAG}" -t "${IMAGE}:latest-${BASE}" . docker push "${IMAGE}:${TAG}" -docker push "${IMAGE}:latest" +docker push "${IMAGE}:latest-${BASE}" From 4ba79b4f7212757fd3b8f7762fb36cedd251e7bb Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Tue, 29 Oct 2019 23:52:51 -0700 Subject: [PATCH 03/15] - add alpine version of latest erlang and elixir based on avvo/alpine - restructure the repo so that we could add ubuntu and alpine versions respectively - add example of Dockerfile with multistage build for prod - remove outdated dockerfiles --- README.md | 41 +++++++++++++++++++ elixir-circleci/Dockerfile | 49 ---------------------- elixir-release-ubuntu/xenial/Dockerfile | 16 -------- elixir-release/3.6/Dockerfile | 12 ------ elixir/1.9.2/alpine/Dockerfile | 54 +++---------------------- push.sh | 4 +- 6 files changed, 48 insertions(+), 128 deletions(-) delete mode 100644 elixir-circleci/Dockerfile delete mode 100644 elixir-release-ubuntu/xenial/Dockerfile delete mode 100644 elixir-release/3.6/Dockerfile diff --git a/README.md b/README.md index 6113de2..90ca4ce 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,47 @@ These Dockerfiles are used to build docker images we use for various [Elixir](https://hub.docker.com/r/avvo/elixir/tags/) and [Erlang](https://hub.docker.com/r/avvo/erlang/tags/) containers at Avvo. +## Multistage Docker Build for Production + +Lower finale image size by using multistage docker build and avvo/alpine image. + +```Dockerfile +FROM avvo/elixir:1.9.2-alpine-otp22 AS build + +ENV MIX_ENV=prod + +COPY . . + +RUN mix do deps.get, deps.compile, compile + +# If you have assets to build +RUN cd assets \ + && npm install \ + && npm run deploy \ + && cd .. + +RUN mix phx.digest + +RUN mix release + +FROM avvo/alpine:3.9 + +RUN set -xe \ + && apk --no-cache upgrade \ + && apk add --no-cache \ + ncurses-libs \ + openssl + +EXPOSE 4000 + +WORKDIR /srv/app_name + +COPY --from=build ./_build/prod/rel/app_name/ . + +ENTRYPOINT ["avvoenv", "exec"] +CMD ["bin/app_name", "start"] +``` + ## Development 1. Clone this repo diff --git a/elixir-circleci/Dockerfile b/elixir-circleci/Dockerfile deleted file mode 100644 index 2efdcc2..0000000 --- a/elixir-circleci/Dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -FROM ubuntu:xenial - -# For latest ERLANG_OTP_VERSION, see: https://packages.erlang-solutions.com/erlang/ -# For latest NODE_VERSION, see: https://github.com/nodesource/distributions/tree/master/deb - -ENV \ - ELIXIR_VERSION='1.5.2-1' \ - ERLANG_OTP_VERSION='20.1.7' \ - HOME='/opt/app/' \ - LANG='C.UTF-8' \ - MIX_ENV='test' \ - NODE_VERSION='8' \ - TERM='xterm' - -WORKDIR "${HOME}" - -RUN \ - set -xe \ - && apt-get update -qq \ - && apt-get upgrade -y \ - && apt-get install -y \ - apt-transport-https \ - build-essential \ - ca-certificates \ - curl \ - git \ - libmysqlclient-dev \ - postgresql-client \ - mysql-client \ - openssh-client \ - software-properties-common \ - && curl -sL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - \ - && ERLANG_PKG='erlang-solutions_1.0_all.deb' \ - && ERLANG_URL="https://packages.erlang-solutions.com/${ERLANG_PKG}" \ - && curl -o "/tmp/${ERLANG_PKG}" ${ERLANG_URL} \ - && dpkg -i "/tmp/${ERLANG_PKG}" \ - && apt-get update -qq \ - && apt-get upgrade -y \ - && apt-get install -y \ - nodejs \ - "elixir=${ELIXIR_VERSION}" \ - "esl-erlang=1:${ERLANG_OTP_VERSION}" \ - && rm -rf '/var/lib/apt/lists/*' \ - && mix local.hex --force \ - && mix local.rebar --force \ - && mkdir -p '/root/.ssh' \ - && ssh-keyscan -t rsa github.com > '/root/.ssh/known_hosts' \ - && chmod 700 '/root/.ssh' \ - && chmod 600 '/root/.ssh/known_hosts' diff --git a/elixir-release-ubuntu/xenial/Dockerfile b/elixir-release-ubuntu/xenial/Dockerfile deleted file mode 100644 index 1b273ea..0000000 --- a/elixir-release-ubuntu/xenial/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM avvo/ubuntu:xenial - -ENV \ - HOME=/opt/app/ \ - LANG='C.UTF-8' \ - MIX_ENV='prod' \ - TERM='xterm' - -WORKDIR /opt/app - -RUN \ - set -xe \ - && apt-get update \ - && apt-get -y upgrade \ - && apt-get -y install openssl wget mysql-client \ - && rm -rf /var/lib/apt/lists/* diff --git a/elixir-release/3.6/Dockerfile b/elixir-release/3.6/Dockerfile deleted file mode 100644 index 6a786ef..0000000 --- a/elixir-release/3.6/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM avvo/alpine:3.6 - -RUN \ - set -xe \ - && apk update \ - && apk upgrade \ - && apk --no-cache --update add \ - libcrypto1.0 \ - libgcc \ - libstdc++ \ - ncurses-libs \ - && rm -rf /var/cache/apk/* diff --git a/elixir/1.9.2/alpine/Dockerfile b/elixir/1.9.2/alpine/Dockerfile index 5ad74f5..c616840 100644 --- a/elixir/1.9.2/alpine/Dockerfile +++ b/elixir/1.9.2/alpine/Dockerfile @@ -1,10 +1,11 @@ FROM avvo/erlang:22-alpine +# Adapted from: +# https://github.com/c0b/docker-elixir/blob/master/1.9/Dockerfile + # elixir expects utf8. ENV ELIXIR_VERSION="v1.9.2" \ LANG=C.UTF-8 \ - NODE_VERSION='10.16.3' \ - HOME='/opt/app/' \ MIX_ENV='test' RUN set -xe \ @@ -16,6 +17,7 @@ RUN set -xe \ curl \ make \ ' \ + && apk --no-cache upgrade \ && apk add --no-cache --virtual .build-deps $buildDeps \ && curl -fSL -o elixir-src.tar.gz $ELIXIR_DOWNLOAD_URL \ && echo "$ELIXIR_DOWNLOAD_SHA256 elixir-src.tar.gz" | sha256sum -c - \ @@ -24,57 +26,11 @@ RUN set -xe \ && rm elixir-src.tar.gz \ && cd /usr/local/src/elixir \ && make install clean \ - && apk del .build-deps \ - && mkdir -p $HOME \ - && cd $HOME \ - && addgroup -g 1000 node \ - && adduser -u 1000 -G node -s /bin/sh -D node \ - && apk add --no-cache \ - libstdc++ \ - && apk add --no-cache --virtual .build-deps \ - binutils-gold \ - curl \ - g++ \ - gcc \ - gnupg \ - libgcc \ - linux-headers \ - make \ - python \ - && for key in \ - 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ - FD3A5288F042B6850C66B31F09FE44734EB7990E \ - 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ - DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ - C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ - B9AE9905FFD7803F25714661B63B535A4C206CA9 \ - 77984A986EBC2AA786BC0F66B01FBB92821C587A \ - 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ - 4ED778F539E3634C779C87C6D7062848A1AB005C \ - A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ - B9E2F5981AA6E0CD28160D9FF13993A75599653C \ - ; do \ - gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ - gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ - gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \ - done \ - && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \ - && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ - && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ - && grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ - && tar -xf "node-v$NODE_VERSION.tar.xz" \ - && cd "node-v$NODE_VERSION" \ - && ./configure \ - && make -j$(getconf _NPROCESSORS_ONLN) V= \ - && make install \ && apk del .build-deps \ - && cd .. \ - && rm -Rf "node-v$NODE_VERSION" \ - && rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ && mix local.hex --force \ && mix local.rebar --force \ && mkdir -p '/root/.ssh' \ - && apk add --no-cache openssh-client \ + && apk add --no-cache openssh-client build-base npm git \ && ssh-keyscan -t rsa github.com > '/root/.ssh/known_hosts' \ && chmod 700 '/root/.ssh' \ && chmod 600 '/root/.ssh/known_hosts' diff --git a/push.sh b/push.sh index fcaee71..d4175ab 100755 --- a/push.sh +++ b/push.sh @@ -10,5 +10,5 @@ if [ -n "${1}" ]; then fi docker build -t "${IMAGE}:${TAG}" -t "${IMAGE}:latest-${BASE}" . -docker push "${IMAGE}:${TAG}" -docker push "${IMAGE}:latest-${BASE}" +# docker push "${IMAGE}:${TAG}" +# docker push "${IMAGE}:latest-${BASE}" From 4e0d12dbb17117a7d77bd2325c614ce66b90aa73 Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Wed, 30 Oct 2019 00:04:09 -0700 Subject: [PATCH 04/15] fix readme --- README.md | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 90ca4ce..5554b43 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,36 @@ These Dockerfiles are used to build docker images we use for various [Elixir](https://hub.docker.com/r/avvo/elixir/tags/) and [Erlang](https://hub.docker.com/r/avvo/erlang/tags/) containers at Avvo. +## Development + +1. Clone this repo +2. Edit the Dockerfile you want to update +3. Keep the primary version number of the image in sync with the Elixir version. + So tag '1.6.2' should be Elixir version 1.6.2. Any changes to the Dockerfile + that are not Elixir version related should increase the letter version. +4. Build and push an image with a version tag + +Calling `push.sh` with no argument will use the directory name as the tag. For +example, the following command will push an `erlang` image with the tags +`22-alpine` and `alpine-latest` to Dockerhub: + +``` +cd erlang/22/alpine +../../../push.sh +``` + +If an argument is passed to `push.sh`, it will be used as a suffix appended with +a `-` to the current directory name. For example, the following command will +push an `elixir` image with the tags `1.6.2-alpine-b` and `alpine-latest` to Dockerhub: + +``` +cd elixir/1.6.2/alpine +../../../push.sh b +``` + ## Multistage Docker Build for Production -Lower finale image size by using multistage docker build and avvo/alpine image. +Lower final image size by using multistage docker build and avvo/alpine image. ```Dockerfile FROM avvo/elixir:1.9.2-alpine-otp22 AS build @@ -45,33 +72,6 @@ ENTRYPOINT ["avvoenv", "exec"] CMD ["bin/app_name", "start"] ``` -## Development - -1. Clone this repo -2. Edit the Dockerfile you want to update -3. Keep the primary version number of the image in sync with the Elixir version. - So tag '1.6.2' should be Elixir version 1.6.2. Any changes to the Dockerfile - that are not Elixir version related should increase the letter version. -4. Build and push an image with a version tag - -Calling `push.sh` with no argument will use the directory name as the tag. For -example, the following command will push an `erlang` image with the tags -`22-alpine` and `alpine-latest` to Dockerhub: - -``` -cd erlang/22/alpine -../../../push.sh -``` - -If an argument is passed to `push.sh`, it will be used as a suffix appended with -a `-` to the current directory name. For example, the following command will -push an `elixir` image with the tags `1.6.2-alpine-b` and `alpine-latest` to Dockerhub: - -``` -cd elixir/1.6.2/alpine -../../../push.sh b -``` - #### Notes 1. You need permissions to write the images on dockerhub. If you're not an Avvo From dc217c5178192a89c71be95f4ba7713e7fef3e0f Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Wed, 30 Oct 2019 00:04:59 -0700 Subject: [PATCH 05/15] fix readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5554b43..54a99b7 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,13 @@ cd elixir/1.6.2/alpine ../../../push.sh b ``` +#### Notes + +1. You need permissions to write the images on dockerhub. If you're not an Avvo + person, you probably don't have access. You can push it up to your own + namespace. +2. Test out your changes on a tag before committing and pushing to latest. + ## Multistage Docker Build for Production Lower final image size by using multistage docker build and avvo/alpine image. @@ -72,13 +79,6 @@ ENTRYPOINT ["avvoenv", "exec"] CMD ["bin/app_name", "start"] ``` -#### Notes - -1. You need permissions to write the images on dockerhub. If you're not an Avvo - person, you probably don't have access. You can push it up to your own - namespace. -2. Test out your changes on a tag before committing and pushing to latest. - ## License MIT Licence. Do what you want, this is just configuration, nothing special. From 6b824f77bbde27cdc5a3e7856e6e30f8fb0fcdbb Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Wed, 30 Oct 2019 00:12:48 -0700 Subject: [PATCH 06/15] uncomment push --- push.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/push.sh b/push.sh index d4175ab..fcaee71 100755 --- a/push.sh +++ b/push.sh @@ -10,5 +10,5 @@ if [ -n "${1}" ]; then fi docker build -t "${IMAGE}:${TAG}" -t "${IMAGE}:latest-${BASE}" . -# docker push "${IMAGE}:${TAG}" -# docker push "${IMAGE}:latest-${BASE}" +docker push "${IMAGE}:${TAG}" +docker push "${IMAGE}:latest-${BASE}" From 4f444bcf311d40dc8082500b5e6277900b9ceaba Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Thu, 31 Oct 2019 16:47:09 -0700 Subject: [PATCH 07/15] updated Readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 54a99b7..72227e2 100644 --- a/README.md +++ b/README.md @@ -8,27 +8,27 @@ These Dockerfiles are used to build docker images we use for various 1. Clone this repo 2. Edit the Dockerfile you want to update -3. Keep the primary version number of the image in sync with the Elixir version. +3. Keep the primary version number of the image in sync with the Elixir version and its base erlang/otp version. So tag '1.6.2' should be Elixir version 1.6.2. Any changes to the Dockerfile - that are not Elixir version related should increase the letter version. + that are not Elixir version or base image version related should increase the letter version. 4. Build and push an image with a version tag Calling `push.sh` with no argument will use the directory name as the tag. For example, the following command will push an `erlang` image with the tags -`22-alpine` and `alpine-latest` to Dockerhub: +`22.1.3-alpine` and `alpine-latest` to Dockerhub: ``` -cd erlang/22/alpine +cd erlang/22.1.3/alpine ../../../push.sh ``` If an argument is passed to `push.sh`, it will be used as a suffix appended with a `-` to the current directory name. For example, the following command will -push an `elixir` image with the tags `1.6.2-alpine-b` and `alpine-latest` to Dockerhub: +push an `elixir` image with the tags `1.9.2-alpine-otp22` and `alpine-latest` to Dockerhub: ``` -cd elixir/1.6.2/alpine -../../../push.sh b +cd elixir/1.9.2/alpine +../../../push.sh otp22 ``` #### Notes From 8f1e0b93ada7736efffc391ba3889fbc3fac0e40 Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Fri, 1 Nov 2019 14:43:28 -0700 Subject: [PATCH 08/15] restore release versions --- elixir-release-ubuntu/xenial/Dockerfile | 16 ++++++++++++++++ elixir-release/3.6/Dockerfile | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 elixir-release-ubuntu/xenial/Dockerfile create mode 100644 elixir-release/3.6/Dockerfile diff --git a/elixir-release-ubuntu/xenial/Dockerfile b/elixir-release-ubuntu/xenial/Dockerfile new file mode 100644 index 0000000..1b273ea --- /dev/null +++ b/elixir-release-ubuntu/xenial/Dockerfile @@ -0,0 +1,16 @@ +FROM avvo/ubuntu:xenial + +ENV \ + HOME=/opt/app/ \ + LANG='C.UTF-8' \ + MIX_ENV='prod' \ + TERM='xterm' + +WORKDIR /opt/app + +RUN \ + set -xe \ + && apt-get update \ + && apt-get -y upgrade \ + && apt-get -y install openssl wget mysql-client \ + && rm -rf /var/lib/apt/lists/* diff --git a/elixir-release/3.6/Dockerfile b/elixir-release/3.6/Dockerfile new file mode 100644 index 0000000..6a786ef --- /dev/null +++ b/elixir-release/3.6/Dockerfile @@ -0,0 +1,12 @@ +FROM avvo/alpine:3.6 + +RUN \ + set -xe \ + && apk update \ + && apk upgrade \ + && apk --no-cache --update add \ + libcrypto1.0 \ + libgcc \ + libstdc++ \ + ncurses-libs \ + && rm -rf /var/cache/apk/* From 27eb9aaa6f89e5e07bb2c8add60f7d04ae9ada29 Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Fri, 1 Nov 2019 15:02:32 -0700 Subject: [PATCH 09/15] add release versions --- elixir-release/{ => alpine}/3.6/Dockerfile | 0 elixir-release/alpine/3.9/Dockerfile | 7 +++++++ .../ubuntu}/18.04/Dockerfile | 0 .../ubuntu}/xenial/Dockerfile | 0 push.sh | 10 +++++++++- 5 files changed, 16 insertions(+), 1 deletion(-) rename elixir-release/{ => alpine}/3.6/Dockerfile (100%) create mode 100644 elixir-release/alpine/3.9/Dockerfile rename {elixir-release-ubuntu => elixir-release/ubuntu}/18.04/Dockerfile (100%) rename {elixir-release-ubuntu => elixir-release/ubuntu}/xenial/Dockerfile (100%) diff --git a/elixir-release/3.6/Dockerfile b/elixir-release/alpine/3.6/Dockerfile similarity index 100% rename from elixir-release/3.6/Dockerfile rename to elixir-release/alpine/3.6/Dockerfile diff --git a/elixir-release/alpine/3.9/Dockerfile b/elixir-release/alpine/3.9/Dockerfile new file mode 100644 index 0000000..e262967 --- /dev/null +++ b/elixir-release/alpine/3.9/Dockerfile @@ -0,0 +1,7 @@ +FROM avvo/alpine:3.9 + +RUN set -xe \ + && apk --no-cache upgrade \ + && apk add --no-cache \ + ncurses-libs \ + openssl diff --git a/elixir-release-ubuntu/18.04/Dockerfile b/elixir-release/ubuntu/18.04/Dockerfile similarity index 100% rename from elixir-release-ubuntu/18.04/Dockerfile rename to elixir-release/ubuntu/18.04/Dockerfile diff --git a/elixir-release-ubuntu/xenial/Dockerfile b/elixir-release/ubuntu/xenial/Dockerfile similarity index 100% rename from elixir-release-ubuntu/xenial/Dockerfile rename to elixir-release/ubuntu/xenial/Dockerfile diff --git a/push.sh b/push.sh index fcaee71..8160f79 100755 --- a/push.sh +++ b/push.sh @@ -5,10 +5,18 @@ IMAGE="avvo/$(basename $(dirname $(dirname $(pwd))))" VERSION="$(basename $(dirname $(pwd)))" BASE="$(basename $(pwd))" TAG="${VERSION}-${BASE}" +LATEST_TAG="latest" + if [ -n "${1}" ]; then TAG="${TAG}-${1}" fi -docker build -t "${IMAGE}:${TAG}" -t "${IMAGE}:latest-${BASE}" . +if [ "${IMAGE}" == "avvo/elixir-release" ]; then + LATEST_TAG="${LATEST_TAG}-${VERSION}" +else + LATEST_TAG="${LATEST_TAG}-${BASE}" +fi + +docker build -t "${IMAGE}:${TAG}" -t "${IMAGE}:${LATEST_TAG}" . docker push "${IMAGE}:${TAG}" docker push "${IMAGE}:latest-${BASE}" From be6ae3f708e24617ea3e4247531ce6a5bb92936e Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Fri, 1 Nov 2019 15:09:41 -0700 Subject: [PATCH 10/15] update readme --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index 72227e2..4e37438 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,7 @@ RUN mix phx.digest RUN mix release -FROM avvo/alpine:3.9 - -RUN set -xe \ - && apk --no-cache upgrade \ - && apk add --no-cache \ - ncurses-libs \ - openssl +FROM avvo/elixir-release:alpine-3.9 EXPOSE 4000 From d44951a0adbe0907948ad5fc2d4f84cf5f5a3567 Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Fri, 1 Nov 2019 15:16:23 -0700 Subject: [PATCH 11/15] push latest with LATEST_TAG --- push.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/push.sh b/push.sh index 8160f79..d60ca10 100755 --- a/push.sh +++ b/push.sh @@ -19,4 +19,4 @@ fi docker build -t "${IMAGE}:${TAG}" -t "${IMAGE}:${LATEST_TAG}" . docker push "${IMAGE}:${TAG}" -docker push "${IMAGE}:latest-${BASE}" +docker push "${IMAGE}:${LATEST_TAG}" From 0da2f115c3c97ed73171a91556a13ab31f26630b Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Fri, 8 Nov 2019 12:56:01 -0800 Subject: [PATCH 12/15] add elixir 1.9.4 --- elixir/1.9.4/alpine/Dockerfile | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 elixir/1.9.4/alpine/Dockerfile diff --git a/elixir/1.9.4/alpine/Dockerfile b/elixir/1.9.4/alpine/Dockerfile new file mode 100644 index 0000000..c78d7f6 --- /dev/null +++ b/elixir/1.9.4/alpine/Dockerfile @@ -0,0 +1,36 @@ +FROM avvo/erlang:22-alpine + +# Adapted from: +# https://github.com/c0b/docker-elixir/blob/master/1.9/Dockerfile + +# elixir expects utf8. +ENV ELIXIR_VERSION="v1.9.4" \ + LANG=C.UTF-8 \ + MIX_ENV='test' + +RUN set -xe \ + && STARTING_DIR="$(pwd)" \ + && ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \ + && ELIXIR_DOWNLOAD_SHA256="f3465d8a8e386f3e74831bf9594ee39e6dfde6aa430fe9260844cfe46aa10139" \ + && buildDeps=' \ + ca-certificates \ + curl \ + make \ + ' \ + && apk --no-cache upgrade \ + && apk add --no-cache --virtual .build-deps $buildDeps \ + && curl -fSL -o elixir-src.tar.gz $ELIXIR_DOWNLOAD_URL \ + && echo "$ELIXIR_DOWNLOAD_SHA256 elixir-src.tar.gz" | sha256sum -c - \ + && mkdir -p /usr/local/src/elixir \ + && tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz \ + && rm elixir-src.tar.gz \ + && cd /usr/local/src/elixir \ + && make install clean \ + && apk del .build-deps \ + && mix local.hex --force \ + && mix local.rebar --force \ + && mkdir -p '/root/.ssh' \ + && apk add --no-cache openssh-client build-base npm git \ + && ssh-keyscan -t rsa github.com > '/root/.ssh/known_hosts' \ + && chmod 700 '/root/.ssh' \ + && chmod 600 '/root/.ssh/known_hosts' From e6a1560678bc0863d51c013df9cc67869345acf4 Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Fri, 8 Nov 2019 18:32:32 -0800 Subject: [PATCH 13/15] update readme --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4e37438..7b61e06 100644 --- a/README.md +++ b/README.md @@ -43,23 +43,21 @@ cd elixir/1.9.2/alpine Lower final image size by using multistage docker build and avvo/alpine image. ```Dockerfile -FROM avvo/elixir:1.9.2-alpine-otp22 AS build +FROM avvo/elixir:1.9.4-otp22-alpine-3.9 AS build ENV MIX_ENV=prod COPY . . -RUN mix do deps.get, deps.compile, compile - # If you have assets to build RUN cd assets \ && npm install \ && npm run deploy \ - && cd .. + && cd ../ RUN mix phx.digest -RUN mix release +RUN mix do deps.get, compile, release FROM avvo/elixir-release:alpine-3.9 @@ -67,7 +65,10 @@ EXPOSE 4000 WORKDIR /srv/app_name -COPY --from=build ./_build/prod/rel/app_name/ . +COPY --from=build ./_build/prod/app_name-APP_VERSION.tar.gz . + +RUN tar zxf app_name-APP_VERSION.tar.gz \ + && rm app_name-APP_VERSION.tar.gz ENTRYPOINT ["avvoenv", "exec"] CMD ["bin/app_name", "start"] From 03551a5e94fb8033ca01bcedcb078efbadec4e32 Mon Sep 17 00:00:00 2001 From: Rudolf M Date: Mon, 11 May 2020 12:14:01 -0700 Subject: [PATCH 14/15] added elixir 1.10.2 and erlang 22.3.2 --- elixir/1.10.2/alpine/Dockerfile | 34 +++++++++++++++++ erlang/22.3.2/alpine/Dockerfile | 66 +++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 elixir/1.10.2/alpine/Dockerfile create mode 100644 erlang/22.3.2/alpine/Dockerfile diff --git a/elixir/1.10.2/alpine/Dockerfile b/elixir/1.10.2/alpine/Dockerfile new file mode 100644 index 0000000..7da0209 --- /dev/null +++ b/elixir/1.10.2/alpine/Dockerfile @@ -0,0 +1,34 @@ +FROM avvo/erlang:22-alpine-11 + +# Adapted from: +# https://github.com/c0b/docker-elixir/blob/master/1.9/Dockerfile + +# elixir expects utf8. +ENV ELIXIR_VERSION="v1.10.2" \ + LANG=C.UTF-8 + +RUN set -xe \ + && ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \ + && ELIXIR_DOWNLOAD_SHA256="5adffcf4389aa82fcfbc84324ebbfa095fc657a0e15b2b055fc05184f96b2d50" \ + && buildDeps=' \ + ca-certificates \ + curl \ + make \ + ' \ + && apk --no-cache upgrade \ + && apk add --no-cache --virtual .build-deps $buildDeps \ + && curl -fSL -o elixir-src.tar.gz $ELIXIR_DOWNLOAD_URL \ + && echo "$ELIXIR_DOWNLOAD_SHA256 elixir-src.tar.gz" | sha256sum -c - \ + && mkdir -p /usr/local/src/elixir \ + && tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz \ + && rm elixir-src.tar.gz \ + && cd /usr/local/src/elixir \ + && make install clean \ + && apk del .build-deps \ + && mix local.hex --force \ + && mix local.rebar --force \ + && mkdir -p '/root/.ssh' \ + && apk add --no-cache openssh-client build-base npm git \ + && ssh-keyscan -t rsa github.com > '/root/.ssh/known_hosts' \ + && chmod 700 '/root/.ssh' \ + && chmod 600 '/root/.ssh/known_hosts' diff --git a/erlang/22.3.2/alpine/Dockerfile b/erlang/22.3.2/alpine/Dockerfile new file mode 100644 index 0000000..dae96fa --- /dev/null +++ b/erlang/22.3.2/alpine/Dockerfile @@ -0,0 +1,66 @@ +FROM avvo/alpine:3.11 + +# Adapted from: https://github.com/erlang/docker-erlang-otp/blob/master/22/alpine/Dockerfile + +ENV OTP_VERSION="22.3.2" \ + REBAR3_VERSION="3.13.1" + +RUN set -xe \ + && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ + && OTP_DOWNLOAD_SHA256="4a3719c71a7998e4f57e73920439b4b1606f7c045e437a0f0f9f1613594d3eaa" \ + && REBAR3_DOWNLOAD_SHA256="706cc0770062bde2674abc01964c68553398fe4d8023605b305cfe326b92520f" \ + && apk add --no-cache --virtual .fetch-deps \ + curl \ + ca-certificates \ + && curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \ + && echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \ + && apk add --no-cache --virtual .build-deps \ + dpkg-dev dpkg \ + gcc \ + g++ \ + libc-dev \ + linux-headers \ + make \ + autoconf \ + ncurses-dev \ + openssl-dev \ + unixodbc-dev \ + lksctp-tools-dev \ + tar \ + && export ERL_TOP="/usr/src/otp_src_${OTP_VERSION%%@*}" \ + && mkdir -vp $ERL_TOP \ + && tar -xzf otp-src.tar.gz -C $ERL_TOP --strip-components=1 \ + && rm otp-src.tar.gz \ + && ( cd $ERL_TOP \ + && ./otp_build autoconf \ + && gnuArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)" \ + && ./configure --build="$gnuArch" \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install ) \ + && rm -rf $ERL_TOP \ + && find /usr/local -regex '/usr/local/lib/erlang/\(lib/\|erts-\).*/\(man\|doc\|obj\|c_src\|emacs\|info\|examples\)' | xargs rm -rf \ + && find /usr/local -name src | xargs -r find | grep -v '\.hrl$' | xargs rm -v || true \ + && find /usr/local -name src | xargs -r find | xargs rmdir -vp || true \ + && scanelf --nobanner -E ET_EXEC -BF '%F' --recursive /usr/local | xargs -r strip --strip-all \ + && scanelf --nobanner -E ET_DYN -BF '%F' --recursive /usr/local | xargs -r strip --strip-unneeded \ + && runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )" \ + && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ + && curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \ + && echo "${REBAR3_DOWNLOAD_SHA256} rebar3-src.tar.gz" | sha256sum -c - \ + && mkdir -p /usr/src/rebar3-src \ + && tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 \ + && rm rebar3-src.tar.gz \ + && cd /usr/src/rebar3-src \ + && HOME=$PWD ./bootstrap \ + && install -v ./rebar3 /usr/local/bin/ \ + && rm -rf /usr/src/rebar3-src \ + && apk add --virtual .erlang-rundeps \ + $runDeps \ + lksctp-tools \ + ca-certificates \ + && apk del .fetch-deps .build-deps From c31eb7bdbd60b8699af6ec6d045c64a80f5e5ab3 Mon Sep 17 00:00:00 2001 From: Rudolf Manusadzhian Date: Thu, 17 Sep 2020 18:50:18 -0700 Subject: [PATCH 15/15] add elixir 1.10.4 and erlang 23.0.2 --- elixir/1.10.4/alpine/Dockerfile | 34 +++++++++++++++++ erlang/23.0.2/alpine/Dockerfile | 66 +++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 elixir/1.10.4/alpine/Dockerfile create mode 100644 erlang/23.0.2/alpine/Dockerfile diff --git a/elixir/1.10.4/alpine/Dockerfile b/elixir/1.10.4/alpine/Dockerfile new file mode 100644 index 0000000..742ec4e --- /dev/null +++ b/elixir/1.10.4/alpine/Dockerfile @@ -0,0 +1,34 @@ +FROM avvo/erlang:23.0.2-alpine + +# Adapted from: +# https://github.com/c0b/docker-elixir/blob/master/1.10/alpine/Dockerfile + +# elixir expects utf8. +ENV ELIXIR_VERSION="v1.10.4" \ + LANG=C.UTF-8 + +RUN set -xe \ + && ELIXIR_DOWNLOAD_URL="https://github.com/elixir-lang/elixir/archive/${ELIXIR_VERSION}.tar.gz" \ + && ELIXIR_DOWNLOAD_SHA256="8518c78f43fe36315dbe0d623823c2c1b7a025c114f3f4adbb48e04ef63f1d9f" \ + && buildDeps=' \ + ca-certificates \ + curl \ + make \ + ' \ + && apk --no-cache upgrade \ + && apk add --no-cache --virtual .build-deps $buildDeps \ + && curl -fSL -o elixir-src.tar.gz $ELIXIR_DOWNLOAD_URL \ + && echo "$ELIXIR_DOWNLOAD_SHA256 elixir-src.tar.gz" | sha256sum -c - \ + && mkdir -p /usr/local/src/elixir \ + && tar -xzC /usr/local/src/elixir --strip-components=1 -f elixir-src.tar.gz \ + && rm elixir-src.tar.gz \ + && cd /usr/local/src/elixir \ + && make install clean \ + && apk del .build-deps \ + && mix local.hex --force \ + && mix local.rebar --force \ + && mkdir -p '/root/.ssh' \ + && apk add --no-cache openssh-client build-base npm git \ + && ssh-keyscan -t rsa github.com > '/root/.ssh/known_hosts' \ + && chmod 700 '/root/.ssh' \ + && chmod 600 '/root/.ssh/known_hosts' diff --git a/erlang/23.0.2/alpine/Dockerfile b/erlang/23.0.2/alpine/Dockerfile new file mode 100644 index 0000000..82c9e50 --- /dev/null +++ b/erlang/23.0.2/alpine/Dockerfile @@ -0,0 +1,66 @@ +FROM avvo/alpine:3.11 + +# Adapted from: https://github.com/erlang/docker-erlang-otp/blob/master/22/alpine/Dockerfile + +ENV OTP_VERSION="23.0.2" \ + REBAR3_VERSION="3.13.2" + +RUN set -xe \ + && OTP_DOWNLOAD_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VERSION}.tar.gz" \ + && OTP_DOWNLOAD_SHA256="6bab92d1a1b20cc319cd845c23db3611cc99f8c99a610d117578262e3c108af3" \ + && REBAR3_DOWNLOAD_SHA256="e14cdc1f5b7d363a238a9f555f89e878bc4fc836c970571b41b90ee947f91505" \ + && apk add --no-cache --virtual .fetch-deps \ + curl \ + ca-certificates \ + && curl -fSL -o otp-src.tar.gz "$OTP_DOWNLOAD_URL" \ + && echo "$OTP_DOWNLOAD_SHA256 otp-src.tar.gz" | sha256sum -c - \ + && apk add --no-cache --virtual .build-deps \ + dpkg-dev dpkg \ + gcc \ + g++ \ + libc-dev \ + linux-headers \ + make \ + autoconf \ + ncurses-dev \ + openssl-dev \ + unixodbc-dev \ + lksctp-tools-dev \ + tar \ + && export ERL_TOP="/usr/src/otp_src_${OTP_VERSION%%@*}" \ + && mkdir -vp $ERL_TOP \ + && tar -xzf otp-src.tar.gz -C $ERL_TOP --strip-components=1 \ + && rm otp-src.tar.gz \ + && ( cd $ERL_TOP \ + && ./otp_build autoconf \ + && gnuArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)" \ + && ./configure --build="$gnuArch" \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install ) \ + && rm -rf $ERL_TOP \ + && find /usr/local -regex '/usr/local/lib/erlang/\(lib/\|erts-\).*/\(man\|doc\|obj\|c_src\|emacs\|info\|examples\)' | xargs rm -rf \ + && find /usr/local -name src | xargs -r find | grep -v '\.hrl$' | xargs rm -v || true \ + && find /usr/local -name src | xargs -r find | xargs rmdir -vp || true \ + && scanelf --nobanner -E ET_EXEC -BF '%F' --recursive /usr/local | xargs -r strip --strip-all \ + && scanelf --nobanner -E ET_DYN -BF '%F' --recursive /usr/local | xargs -r strip --strip-unneeded \ + && runDeps="$( \ + scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ + | tr ',' '\n' \ + | sort -u \ + | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ + )" \ + && REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION}.tar.gz" \ + && curl -fSL -o rebar3-src.tar.gz "$REBAR3_DOWNLOAD_URL" \ + && echo "${REBAR3_DOWNLOAD_SHA256} rebar3-src.tar.gz" | sha256sum -c - \ + && mkdir -p /usr/src/rebar3-src \ + && tar -xzf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 \ + && rm rebar3-src.tar.gz \ + && cd /usr/src/rebar3-src \ + && HOME=$PWD ./bootstrap \ + && install -v ./rebar3 /usr/local/bin/ \ + && rm -rf /usr/src/rebar3-src \ + && apk add --virtual .erlang-rundeps \ + $runDeps \ + lksctp-tools \ + ca-certificates \ + && apk del .fetch-deps .build-deps