Today we use rocky – Linux 8 5 installed docker composer and then gitea. An error was encountered during installation
services server Additional property db is not allowed
First of all, other errors were reported for the yml format problem. After the problem was resolved, the above error was reported. Some people on the Internet said that it is related to the version of docker-compose, but it is not. The docker version I use is 20.10.12, and the version of docker-compose is v2.2.2 (offline installation), finally check the yml format, where the mirror image gitea and mysql are not at the same level, mysql is used as a sub-layer of gitea, and gitea is depend-on mysql. You can adjust it to the same level later.
version: "3" networks: gitea: external: false services: server: image: gitea/gitea:1.15.7 container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 - DB_TYPE=mysql - DB_HOST=db:3306 - DB_NAME=gitea - DB_USER=gitea - DB_PASSWD=gitea restart: always networks: - gitea volumes: - ./gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" - "222:22" depends_on: - db db: image: mysql:8 restart: always environment: - MYSQL_ROOT_PASSWORD=gitea - MYSQL_USER=gitea - MYSQL_PASSWORD=gitea - MYSQL_DATABASE=gitea networks: - gitea volumes: - ./mysql:/var/lib/mysql
The reason for the error is that depends_on is db, and db and server are not at the same level. You can find the reason by comparing with online yml or a text editor.
- Docker-compose Run Error: Couldn’t connect to Docker daemon at http+docker://localhost – is it running?
- 【docker】 yaml.scanner.ScannerError: mapping values are not allowed here in “./docker-compo…
- [Solved] Docker ERROR: Couldn’t connect to Docker daemon at http+docker://localunixsocket – is it running?
- ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded
- [Solved] “/usr/local/bin/docker-compose: Permission denied”
- Ubuntu20.04 server Error: Failed to restart docker.service: Unit docker.service not found
- [Solved] cannot kill Docker container – permission denied
- [How to Solve] nodejs mysql ER_NOT_SUPPORTED_AUTH_MODE
- [Solved] http: server gave HTTP response to HTTPS client