Permalink
Browse files

improve docker layers using COPY --chown

  • Loading branch information...
Kuqd authored and markmandel committed Jan 9, 2019
1 parent 9646141 commit 6cb002e95df4c43fdde5320c60f7f33f1955b3a8
Showing with 3 additions and 12 deletions.
  1. +1 −4 cmd/controller/Dockerfile
  2. +1 −4 cmd/ping/Dockerfile
  3. +1 −4 cmd/sdk-server/Dockerfile
@@ -3,10 +3,7 @@ FROM alpine:3.8
RUN apk --update add ca-certificates && \
adduser -D agones

COPY ./bin/controller /home/agones/controller

RUN chown -R agones /home/agones && \
chmod o+x /home/agones/controller
COPY --chown=agones:root ./bin/controller /home/agones/controller

USER agones
ENTRYPOINT ["/home/agones/controller"]
@@ -17,10 +17,7 @@ FROM alpine:3.8
RUN apk --update add ca-certificates && \
adduser -D agones

COPY ./bin/ping /home/agones/ping

RUN chown -R agones /home/agones && \
chmod o+x /home/agones/ping
COPY --chown=agones:root ./bin/ping /home/agones/ping

USER agones
ENTRYPOINT ["/home/agones/ping"]
@@ -3,10 +3,7 @@ FROM alpine:3.8
RUN apk --update add ca-certificates && \
adduser -D agones

COPY ./bin/sdk-server.linux.amd64 /home/agones/sdk-server

RUN chown -R agones /home/agones && \
chmod o+x /home/agones/sdk-server
COPY --chown=agones:root ./bin/sdk-server.linux.amd64 /home/agones/sdk-server

USER agones
ENTRYPOINT ["/home/agones/sdk-server"]

0 comments on commit 6cb002e

Please sign in to comment.