dosubot[bot] commented on issue #30249:
URL: https://github.com/apache/superset/issues/30249#issuecomment-2345148981

   <!-- Greeting -->
   Hey @wuf-Gavin! I'm here to help you with any bugs, questions, or 
contributions you have for the project while you wait for a human maintainer. 
Let's squash those bugs together!
   
   <!-- Answer -->
   I found a similar open issue that might be related to your problem: 
[sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not 
translate host name "db" to address: Name or service not 
known](https://github.com/apache/superset/issues/29492) 
<sup>[[1]](https://github.com/apache/superset/issues/29492)</sup>. The 
suggested solution involves ensuring that the database service is up and 
running before starting Superset, checking the database configuration, and 
removing old database volumes.
   
   Additionally, there are known issues in the Superset Docker setup that could 
affect the `apt-get update` process. The Dockerfile includes multiple `apt-get 
update` commands followed by `apt-get install` commands, and it also includes 
the removal of `/var/lib/apt/lists/*` to clean up after installations. This can 
lead to issues if the `apt-get update` cache is not available when subsequent 
`apt-get install` commands are run 
<sup>[[2]](https://github.com/apache/superset/blob/master/Dockerfile)</sup>.
   
   To resolve the DNS resolution issue during the Docker build process, you can 
try the following steps:
   
   1. **Ensure Proper DNS Configuration:**
      Add the following to your `docker-compose.yml` to ensure proper DNS 
resolution:
      ```yml
      services:
        superset:
          extra_hosts:
            - "deb.debian.org:your-dns-server-ip"
      ```
   
   2. **Update Dockerfile:**
      Modify the Dockerfile to ensure `apt-get update` is run before any 
`apt-get install` commands and avoid removing the apt cache prematurely:
      ```dockerfile
      RUN apt-get update -qq && apt-get install -yqq --no-install-recommends \
          build-essential \
          python3 \
          zstd \
          && rm -rf /var/lib/apt/lists/*
      ```
   
   3. **Check Network Configuration:**
      Ensure that your Docker daemon is configured to use a reliable DNS 
server. You can set this in the Docker daemon configuration file 
(`/etc/docker/daemon.json`):
      ```json
      {
        "dns": ["8.8.8.8", "8.8.4.4"]
      }
      ```
      Then restart the Docker daemon:
      ```sh
      sudo systemctl restart docker
      ```
   
   These steps should help resolve the DNS resolution issue and ensure proper 
package installation during the Docker build process.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to