What I want to do is this:
version: '2'
services:
app:
volumes:
- .:/app
image: redis-test
entrypoint: /app/src/main.rb
working_dir: /app
links:
- redis
redis:
image: redis
args:
- appendonly=yes
When I run docker-compose up
it complains:
Unsupported config option for services.redis: 'args'
Is this possible?
EDIT
More context: http://redis.io/topics/persistence#append-only-file
Yes, you can do this using command
, but first you need to take a look at what the default command is in the redis Dockerfile .
This should work for you:
redis:
image: redis
command: redis-server --appendonly yes
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.