mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-24 22:42:42 +01:00
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.
This commit is contained in:
parent
e31c02d4bf
commit
1562e9ab70
3 changed files with 9 additions and 18 deletions
|
@ -3,8 +3,7 @@ MAINTAINER Thomas Boerger <thomas@webhippie.de>
|
||||||
|
|
||||||
EXPOSE 22 3000
|
EXPOSE 22 3000
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk -U --no-cache add \
|
||||||
apk add \
|
|
||||||
su-exec \
|
su-exec \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
sqlite \
|
sqlite \
|
||||||
|
@ -14,10 +13,8 @@ RUN apk update && \
|
||||||
s6 \
|
s6 \
|
||||||
curl \
|
curl \
|
||||||
openssh \
|
openssh \
|
||||||
tzdata && \
|
tzdata
|
||||||
rm -rf \
|
RUN addgroup \
|
||||||
/var/cache/apk/* && \
|
|
||||||
addgroup \
|
|
||||||
-S -g 1000 \
|
-S -g 1000 \
|
||||||
git && \
|
git && \
|
||||||
adduser \
|
adduser \
|
||||||
|
|
|
@ -2,8 +2,7 @@ FROM aarch64/alpine:3.5
|
||||||
|
|
||||||
EXPOSE 22 3000
|
EXPOSE 22 3000
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk -U --no-cache add \
|
||||||
apk add \
|
|
||||||
su-exec \
|
su-exec \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
sqlite \
|
sqlite \
|
||||||
|
@ -13,10 +12,8 @@ RUN apk update && \
|
||||||
s6 \
|
s6 \
|
||||||
curl \
|
curl \
|
||||||
openssh \
|
openssh \
|
||||||
tzdata && \
|
tzdata
|
||||||
rm -rf \
|
RUN addgroup \
|
||||||
/var/cache/apk/* && \
|
|
||||||
addgroup \
|
|
||||||
-S -g 1000 \
|
-S -g 1000 \
|
||||||
git && \
|
git && \
|
||||||
adduser \
|
adduser \
|
||||||
|
|
|
@ -3,8 +3,7 @@ MAINTAINER Thomas Boerger <thomas@webhippie.de>
|
||||||
|
|
||||||
EXPOSE 22 3000
|
EXPOSE 22 3000
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk -U --no-cache add \
|
||||||
apk add \
|
|
||||||
su-exec \
|
su-exec \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
sqlite \
|
sqlite \
|
||||||
|
@ -14,10 +13,8 @@ RUN apk update && \
|
||||||
s6 \
|
s6 \
|
||||||
curl \
|
curl \
|
||||||
openssh \
|
openssh \
|
||||||
tzdata && \
|
tzdata
|
||||||
rm -rf \
|
RUN addgroup
|
||||||
/var/cache/apk/* && \
|
|
||||||
addgroup \
|
|
||||||
-S -g 1000 \
|
-S -g 1000 \
|
||||||
git && \
|
git && \
|
||||||
adduser \
|
adduser \
|
||||||
|
|
Loading…
Reference in a new issue