How to pass arguments to entrypoint in docker-compose.yml

前端 未结 5 2034
醉话见心
醉话见心 2020-12-12 15:35

I use this image: dperson/samba

The image is defining it\'s own entrypoint and I do not want to override it.

I need to pass arguments to the entrypoint, easy

5条回答
  •  盖世英雄少女心
    2020-12-12 15:58

    You can use docker-compose run instead of docker-compose up and tack the arguments on the end. For example:

    docker-compose run dperson/samba arg1 arg2 arg3
    

    If you need to connect to other docker containers, use can use --service-ports option:

    docker-compose run --service-ports dperson/samba arg1 arg2 arg3
    

提交回复
热议问题