ORM engine initialization attempt #2/10 failed. Error: dial tcp: lookup db on 127.0.0.11:53: no such host #9149

Closed
opened 2025-11-02 08:30:48 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @dawnflyc on GitHub (Jun 29, 2022).

Description

version: "3"

networks:
gitea:
external: false

services:
server:
image: gitea/gitea:1.16.8
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=mysql
- GITEA__database__HOST=db:3306
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=WicBPGpekDYS7rRB
restart: always
networks:
- gitea
ports:
- "3000:3000"
- "222:22"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- /gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

Gitea Version

1.16.8

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

debian

How are you running Gitea?

docker-compose up

Database

MySQL

Originally created by @dawnflyc on GitHub (Jun 29, 2022). ### Description version: "3" networks: gitea: external: false services: server: image: gitea/gitea:1.16.8 container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 - GITEA__database__DB_TYPE=mysql - GITEA__database__HOST=db:3306 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=WicBPGpekDYS7rRB restart: always networks: - gitea ports: - "3000:3000" - "222:22" extra_hosts: - "host.docker.internal:host-gateway" volumes: - /gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ### Gitea Version 1.16.8 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System debian ### How are you running Gitea? docker-compose up ### Database MySQL
GiteaMirror added the type/bug label 2025-11-02 08:30:48 -06:00
Author
Owner

@dawnflyc commented on GitHub (Jun 29, 2022):

Docker container access host error

@dawnflyc commented on GitHub (Jun 29, 2022): Docker container access host error
Author
Owner

@hxcode commented on GitHub (Jul 7, 2022):

how do you solve this problem, I solved this by edit the compose yml config file.

  • GITEA__database__HOST=172.XX.XX.XX:3306

replace the db to db container subnet ip address.

@hxcode commented on GitHub (Jul 7, 2022): how do you solve this problem, I solved this by edit the compose yml config file. - GITEA__database__HOST=172.XX.XX.XX:3306 replace the db to db container subnet ip address.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9149