简体   繁体   中英

Docker entrypoint doesn't find command

I am trying to run the znc docker container in docker-compose. I have tried to follow the docs, using --makeconf , but something's wrong with my config.

$ 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

docker-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:

First of all compose container with no-start:

docker-compose up --no-start

Then if you try to run it, you will see reasons:

$ 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.

Then just run with make conf:

docker run -it znc --makeconf
[ .. ] Checking for list of available modules...
[ >> ] ok
[ ** ]
[ ** ] -- Global settings --
[ ** ]
[ ?? ] Listen on port (1025 to 65534):

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM