Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some file perms are incorrect in the docker image built from Windows #17400

Closed
FlyingOnion opened this issue Oct 22, 2021 · 3 comments · Fixed by #17423
Closed

Some file perms are incorrect in the docker image built from Windows #17400

FlyingOnion opened this issue Oct 22, 2021 · 3 comments · Fixed by #17423
Labels
topic/distribution This PR changes something about the packaging of Gitea

Comments

@FlyingOnion
Copy link

Gitea Version

1.15.3

Git Version

No response

Operating System

Windows 10 64bit

How are you running Gitea?

Run

git clone --depth 1 --branch v1.15.3 https://github.com/go-gitea/gitea.git
cd gitea
docker build -t mygitea:1.15.3 .

Database

SQLite

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Description

Run

docker run --rm --entrypoint ls mygitea:1.15.3 /usr/bin/entrypoint -al
-rw-r--r--    1 root     root           883 Oct 22 14:42 /usr/bin/entrypoint

Screenshots

No response

@FlyingOnion
Copy link
Author

FlyingOnion commented Oct 22, 2021

If I run it directly it will report an error

docker run -d --rm mygitea:1.15.3
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/usr/bin/entrypoint": permission denied: unknown.

Consider adding RUN chmod 755 /usr/bin/entrypoint after

COPY docker/root /

or use ENTRYPOINT ["sh", "/usr/bin/entrypoint"]

ENTRYPOINT ["/usr/bin/entrypoint"]

@wxiaoguang
Copy link
Contributor

You can not build it from Windows now, otherwise all files under docker/root lose their +x attribute, not only entrypoint. You still meet problems if you only patch the entrypoint.

The question is: should Gitea support to be built from Windows? Need advice from maintainers.

@zeripath
Copy link
Contributor

This particular thing seems like a simple fix without any bad side-effects therefore I think we should do it - however, I think to some extent this building will have to be self-supported.

@wxiaoguang wxiaoguang linked a pull request Oct 25, 2021 that will close this issue
@wxiaoguang wxiaoguang changed the title Entrypoint permission Some file perms are incorrect in the docker image built from Windows Oct 25, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
@delvh delvh added topic/distribution This PR changes something about the packaging of Gitea and removed theme/docker labels Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/distribution This PR changes something about the packaging of Gitea
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants