From 7d0629adf859bebbbefcfbc5dedb457b75a7ce00 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 1 Dec 2021 18:08:27 +0000 Subject: Use shadowing script for docker (#17846) Too many docker users are caught out by the default location for the app.ini file being environment dependent so that when they docker exec into the container the gitea commands do not work properly and require additional -c arguments to correctly pick up the configuration. This PR simply shadows the gitea binary using variants of the FHS compatible script to make the command gitea have the default locations by default. Fix #14468 Reference #17497 Reference #12082 Reference #8941 ... amongst others ... Replace #17501 Signed-off-by: Andrew Thornton --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 69a8cdbec1..5bf06064a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -66,6 +66,5 @@ CMD ["/bin/s6-svscan", "/etc/s6"] COPY docker/root / COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini -RUN chmod 755 /usr/bin/entrypoint /app/gitea/gitea /usr/local/bin/environment-to-ini +RUN chmod 755 /usr/bin/entrypoint /app/gitea/gitea /usr/local/bin/gitea /usr/local/bin/environment-to-ini RUN chmod 755 /etc/s6/gitea/* /etc/s6/openssh/* /etc/s6/.s6-svscan/* -RUN ln -s /app/gitea/gitea /usr/local/bin/gitea -- cgit v1.2.3