新手刚开始上手 docker ,在写 docker compose 的 yaml 配置文件时,
docker run -e MODE=standalone -p 80:80 -it adolfintel/speedtest
这种类似 -it
的参数,在 docker-compose.yml
配置文件里怎么表示?搜了好多资料好像也没提到...
是用
command:
- it
这样吗?
1
also24 2022-02-26 11:36:24 +08:00 1
|
2
runking 2022-02-26 11:41:35 +08:00 4
|
4
amrnxcdt 2022-02-26 15:07:00 +08:00 1
-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. |
7
also24 2022-02-26 15:55:34 +08:00
|