Skip to content

Commit

Permalink
packaging: update Dockerfile (#2563)
Browse files Browse the repository at this point in the history
* uses COPY instead of ADD following
 https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy
* prints alpine release version during build
* removes redundant commands
* does not touch Dockerfile.arm64 and Dockerfile.armv7 - they are almost
  identical to Dockerfile and we may unify and use a single Dockerfile
  for all builds later.

Followup on #2546

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
  • Loading branch information
AlexanderYastrebov authored Sep 1, 2023
1 parent 62b8dd1 commit 392dc7e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions packaging/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
ARG BASE_IMAGE=default
ARG BUILD_FOLDER=build
ARG TARGETPLATFORM

FROM registry.opensource.zalan.do/library/alpine-3:latest AS default
FROM ${BASE_IMAGE}
LABEL maintainer="Team Gateway&Proxy @ Zalando SE <team-gwproxy@zalando.de>"
RUN apk --no-cache add ca-certificates && update-ca-certificates
RUN mkdir -p /usr/bin
ARG BUILD_FOLDER=build
ARG TARGETPLATFORM
ADD ${BUILD_FOLDER}/${TARGETPLATFORM}/skipper \

RUN cat /etc/alpine-release \
&& apk --no-cache add ca-certificates \
&& update-ca-certificates

COPY ${BUILD_FOLDER}/${TARGETPLATFORM}/skipper \
${BUILD_FOLDER}/${TARGETPLATFORM}/eskip \
${BUILD_FOLDER}/${TARGETPLATFORM}/webhook \
${BUILD_FOLDER}/${TARGETPLATFORM}/routesrv /usr/bin/
ENV PATH $PATH:/usr/bin
${BUILD_FOLDER}/${TARGETPLATFORM}/routesrv \
/usr/bin/

EXPOSE 9090 9911

Expand Down

0 comments on commit 392dc7e

Please sign in to comment.