Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFS File Systems with Mismatched UID/GID don't work due to how the cache dir is set up. #41

Open
simeononsecurity opened this issue Jan 25, 2023 · 2 comments

Comments

@simeononsecurity
Copy link

simeononsecurity commented Jan 25, 2023

I'm often having to run chmod and chown to get it working properly. However because of this I have to rerun this every time I restart the docker container. These folders shouldn't be handled on the image. They should be mountpoints that you should have to pass to the image.

I can fix this. Please let me know and I'll work on a MR.

@abueide
Copy link

abueide commented Jul 3, 2023

@simeononsecurity i'm really struggling with this and I don't know what I'm doing could you point me in the right direction?

  • name: Create NFS volume
    command: >
    docker volume create
    --driver local
    --opt type=nfs
    --opt o=addr={{ nfs_server }},{{ nfs_opts }}
    --opt device=:{{ nfs_path }}
    {{ nfs_vol_name }}

  • name: Pull apt-cacher-ng Docker image
    docker_image:
    name: sameersbn/apt-cacher-ng:latest
    source: pull

  • name: Run apt-cacher-ng container
    command: >
    docker run -d --restart always --name apt_cacher_ng -p 3142:3142 -v {{ nfs_vol_name }}:/var/cache/apt-cacher-ng:nocopy sameersbn/apt-cacher-ng:latest

    but I get this

    andrea@apt:~$ sudo docker logs 3df
    chown: changing ownership of '/var/cache/apt-cacher-ng': Operation not permitted
    chown: changing ownership of '/var/cache/apt-cacher-ng': Operation not permitted
    chown: changing ownership of '/var/cache/apt-cacher-ng': Operation not permitted
    chown: changing ownership of '/var/cache/apt-cacher-ng': Operation not permitted
    chown: changing ownership of '/var/cache/apt-cacher-ng': Operation not permitted

@simeononsecurity
Copy link
Author

,@abueide I ended up having too many issues with this image. I found another that worked better. Called acng.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants