diff options
author | Lauris BH | 2020-11-16 03:44:41 +0200 |
---|---|---|
committer | GitHub | 2020-11-15 20:44:41 -0500 |
commit | 8c2b5feeaef96601c578bc26db7925586f552456 (patch) | |
tree | b08be7ae40b8febd65e0a55316f3d20675d250fe /Dockerfile.rootless | |
parent | 22a8df3405a93a233d99f3bcb8c87787abdebd78 (diff) |
When building rootless docker image move chown&chmod to build stage (#13578)
* When building rootless docker image move chown&chmod to build stage
Fixes #13577
* Fix command newlines
* Move chown to COPY command
* Seems to be working also without chmod
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'Dockerfile.rootless')
-rw-r--r-- | Dockerfile.rootless | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Dockerfile.rootless b/Dockerfile.rootless index 6c98c099d..7dbd8b021 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -50,8 +50,7 @@ RUN mkdir -p /var/lib/gitea /etc/gitea RUN chown git:git /var/lib/gitea /etc/gitea COPY docker/rootless / -COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /usr/local/bin/gitea -RUN chown root:root /usr/local/bin/* && chmod 755 /usr/local/bin/* +COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /usr/local/bin/gitea USER git:git ENV GITEA_WORK_DIR /var/lib/gitea |