File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ cpu.out
7676/.go-licenses
7777Dockerfile
7878Dockerfile.rootless
79+
7980# Files and folders that were previously generated
8081/public /assets /img /webpack
8182
Original file line number Diff line number Diff line change @@ -26,6 +26,16 @@ RUN --mount=type=cache,target=/go/pkg/mod \
2626 --mount=type=bind,source=".git/" ,target=".git/" \
2727 make
2828
29+ COPY docker/root /tmp/local
30+
31+ # Set permissions for builds that made under windows which strips the executable bit from file
32+ RUN chmod 755 /tmp/local/usr/bin/entrypoint \
33+ /tmp/local/usr/local/bin/* \
34+ /tmp/local/etc/s6/gitea/* \
35+ /tmp/local/etc/s6/openssh/* \
36+ /tmp/local/etc/s6/.s6-svscan/* \
37+ /go/src/code.gitea.io/gitea/gitea
38+
2939FROM docker.io/library/alpine:3.22 AS gitea
3040
3141EXPOSE 22 3000
@@ -55,7 +65,7 @@ RUN addgroup \
5565 git && \
5666 echo "git:*" | chpasswd -e
5767
58- COPY docker/root /
68+ COPY --from=build-env /tmp/local /
5969COPY --chmod=755 --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
6070
6171ENV USER=git
Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ RUN --mount=type=cache,target=/go/pkg/mod \
2626 --mount=type=bind,source=".git/",target=".git/" \
2727 make
2828
29+ COPY docker/rootless /tmp/local
30+
31+ # Set permissions for builds that made under windows which strips the executable bit from file
32+ RUN chmod 755 /tmp/local/usr/local/bin/* \
33+ /go/src/code.gitea.io/gitea/gitea
34+
2935FROM docker.io/library/alpine:3.22 AS gitea-rootless
3036
3137EXPOSE 2222 3000
@@ -54,7 +60,7 @@ RUN addgroup \
5460RUN mkdir -p /var/lib/gitea /etc/gitea
5561RUN chown git:git /var/lib/gitea /etc/gitea
5662
57- COPY docker/rootless /
63+ COPY --from=build-env /tmp/local /
5864COPY --from=build-env --chmod=755 --chown=root:root /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea
5965
6066# git:git
You can’t perform that action at this time.
0 commit comments