新手刚开始上手 docker ,在写 docker compose 的 yaml 配置文件时,
docker run -e MODE=standalone -p 80:80 -it adolfintel/speedtest 这种类似 -it 的参数,在 docker-compose.yml 配置文件里怎么表示?搜了好多资料好像也没提到...
是用
command: - it 这样吗?

新手刚开始上手 docker ,在写 docker compose 的 yaml 配置文件时,
docker run -e MODE=standalone -p 80:80 -it adolfintel/speedtest 这种类似 -it 的参数,在 docker-compose.yml 配置文件里怎么表示?搜了好多资料好像也没提到...
是用
command: - it 这样吗?
1 also24 Feb 26, 2022 |
2 runking Feb 26, 2022 |
4 amrnxcdt Feb 26, 2022 -it 是 docker cli 的参数。https://docs.docker.com/engine/reference/commandline/run/#examples This example runs a container named test using the debian:latest image. The -it instructs Docker to allocate a pseudo-TTY connected to the container’s stdin; creating an interactive bash shell in the container. In the example, the bash shell is quit by entering exit 13. This exit code is passed on to the caller of docker run, and is recorded in the test container’s metadata. |