deployment/docker: run docker apps under default user (0, root) in order to preserve backwards compatibility

If docker app is upgraded from root to non-root, then the data pointed by `-storageDataPath` or similar flags
becomes denied to non-root user after the upgrade. This breaks upgrade path. So revert back to default root user
for docker apps.

Users may explicitly execute `docker run --user <non_root_user>` for running docker apps under non-root user.
This commit is contained in:
Aliaksandr Valialkin 2020-03-28 18:51:05 +02:00
parent 7acb797595
commit 80f53e5396
2 changed files with 2 additions and 10 deletions

View File

@ -2,7 +2,7 @@
DOCKER_NAMESPACE := docker.io/victoriametrics
BUILDER_IMAGE := local/builder:go1.14.1
BASE_IMAGE := local/base:1.0.0
BASE_IMAGE := local/base:1.1.0
package-base:
(docker image ls --format '{{.Repository}}:{{.Tag}}' | grep -q '$(BASE_IMAGE)$$') \

View File

@ -3,14 +3,6 @@ FROM alpine:3.10 as base
RUN apk --update --no-cache add ca-certificates
RUN mkdir /future-tmp
FROM scratch
COPY --chown=0:0 ./passwd ./group /etc/
USER 1000
COPY --from=base --chown=1000:1000 /future-tmp /tmp
COPY --from=base --chown=1000:1000 /future-tmp /vmstorage-data
COPY --from=base --chown=1000:1000 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt