The document said that command is the command executed by default after the container is started.http://wiki.jikexueyuan.com/project/docker-technology-and-combat/yaml_file.html
command: bundle exec thin -p 3000
So, where is the container’s default execution command viewed?
Can you take the official nginx image of Docker Hub as an example?
docker run nginx && docker ps --no-truncThe command column is the command executed by default.
If there is a Dockerfile, it is usually the last line.
CMD commands can be
docker runThe following command overrides, but ENTRYPOINT’s does not
Whether CMD or ENTRYPOINT has more than one Dockerfile, only the last one will be executed.
For example, this (doc run-rmnginx: stable-alpine/bin/sh) you will find that nginx is not running
Command in docker-compose.yml is specified after docker run