Open txomon opened 6 years ago
I think that comment is only for use with docker-compose. If you're mounting a local filesystem on a host machine, I don't see how docker could safely perform a chown without a massive security breach. Plus, the folder does already belong to the correct user:
$ docker run --rm -it stevearc/pypicloud /bin/sh -c "ls -ld /var/lib/pypicloud"
drwxr-xr-x 2 pypicloud pypicloud 4096 Aug 14 15:24 /var/lib/pypicloud
If you want to use it this way you'll have to either make sure that the mounted directory is very open (chmod 777
) or you could chown it to the pypicloud user before running the docker command. Since that user doesn't exist on your host machine, you'll have to use the raw UID/GID:
$ docker run --rm -it stevearc/pypicloud /bin/sh -c "id pypicloud"
uid=999(pypicloud) gid=999(pypicloud) groups=999(pypicloud)
$ chown 999:999 pypicloud
Just in case, I solved this by running as root. Would you be interested on a pypicloud helm chart?
I have developed it for the use of local storage (PVC backed) + local (config.ini secret) auth, and I would be happy to share.
Sure! I've not played with Kubernetes at all; it would be neat to see. Could be useful to include in the repo as an example like I've done with the compose files
I'm also looking to store the packages in a volume mounted locally. None of the three approaches seem to work for me (run as root, open permissions, changing ownership of local directory to pypicloud
).
I figured file storage backing mounted as a local volume would be a fairly general use case. Is this not recommended?
I believe the vast majority of users prefer to store packages in S3 or GCS, as it's pretty simple and way more durable than the disk of an individual machine.
I have been running into trouble when running the docker image with the file backend.
The line I have been using is
docker run -p 8080:8080 -v (pwd)/config.ini:/etc/pypicloud/config.ini:ro -v (pwd)/pypicloud:/var/lib/pypicloud stevearc/pypicloud
According to https://github.com/docker/compose/issues/3270#issuecomment-206214034 we have to add a chown on the folder to have a proper mount
config.ini
for easy reproduction of the problem:https://github.com/docker/compose/issues/3270#issuecomment-206214034