- Docker Error
I encountered it when I tried to
$ docker-compose up -d --build
ERROR:
for docker-compose_jupyternotebook_sql_adminer_1 Cannot start service adminer: driver failed programming external coCreating docker-compose_jupyternotebook_sql_db_1 ... error
d1220a2d3): Bind for 0.0.0.0:8080 failed: port is already allocated
- Cause
The port what I tried is already allocated to somewhere so it is unavailable to docker-compose up.
- Solution
First of all, check which container is using the port what I want to.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c87a1909ffaf docker-compose_jupyternotebook_sql_jupyter "/bin/sh -c 'jupyter…" 57 seconds ago Up 55 seconds 0.0.0.0:80->8888/tcp, :::80->8888/tcp docker-compose_jupyternotebook_sql_jupyter_1
68fa26a34f87 mysql "docker-entrypoint.s…" About a minute ago Up About a minute 33060/tcp, 0.0.0.0:3307->3306/tcp, :::3307->3306/tcp docker-compose_jupyternotebook_sql_db_1
78b874e0ff01 adminer "entrypoint.sh docke…" 3 days ago Up 3 days 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp sql_adminer_1 ## I gotcha
474024424eca mysql "docker-entrypoint.s…" 3 days ago Up 3 days 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp sql_db_1
1d6752535c1c jupyter:1.0 "/bin/sh -c 'jupyter…" 4 weeks ago Up 4 weeks 8888/tcp distracted_perlman
And then kill it.
Joohyuns-MacBook-Pro:SQL joohyunyoon$ docker-compose down
Stopping sql_adminer_1 ... done
Stopping sql_db_1 ... done
Removing sql_adminer_1 ... done
Removing sql_db_1 ... done
Removing network sql_default
And then try to docker-compose up. And boom!
'Docker' 카테고리의 다른 글
docker-compose, environment-2 ways how to run (0) | 2022.02.03 |
---|---|
The way how to find remote jupyter server(after connect two different containers) (0) | 2022.01.28 |
Docker error:You have to remove (or rename) that container to be able to reuse that name. (0) | 2021.11.23 |
Docker Project 3-DockerCompose, Elasticsearch (0) | 2021.11.16 |
Docker Project 2-Docker, Jupyternotebook (0) | 2021.11.12 |