Skip to content

Commit 0277603

Browse files
zeripath6543noerwdelvh
authored
chmod executables when copying to the docker (#17423)
Run chmod on the executables and the entrypoint when copying them to the docker in dockerfile. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: delvh <dev.lh@web.de>
1 parent 649e1d0 commit 0277603

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,6 @@ CMD ["/bin/s6-svscan", "/etc/s6"]
6666
COPY docker/root /
6767
COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
6868
COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
69+
RUN chmod 755 /usr/bin/entrypoint /app/gitea/gitea /usr/local/bin/environment-to-ini
70+
RUN chmod 755 /etc/s6/gitea/* /etc/s6/openssh/* /etc/s6/.s6-svscan/*
6971
RUN ln -s /app/gitea/gitea /usr/local/bin/gitea

Dockerfile.rootless

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ENV GOPROXY ${GOPROXY:-direct}
99
ARG GITEA_VERSION
1010
ARG TAGS="sqlite sqlite_unlock_notify"
1111
ENV TAGS "bindata timetzdata $TAGS"
12-
ARG CGO_EXTRA_CFLAGS
12+
ARG CGO_EXTRA_CFLAGS
1313

1414
#Build deps
1515
RUN apk --no-cache add build-base git nodejs npm
@@ -55,6 +55,7 @@ RUN chown git:git /var/lib/gitea /etc/gitea
5555
COPY docker/rootless /
5656
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /usr/local/bin/gitea
5757
COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini
58+
RUN chmod 755 /usr/local/bin/docker-entrypoint.sh /app/gitea/gitea /usr/local/bin/environment-to-ini /usr/local/bin/docker-setup.sh
5859

5960
#git:git
6061
USER 1000:1000

0 commit comments

Comments
 (0)