dockerfiles
dockerfiles copied to clipboard
Podman - Premissions issue, unable to create directory
Setup information
I am trying to run rootless with podman. Here is my docker-compose
setup
version: "3.7"
services:
app:
image: docker.io/invoiceninja/invoiceninja:5
volumes:
- /opt/invoiceninja/app/public:/var/www/app/public:z
- /opt/invoiceninja/app/storage:/var/www/app/storage:z
depends_on:
- db
environment:
- APP_ENV=production
- APP_DEBUG=0
- APP_URL=http://localhost:8003
- APP_KEY=<redacted>
- APP_CIPHER=AES-256-CBC
- DB_HOST=db
- DB_DATABASE=ninja
- DB_USERNAME=ninja
- DB_PASSWORD=ninja
- DB_PORT=3306
ports:
- "8003:80"
db:
image: docker.io/mysql:8
ports:
- "3305:3306"
volumes:
- /opt/invoiceninja/mysql/data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=<redacted>
- MYSQL_USER=ninja
- MYSQL_PASSWORD=ninja
- MYSQL_DATABASE=ninja
networks:
default:
external:
name: npm-proxy-manager_default
As I have read in the various issues here, the common ask is to ensure permissions are set as per the readme. Here is the output of ls -l
drwxrwxr-x 4 1500 1500 4096 May 7 08:54 app
-rw-rw-r-- 1 osuser osuser 943 May 7 08:53 docker-compose.yml
drwxrwxr-x 3 osuser osuser 4096 May 7 08:43 mysql
ls -l app
total 8
drwxr-xr-x 2 1500 1500 4096 May 7 08:53 public
drwxrwxr-x 2 1500 1500 4096 May 7 08:54 storage
I would assume the permissions are sorted for this.
Describe the bug
Upon starting containers, the app
container exists immediately, and below are the logs
cp: can't create directory '/var/www/app/storage/app': Permission denied
Expected behavior
I was hoping to get invoiceninja started and served on http://localhost:8003
Docker/Kubernetes/Helm:
- Output of
podman version
:
Version: 3.4.4
API Version: 3.4.4
Go Version: go1.17.3
Built: Thu Jan 1 00:00:00 1970
OS/Arch: linux/amd64