Skip to content

Commit

Permalink
Optimize docker image build (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
mageddo authored Aug 23, 2019
1 parent bf2c277 commit 4584d3b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.arm7x86
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ ADD build/dns-proxy-server-linux-arm-*.tgz /app/
WORKDIR /app
LABEL dps.container=true
VOLUME ["/var/run/docker.sock", "/var/run/docker.sock"]
CMD ["bash", "-c", "/app/dns-proxy-server"]
ENTRYPOINT ["/app/dns-proxy-server"]
2 changes: 1 addition & 1 deletion Dockerfile.arm8x64
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ ADD build/dns-proxy-server-linux-arm64-*.tgz /app/
WORKDIR /app
LABEL dps.container=true
VOLUME ["/var/run/docker.sock", "/var/run/docker.sock"]
CMD ["bash", "-c", "/app/dns-proxy-server"]
ENTRYPOINT ["/app/dns-proxy-server"]
14 changes: 8 additions & 6 deletions Dockerfile.hub
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM debian:10-slim
WORKDIR /app
FROM debian:10-slim AS BUILDER
ENV TMP_NAME=/tmp/dns-proxy-server.tgz
RUN apt-get update && apt-get install --force-yes -y curl &&\
RUN apt-get update && apt-get install -y curl &&\
curl -L https://github.com/mageddo/dns-proxy-server/releases/download/2.17.2/dns-proxy-server-linux-amd64-2.17.2.tgz > $TMP_NAME && \
tar -xvf $TMP_NAME -C /app/ &&\
rm -r /tmp && apt-get purge -y curl && apt-get clean
mkdir /app && tar -xvf $TMP_NAME -C /app

FROM debian:10-slim
LABEL dps.container=true
WORKDIR /app
COPY --from=BUILDER /app /app
VOLUME ["/var/run/docker.sock", "/var/run/docker.sock"]
CMD ["bash", "-c", "/app/dns-proxy-server"]
ENTRYPOINT ["/app/dns-proxy-server"]
3 changes: 3 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 2.17.3
* Separating the build image from final image, removing unnecessary bash command

### 2.17.2
* Fixing docker build was using deprecated apt-get option

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.17.2
2.17.3

0 comments on commit 4584d3b

Please sign in to comment.