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

Using docker container #20

Open
fabio-marcelo opened this issue Aug 16, 2024 · 1 comment
Open

Using docker container #20

fabio-marcelo opened this issue Aug 16, 2024 · 1 comment

Comments

@fabio-marcelo
Copy link

Hi @haubold .
I've been trying to use de docker image haubold/fox and I think I have a permission issue.
When running the container (docker run -it --detach-keys="ctrl-@" haubold/fox:latest) I can't access the files inside the path I'm in, even trying to mount (docker run --rm --user $(echo $UID):$(echo $UID) -it -v $(pwd):/data/ haubold/fox:latest).

But if run docker run --rm -it -v $(pwd):/app/ haubold/fox:latest ls -l /app I can see the directory content as below:

total 28
drwxr-xr-x 2 root root  4096 Aug 16 13:19 fur
drwxrwxr-x 2 jdoe jdoe 12288 Aug 16 14:39 neigbors_mplutonius
drwxrwxr-x 2 jdoe jdoe  4096 Aug 16 14:28 neigbors_plarvae
drwxrwxr-x 2 jdoe jdoe  4096 Aug 16 14:21 target_mplutonius
drwxrwxr-x 2 jdoe jdoe  4096 Aug 16 14:19 target_plarvae

How can I fix this permission issue, please?

@haubold
Copy link
Contributor

haubold commented Aug 19, 2024

I'm not an expert on docker, but as far as I know, a docker container does no allow direct access to the surrounding file system. However, you can copy to and from a running container. To do so, find the id of the container you'd like to target, by executing on the host system

docker ps

Say this is 5486ac5100aa, then copy from the host system to the appropriate directory inside the container.

docker cp neighbors_mplutonius 5486ac5100aa:/home/jdoe/
docker cp target_mplutonius 5486ac5100aa:/home/jdoe/

Inside the container you can now to run the fur analysis.

makeFurDb -t target_mplutonius -n neighbors_mplutonius -d mplutonius.db
fur -d mplutonius.db

Hope this helps.

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