Explorar el Código

fix: dockerfile user from UID to username

Eugene Davis hace 3 años
padre
commit
f57e738156
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 2 2
      Dockerfile
  2. 2 2
      Dockerfile.dev

+ 2 - 2
Dockerfile

@@ -20,7 +20,7 @@ WORKDIR /app
 RUN adduser radicale --home /var/lib/radicale --system --uid 1000 --disabled-password \
     && apk add --no-cache ca-certificates openssl
 
-COPY --chown=1000 --from=builder /app/venv /app
+COPY --chown=radicale --from=builder /app/venv /app
 
 # Persistent storage for data
 VOLUME /var/lib/radicale
@@ -30,4 +30,4 @@ EXPOSE 5232
 ENTRYPOINT [ "/app/bin/python", "/app/bin/radicale"]
 CMD ["--hosts", "0.0.0.0:5232"]
 
-USER 1000
+USER radicale

+ 2 - 2
Dockerfile.dev

@@ -18,7 +18,7 @@ WORKDIR /app
 RUN adduser radicale --home /var/lib/radicale --system --uid 1000 --disabled-password \
     && apk add --no-cache ca-certificates openssl
 
-COPY --chown=1000 --from=builder /app/venv /app
+COPY --chown=radicale --from=builder /app/venv /app
 
 # Persistent storage for data
 VOLUME /var/lib/radicale
@@ -28,4 +28,4 @@ EXPOSE 5232
 ENTRYPOINT [ "/app/bin/python", "/app/bin/radicale"]
 CMD ["--hosts", "0.0.0.0:5232"]
 
-USER 1000
+USER radicale