我正在尝试在docker-compose中运行znc docker container。我尝试使用--makeconf
来关注文档,但我的配置出了问题。
$ docker-compose up
Starting server_znc_service_1 ... done
Attaching to server_znc_service_1
znc_service_1 | /entrypoint.sh: exec: line 6: znc: not found
server_znc_service_1 exited with code 127
搬运工-compose.yml
version: '3.2'
services:
znc_service:
image: library/znc
volumes:
- znc-cfg-volume:/znc-data
ports:
- "6697:6697"
environment:
VIRTUAL_HOST: "znc.localhost"
command: ["znc", "--makeconf"]
volumes:
znc-cfg-volume:
答案 0 :(得分:1)
首先编写没有开始的容器:
docker-compose up --no-start
然后,如果您尝试运行它,您将看到原因:
$ docker run -it znc
[ .. ] Checking for list of available modules...
[ >> ] ok
[ .. ] Opening config [/znc-data/configs/znc.conf]...
[ !! ] No such file
[ ** ] Restart ZNC with the --makeconf option if you wish to create this config.
[ ** ] Unrecoverable config error.
然后使用make conf:
运行docker run -it znc --makeconf
[ .. ] Checking for list of available modules...
[ >> ] ok
[ ** ]
[ ** ] -- Global settings --
[ ** ]
[ ?? ] Listen on port (1025 to 65534):