如何在Docker中指定运行参数?
问题描述:
如果我开始couchbase同步网关容器中手动我执行以下命令:如何在Docker中指定运行参数?
docker run -p 4984-4985:4984-4985 -d --name couchbase-synch-gateway -v C:/temp/:/tmp/config/ couchbase/sync-gateway -adminInterface :4985 /tmp/config/couchbase-synch-config.json
当我使用泊坞窗撰写文件,我不知道如何指定文件运行参数:
-adminInterface :4985
我的搬运工撰写文件看起来像这样:
version: "3"
services:
couchbase-server:
image: couchbase
container_name: lab-couchbase-server
ports:
- 8091:8091
- 8092:8092
- 8093:8093
- 8094:8094
- 11210:11210
sync-gateway:
image: couchbase/sync-gateway:1.4.0-2
container_name: lab-sync-gateway
ports:
- 4984:4984
- 4985:4985
volumes:
- ./couchbase-synch-config.json:/etc/sync_gateway/config.json
答
使用command
sync-gateway:
image: couchbase/sync-gateway:1.4.0-2
container_name: lab-sync-gateway
ports:
- 4984:4984
- 4985:4985
volumes:
- ./couchbase-synch-config.json:/etc/sync_gateway/config.json
command: your command here
多见于documentation。