diff options
author | Peter Dave Hello <hsu@peterdavehello.org> | 2017-04-28 19:55:19 +0800 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-04-29 21:05:25 +0200 |
commit | 1562e9ab707f13e922ea52361fcdb663a14239fb (patch) | |
tree | 83169d3b389e76b2080e042a656fdeb991e72464 /Dockerfile | |
parent | e31c02d4bf055a9d2a107eb89e0d39062d70f606 (diff) | |
download | gitea-1562e9ab707f13e922ea52361fcdb663a14239fb.tar.gz gitea-1562e9ab707f13e922ea52361fcdb663a14239fb.zip |
Refactor Dockerfile
1. Use `apk -U --no-cache add` instead of `apk update` + `apk add` +
manually cache clean up.
2. Separate package installation and user, group setup, the combination
to reduce a docker image layer didn't bring benefits here, only makes
Dockerfiles more complex.
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile index 2d47a18ba6..02e22e801d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,7 @@ MAINTAINER Thomas Boerger <thomas@webhippie.de> EXPOSE 22 3000 -RUN apk update && \ - apk add \ +RUN apk -U --no-cache add \ su-exec \ ca-certificates \ sqlite \ @@ -14,10 +13,8 @@ RUN apk update && \ s6 \ curl \ openssh \ - tzdata && \ - rm -rf \ - /var/cache/apk/* && \ - addgroup \ + tzdata +RUN addgroup \ -S -g 1000 \ git && \ adduser \ |