-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Gitea docker: Configuration missing after upgrade from 1.21.0 to 1.21.1 #28230
Comments
Same here. Compose file is below! I should also mention that changing image to version: "3"
services:
gitea:
image: gitea/gitea:latest
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- TZ=US/Central
restart: unless-stopped
volumes:
- $local-path/git:/storage
- $local-path/gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3030:3000"
- "222:22" |
same problem here.
also mariadb gets crashed
|
It looks like some sort of permissions issue. In my case the the volume is chowned to user id 8133, and in my docker compose I have UID=8133, but when I go into the container uid 8133 doesn't exist and the data folder is inaccessible (permission denied). |
Same for me. Using Gitea with PostgreSQL and docker volumes for persistent storage.
|
Changing the user:group to 1000:1000 (I had 1001:1001 before) and adding GITEA_APP_INI solved the issue for me:
|
I had no permission issue, but adding |
Apparently they broke the default docker user by making the default user with UID=1000... this is a security problem because if the host's user with UID 1000 has sudo access, an attacker can attempt to abuse that. I can chown everything to UID=1000 to get it to work, but that sounds like a half-solution. This change has to be reverted. |
I dug a little into this and found that this change that enforces using UID 1000... WAS DONE IN 2016!!!!!!!!!!!!!!!!!! This is very confusing... was the docker image unchanged for 7 years?! |
Looking at image layers details from DockerHub, it seems like they uploaded the rootless version for the 1.21.1 rootfull release. + EXPOSE map[2222/tcp:{} 3000/tcp:{}]
- EXPOSE map[22/tcp:{} 3000/tcp:{}]
...
+ ENV GITEA_WORK_DIR=/var/lib/gitea
- ENV GITEA_CUSTOM=/data/gitea
+ ENV GITEA_CUSTOM=/var/lib/gitea/custom
+ ENV GITEA_TEMP=/tmp/gitea
+ ENV TMPDIR=/tmp/gitea
+ ENV GITEA_APP_INI=/etc/gitea/app.ini
+ ENV HOME=/var/lib/gitea/git
+ VOLUME [/var/lib/gitea /etc/gitea]
- VOLUME [/data]
+ WORKDIR /var/lib/gitea
... The image layers details from |
The issue is that the latest tag ended up getting the latest-rootless image. If you watch the hashes for the But if you watch the hash for 1.21.1 you can see that it is different. A fix would be to use version tag 1.21.1 i.e. image: gitea/gitea:1.21.1 In your docker-compose file until the latest tag is fixed and updated to be a 'rootful' docker image. In the 1.21.1 image the environment variable GITEA_CUSTOM=/data/gitea gets set which fixes the issue similarly to how as @Sharmii suggested. edit: |
@antoineraulin and @BossMBGaming thanks for figuring out the issue with tagging. Seems like the simplest workaround is to change Hopefully this gets fixed in the next few days. |
@antoineraulin & @BossMBGaming Thank you from me too! Some recent bad RAM on the host had me looking at database corruption for an hour before I found this issue and your solution. Was on the verge of pulling out more RAM and replacing. Lifesavers! |
Overwrote "latest" with contents of 1.21.1 so that it is correct. Sorry for all the troubles. Please re-open if you are still facing issues. |
Should fix #28229 and #28230 for next release. Assuming I'm reading the docs correctly for the docker meta action: https://github.com/docker/metadata-action#flavor-input https://github.com/docker/metadata-action#latest-tag 1. We want `latest=false` for the RCs. 2. `latest` should happen already due to `auto` mode, however there's an extra option for the `suffix` flavor. This PR is ready, but leaving it as draft to make sure someone double-checks my sleuth-work. Signed-off-by: jolheiser <john.olheiser@gmail.com>
Should fix go-gitea#28229 and go-gitea#28230 for next release. Assuming I'm reading the docs correctly for the docker meta action: https://github.com/docker/metadata-action#flavor-input https://github.com/docker/metadata-action#latest-tag 1. We want `latest=false` for the RCs. 2. `latest` should happen already due to `auto` mode, however there's an extra option for the `suffix` flavor. This PR is ready, but leaving it as draft to make sure someone double-checks my sleuth-work. Signed-off-by: jolheiser <john.olheiser@gmail.com>
Description
After pulling from the latest image (1.21.1) and restarting the docker container, the website starts with a completely new configuration.
A downgrade to 1.21.0. resolves it for the time being.
Gitea Version
1.21.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
dockerhub
How are you running Gitea?
dockerhub gitea/gitea
Database
MySQL/MariaDB
The text was updated successfully, but these errors were encountered: