mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +01:00
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:
parent
7acb797595
commit
80f53e5396
@ -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)$$') \
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user