我们现在想要创建开启在6380端口的redis服务。
{% file src="../.gitbook/assets/redis.conf" %}
FROM redis
COPY redis.conf /usr/local/redis/redis/config
CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
version: "3"
services:
redis_6380:
build:
context: .
dockerfile: Dockerfile
restart: always
ports:
- "6380:6380"
volumes:
- redis-db:/data
volumes:
redis-db:
启动docker服务
docker-compose up -d