I'm trying to migrate from manually invoking docker like this:
docker run -v /tmp/bazel:/data -p 9090:8080 buchgr/bazel-remote-cache --max_size=1300
to using a docker-compose.yml file, but cannot seem to know how to pass the --max_size to the container from it:
version: "3"
services:
worker:
image: buchgr/bazel-remote-cache
deploy:
mode: replicated
replicas: 2
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
ports:
- 9090:8080
- 6060:6060
#args:
#- max_size=1300
volumes:
- "/bazel_cache:/data"
visualizer:
image: dockersamples/visualizer:stable
ports:
- 8080:8080
stop_grace_period: 1m30s
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
What am I missing here? I've tried the args: .. bit but docker complains about it:
$ docker stack deploy -c docker-compose.yml bazel_remote_cache
args Additional property args is not allowed