Refactor Dockerfile for smaller and less layer image

Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
This commit is contained in:
Peter Dave Hello 2018-10-24 20:59:17 +08:00
parent 775fa06102
commit d25aefbf8d
5 changed files with 5 additions and 10 deletions

View File

@ -7,11 +7,10 @@ ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/dow
RUN apt-get update && \
apt-get install -y curl procps && \
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / && \
bash -ex docker-install.sh 2>&1 && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
mv /init /s6-init
RUN apt-get update && bash -ex docker-install.sh 2>&1
ENTRYPOINT [ "/s6-init" ]
ADD s6/debian-root /

View File

@ -7,11 +7,10 @@ ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/dow
RUN apt-get update && \
apt-get install -y curl procps && \
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / && \
bash -ex docker-install.sh 2>&1 && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
mv /init /s6-init
RUN apt-get update && bash -ex docker-install.sh 2>&1
ENTRYPOINT [ "/s6-init" ]
ADD s6/debian-root /

View File

@ -7,11 +7,10 @@ ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/dow
RUN apt-get update && \
apt-get install -y curl procps && \
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / && \
bash -ex docker-install.sh 2>&1 && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
mv /init /s6-init
RUN apt-get update && bash -ex docker-install.sh 2>&1
ENTRYPOINT [ "/s6-init" ]
ADD s6/debian-root /

View File

@ -7,11 +7,10 @@ ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/dow
RUN apt-get update && \
apt-get install -y curl procps && \
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / && \
bash -ex docker-install.sh 2>&1 && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
mv /init /s6-init
RUN apt-get update && bash -ex docker-install.sh 2>&1
ENTRYPOINT [ "/s6-init" ]
ADD s6/debian-root /

View File

@ -7,11 +7,10 @@ ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/dow
RUN apt-get update && \
apt-get install -y curl procps && \
curl -L -s $S6OVERLAY_RELEASE | tar xvzf - -C / && \
bash -ex docker-install.sh 2>&1 && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
mv /init /s6-init
RUN apt-get update && bash -ex docker-install.sh 2>&1
ENTRYPOINT [ "/s6-init" ]
ADD s6/debian-root /