V
V
Vladimir Kuts2020-06-02 11:24:48
Docker
Vladimir Kuts, 2020-06-02 11:24:48

Trouble restarting a container?

There is a certain container that starts, collects data, sends results and completes its work:

docker-compose.yml

services:
    sonarqube-client:
        image: boube/sonarqube-client
        env_file: .env
        volumes:
           - ./:/opt/site
        container_name: sonarqube-client
        working_dir: /opt/site
        command: sonar-scanner -Dsonar.projectKey=$SONAR_KEY -Dsonar.sources=/opt/site/src  -Dsonar.host.url=$SONAR_HOST -Dsonar.login=$SONAR_LOGIN -X


Runs normally:
docker-compose -f docker-compose.yml up -d

Everything is fine - but there is a problem when running again
ERROR: for sonarqube-client  Cannot start service sonarqube-client: network 07b57dedf276dabf2ad767139d45a6cb45ba5f2b38516c03b3ac88ce075ea61f not found

which is treated
docker system prune

How to avoid it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
smilingcheater, 2020-06-02
@fox_12

Swears that he cannot find a network with some strange name. You probably need to do something so that the name of the network adapter (?) does not change. Have you tried setting specific network settings in docker compose? https://docs.docker.com/compose/networking/
Describe the network section

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question