我在 dockerfile: 中使用端口 8082 ENV FILESERVER_PORT 8082
。
当启动seafile时:
sudo bash /opt/seafile/seafile-server-6.3.4/seafile.sh start
我收到错误http-server.c(2197): Could not bind socket: Address already in use
我尝试删除ccnet.sock
并重新启动 docker。那行不通。
Netstat 显示:
tcp6 0 0 :::8082 :::* LISTEN 4993/docker-proxy
tcp6 0 0 :::8090 :::* LISTEN 5321/docker-proxy
tcp6 0 0 :::8000 :::* LISTEN 5007/docker-proxy
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 899/mysqld
须藤码头工人 PS:
#####:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
############ mdh_seafile "/bin/sh -c 'bash /s…" 23 minutes ago Up 3 minutes 0.0.0.0:8000->8000/tcp, 0.0.0.0:8082->8082/tcp mdh_seafile_1_f2341d904d27
############ mdh_owncloud "/bin/sh -c 'bash /s…" 22 hours ago Up 3 minutes 0.0.0.0:8090->80/tcp mdh_owncloud_1_260c3a56f2a5
############ mysql "docker-entrypoint.s…" 26 hours ago Up 3 minutes 3306/tcp, 33060/tcp mdh_db_1_46bebe733124
我尝试更改 docker-compose 中的端口:
ports:
- "8000:8000"
- "8082:8082
到
ports:
- "8001:8001"
- "8083:8083
但它只是告诉我同样的事情。
netstat 也只显示一个输出:
sudo netstat -pna | grep 8082
tcp6 0 0 :::8082 :::* LISTEN 19685/docker-proxy