Commit d6bee38a authored by Igor Velkov's avatar Igor Velkov

Choose architecture when download tini into docker container

parent b6dfe072
...@@ -30,14 +30,19 @@ RUN cd $SRC_DIR \ ...@@ -30,14 +30,19 @@ RUN cd $SRC_DIR \
# and tini, a very minimal init daemon for containers # and tini, a very minimal init daemon for containers
ENV SUEXEC_VERSION v0.2 ENV SUEXEC_VERSION v0.2
ENV TINI_VERSION v0.18.0 ENV TINI_VERSION v0.18.0
RUN set -x \ RUN set -eux; \
&& cd /tmp \ dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
"amd64" | "armhf" | "arm64") tiniArch="tini-$dpkgArch" ;;\
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
esac; \
cd /tmp \
&& git clone https://github.com/ncopa/su-exec.git \ && git clone https://github.com/ncopa/su-exec.git \
&& cd su-exec \ && cd su-exec \
&& git checkout -q $SUEXEC_VERSION \ && git checkout -q $SUEXEC_VERSION \
&& make \ && make \
&& cd /tmp \ && cd /tmp \
&& wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/tini \ && wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/$tiniArch \
&& chmod +x tini && chmod +x tini
# Now comes the actual target image, which aims to be as small as possible. # Now comes the actual target image, which aims to be as small as possible.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment