cherry-pick: 4326 improve dockerfile

Updates #4326.

* commit 'f987c2559825923b22e910d01c2d42fb06231acc':
  scripts: imp docs; upd alpine
  Simplify Dockerfile Alpine Linux apk usage
This commit is contained in:
Ainar Garipov 2022-06-14 20:12:31 +03:00 committed by Ainar Garipov
parent 0e8445b38f
commit 32cf02264c
2 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,6 @@
# A docker file for scripts/make/build-docker.sh.
FROM alpine:3.13
FROM alpine:3.16
ARG BUILD_DATE
ARG VERSION
@ -21,8 +21,7 @@ LABEL\
org.opencontainers.image.version=$VERSION
# Update certificates.
RUN apk --no-cache --update add ca-certificates libcap tzdata && \
rm -rf /var/cache/apk/* && \
RUN apk --no-cache add ca-certificates libcap tzdata && \
mkdir -p /opt/adguardhome/conf /opt/adguardhome/work && \
chown -R nobody: /opt/adguardhome

View File

@ -50,6 +50,11 @@ readonly docker_image_name
# Set DOCKER_OUTPUT to 'type=image,name=adguard/adguard-home,push=true' if you
# want (and are allowed) to push to DockerHub.
#
# If you want to inspect the resulting image using commands like "docker image
# ls", change type to docker and also set docker_platforms to a single platform.
#
# See https://github.com/docker/buildx/issues/166.
docker_output="${DOCKER_OUTPUT:-type=image,name=${docker_image_name},push=false}"
readonly docker_output