- Docker Error
ERROR: for es01 Cannot create container for service es01: Conflict. The container name "/es01" is already in use by container "7053980c5df7207f8629e57a7b573fd7fc38b7e32e49a1b40e42c8f33a11f188". You have to remove (or rename) that container to be able to reuse that name.
- Cause
I had same name container.
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
75fecccb0357 docker-compose_jupyternotebook_jupyter "/bin/sh -c 'jupyter…" 12 seconds ago Up 11 seconds 0.0.0.0:8888->8888/tcp, :::8888->8888/tcp docker-compose_jupyternotebook_jupyter_1
f620576d4bb1 workspace_jupyter "/bin/sh -c 'jupyter…" 6 days ago Exited (137) 6 days ago workspace_jupyter_1
7053980c5df7 docker.elastic.co/elasticsearch/elasticsearch:7.15.1 "/bin/tini -- /usr/l…" 6 days ago Exited (137) 6 days ago es01
- Solution
Remove that container.
$ docker-compose down
...
$ docker rm -f es01
es01
$ docker rm -f workspace_jupyter_1
workspace_jupyter_1
And then, build again.
$ docker-compose up --build
Creating network "docker-compose_jupyternotebook_elastic" with driver "bridge"
Building jupyter
[+] Building 2.2s (14/14) FINISHED
...
Creating es01 ... done
Creating docker-compose_jupyternotebook_jupyter_1 ... done
...
'Docker' 카테고리의 다른 글
The way how to find remote jupyter server(after connect two different containers) (0) | 2022.01.28 |
---|---|
Docker error:port is already allocated (0) | 2022.01.28 |
Docker Project 3-DockerCompose, Elasticsearch (0) | 2021.11.16 |
Docker Project 2-Docker, Jupyternotebook (0) | 2021.11.12 |
Docker Project 1-Docker environment, build, volume, logs (0) | 2021.11.08 |