Doctor's AppPath might be different when run inside Docker #6760

Closed
opened 2025-11-02 07:05:49 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @CirnoT on GitHub (Jan 26, 2021).

I run gitea with this command:

docker run -d --restart=always --publish 3000:3000 \
--publish 22:22 --network gitea \
-v /opt/gitea:/data \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
-e USER_UID=1218 -e USER_GID=1218 \
-e GITEA_WORK_DIR=/data/gitea -e GITEA_CUSTOM=/data/gitea/custom \
--name=gitea gitea/gitea:latest

The AppPath is /app/gitea/gitea and such is written to authorized_keys, however when executing docker exec -ti gitea su git bash -c "cd /data/gitea/log && gitea doctor" the AppPath is /usr/local/bin/gitea. This issue leads to doctor always complaining that authorized_keys is out of date.

Originally created by @CirnoT on GitHub (Jan 26, 2021). I run gitea with this command: ``` docker run -d --restart=always --publish 3000:3000 \ --publish 22:22 --network gitea \ -v /opt/gitea:/data \ -v /etc/timezone:/etc/timezone:ro \ -v /etc/localtime:/etc/localtime:ro \ -e USER_UID=1218 -e USER_GID=1218 \ -e GITEA_WORK_DIR=/data/gitea -e GITEA_CUSTOM=/data/gitea/custom \ --name=gitea gitea/gitea:latest ``` The AppPath is `/app/gitea/gitea` and such is written to authorized_keys, however when executing `docker exec -ti gitea su git bash -c "cd /data/gitea/log && gitea doctor"` the AppPath is `/usr/local/bin/gitea`. This issue leads to doctor always complaining that authorized_keys is out of date.
GiteaMirror added the topic/distributiontype/bug labels 2025-11-02 07:05:49 -06:00
Author
Owner

@CirnoT commented on GitHub (Jan 26, 2021):

This can be mitigated by using docker exec -ti gitea su git bash -c "cd /data/gitea/log && /app/gitea/gitea doctor", i.e explicitly providing /app/gitea/gitea as path

@CirnoT commented on GitHub (Jan 26, 2021): This can be mitigated by using `docker exec -ti gitea su git bash -c "cd /data/gitea/log && /app/gitea/gitea doctor"`, i.e explicitly providing `/app/gitea/gitea` as path
Author
Owner

@zeripath commented on GitHub (Feb 12, 2021):

I suspect it would be easier to change the docker PATH to place /app/gitea/ on the PATH before /use/local/bin

Another option would be to change the docker exec to run /use/local/bin/gitea instead of /app/gitea/gitea but I think that would no doubt cause other issues with data paths etc.

@zeripath commented on GitHub (Feb 12, 2021): I suspect it would be easier to change the docker PATH to place /app/gitea/ on the PATH before /use/local/bin Another option would be to change the docker exec to run /use/local/bin/gitea instead of /app/gitea/gitea but I think that would no doubt cause other issues with data paths etc.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6760