summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorPeter Dave Hello <hsu@peterdavehello.org>2017-04-28 19:55:19 +0800
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-04-29 21:05:25 +0200
commit1562e9ab707f13e922ea52361fcdb663a14239fb (patch)
tree83169d3b389e76b2080e042a656fdeb991e72464 /Dockerfile
parente31c02d4bf055a9d2a107eb89e0d39062d70f606 (diff)
downloadgitea-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--Dockerfile9
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 \