# develop.yml
redis:
image: redis
command: redis-server --requirepass 123
ports:
- '6379:6379'
expose:
- "6379
docker-compose -f develop.yml up redis
显示:
docker-compose -f develop.yml up redis
Starting django-blog_redis_1 ... done
Attaching to django-blog_redis_1
redis_1 | 1:C 16 Nov 2018 03:52:46.935 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1 | 1:C 16 Nov 2018 03:52:46.935 # Redis version=5.0.1, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1 | 1:C 16 Nov 2018 03:52:46.935 # Configuration loaded
redis_1 | 1:M 16 Nov 2018 03:52:46.935 # Creating Server TCP listening socket *:6379: unable to bind socket, errno: 13
我检查端口:
fuser -k -n tcp 6379
但没有使用6379。
我该如何解决?
答案 0 :(得分:1)
我的操作系统:深度Linux。
问题似乎出在深度方面。
执行以下命令以解决该问题:
sudo apt remove apparmor