Skip to content

Commit

Permalink
Merge pull request #119 from code-freak/fix/docker-image-size
Browse files Browse the repository at this point in the history
Reduce Docker image size by 1/3
  • Loading branch information
erikhofer committed Jul 2, 2019
2 parents c1cf19d + 18da0af commit 0c93f4f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Expand Up @@ -16,12 +16,14 @@ RUN apk add --no-cache gcompat

EXPOSE 8080

COPY --from=build /build/build/libs/ /app

# Run everything as unprivileged user
RUN addgroup -g 1000 code-freak \
&& adduser -Su 1000 -G code-freak code-freak \
&& mkdir /app \
&& chown -R code-freak:code-freak /app

COPY --from=build --chown=1000:1000 /build/build/libs/ /app

USER code-freak

# Override this when running the container with -e SPRING_PROFILES_ACTIVE="dev"
Expand Down

0 comments on commit 0c93f4f

Please sign in to comment.