[英]postgres container exited cannot restart because 'chmod: changing permissions of '/var/lib/postgresql/data': Permission denied'
If anyone could help me would be much appreciated.如果有人可以帮助我,将不胜感激。 I'm running postgres container on centos machine where it runs with no problem for over a year already, and it suddenly exited for whatever reason.
我在 centos 机器上运行 postgres 容器,它已经运行了一年多没有问题,但由于某种原因突然退出。 I tried to re start the container with
docker start
but it exited immediately with error chmod: changing permissions of '/var/lib/postgresql/data': Permission denied
.我尝试使用
docker start
重新启动容器,但它立即退出并出现错误chmod: changing permissions of '/var/lib/postgresql/data': Permission denied
。 I can't lose the data, so what would be the best way to solve this issue?我不能丢失数据,那么解决此问题的最佳方法是什么?
Here's my docker-compose这是我的 docker-compose
version: '2'
services:
app:
container_name: garvan_rems_app
environment:
AUTHENTICATION: :oidc
DATABASE_URL: postgresql://db:5432/rems?user=rems&password=*****
PORT: 3000
PUBLIC_URL: <-URL->
oidc-client-id: ***********************
oidc-client-secret: *****************
oidc-domain: *****.au.auth0.com
image: garvan_rems_app
mem_limit: 500m
mem_reservation: 200m
ports:
- 0.0.0.0:3000:3000/tcp
db:
container_name: garvan_rems_db
image: postgres:9.6
environment:
POSTGRES_USER: ***
POSTGRES_PASSWORD: ******
mem_reservation: 30m
mem_limit: 150m
ports:
- "127.0.0.1:5432:5432"
auth0:
container_name: garvan_rems_auth0
image: <auth0 image name>
ports:
- "0.0.0.0:3333:3333"
Could you please send your docker-compose.yml or dockerfile.yml with command which you have started your container您能否使用您已启动容器的命令发送您的 docker-compose.yml 或 dockerfile.yml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.