Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker-compose equivalent for docker run arguments like "--foo bar" in compose file?

Given the following docker run command:

  -p 80:80 -p 443:443 \
  rancher/rancher:latest \
  --acme-domain <YOUR.DNS.NAME>

What is the notation for writing --acme-domain in the docker-compose file? I was not able to find this in the docs. Thanks

like image 386
Markus Avatar asked Sep 16 '25 07:09

Markus


1 Answers

Everything after the image name in your docker run command line is the "command", which gets executed either by the shell or by your ENTRYPOINT script. The equivalent docker-compose directive is command. For example:

service:
  image: rancher/rancher:latest
  ports:
    - "80:80"
    - "443:443"
  command: "--acme-domain <YOUR.DNS.NAME>"
  ...
like image 137
larsks Avatar answered Sep 19 '25 15:09

larsks