fix: add --chown to Dockerfile COPY so RUN can write api/_version.py (#793)
The v0.50.124 Docker build failed with: cannot create /apptoo/api/_version.py: Permission denied Root cause: 'USER hermeswebuitoo' is set before 'COPY . /apptoo', but COPY without --chown creates files owned by root. The subsequent RUN step (which writes api/_version.py) runs as hermeswebuitoo and has no write permission to the root-owned api/ directory. Fix: COPY --chown=hermeswebuitoo:hermeswebuitoo so the unprivileged user owns the app files and can write _version.py at build time. Regression from #790. Co-authored-by: nesquena-hermes <hermes@nesquena.com>
This commit is contained in:
@@ -76,7 +76,7 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=/usr/local/b
|
||||
|
||||
USER hermeswebuitoo
|
||||
|
||||
COPY . /apptoo
|
||||
COPY --chown=hermeswebuitoo:hermeswebuitoo . /apptoo
|
||||
|
||||
# Bake the git version tag into the image so the settings badge works even
|
||||
# when .git is not present (it is excluded by .dockerignore).
|
||||
|
||||
Reference in New Issue
Block a user