I can't seem to solve this question, even though it seems that this has been answered here:
I am trying to run the rocker/tensorflow Docker container in Ubuntu 20.04 but I also need it to access the following folder /home/au687614/Documents/LUCAS_ML
So I tried to follow this answer and run this:
docker run -d -p 8787:8787 -v $(pwd):/home/au687614/Documents/LUCAS_ML:/home/rstudio/LOOKATMEEE -e ROOT=TRUE rocker/tensorflow
This however gets me the following error:
docker: Error response from daemon: invalid mode: /home/rstudio/LOOKATMEEE.
See 'docker run --help'
What is my mistake?
A correct syntax would be:
docker run -d -p 8787:8787 -e PASSWORD=yourpassword -v /path/to/your/local/folder:/home/rstudio/LOOKATMEEE:rw rocker/tensorflow
This comes from this e-book where you can find explanations about the syntax and other Docker essentials explained.
Related
Please I really need your help when I try to execute this command
root#Graphite:~# docker run -d\
--name graphite
--restart=always
-v /path/to/graphite/configs:/opt/graphite/conf
-v /path/to/graphite/data:/opt/graphite/storage
-v /path/to/statsd_config:/opt/statsd/config
graphiteapp/graphite-statsd
I receive this message
docker: Error response from daemon: Conflict. The container name "/grafana" is already in use by container "f6b2d471d737a". You have to remove (or rename) that container to be able to reuse that name.
please I need your help I've used Docker to install graphite it's working but I want files to be locally and I don't have this much knowledge about linux this why I need your help
I keep getting this error even my repo name is lowercase, the code i´m running is this sudo docker container run --rm -p 3838:3838 -v /home/ubuntu/la-liga-2018-2019-stats/stats/:/srv/shiny-server/stats -v /home/ubuntu/log/shiny-server/:/var/log/shiny-server/
BorisRendon/shinyauth. I´m trying to deploy a shiny app to aws using docker and i can´t pass this step.
You should probably use docker run and not docker container run.
After having given up on other means to document my R analysis environment(s) properely with the aim of analysis reproducibility, I'm setting out, to wrap each individual analysis into a docker container.
Here is what I do:
Pull the latest rstudio container from the rocker project:
docker pull rocker/rstudio
Create a project-specific copy
docker run -d -p 8787:8787 rocker/rstudio # Produces baseID
docker commit --message="Snapshot of current rocker/rstudio container" <baseID> rstudio_project.2018
docker stop <baseID>
Fire up the container:
docker run -d -p 8787:8787 -e ROOT=TRUE rstudio_project.2018 # produces ID
R(Studio)- based project analysis ... finishing with sudo apt-get clean and sudo rm -rf /tmp/*
Export a docker image:
docker export -o docker_rstudio_project.2018.tar <ID>
xz docker_rstudio_project.2018.tar
After having deleted all related containers/images from my local registry, I try to emulate the revisit of the packaged project like so:
Import the container:
docker import docker_rstudio_project.2018.tar.xz rstudio_project.2018.2
(Try to) Fire up container as was done for the original:
docker run -d -p 8787:8787 -e ROOT=TRUE rstudio_project.2018.2
I am then faced with the following error:
docker: Error response from daemon: No command specified.
What am I doing wrong? Where did the container loose (what) information on what to start by default?
The export and import commands only handle the file system, not metadata like what command to run. Use save and load instead. See also https://github.com/moby/moby/issues/1826
There are a ton of little-upvoted questions about how to address local folders from inside a docker container, but I can't find one that quite matches mine, so here goes another one:
How can I run a docker container, and mount a local folder so that it's accessible by R/RStudio, inside the container?
That sounds kind of like: mounting local home directory in Rstudio docker? and using an approach similar to that, I can start a container and mount a volume:
docker run -d -p 8787:8787 -v $HOME/my_folder:/LOOKATMEEE -e ROOT=TRUE rocker/tidyverse:3.4
and if I run a bash shell in the container, I can see the folder:
docker exec -it 38b2d6ca427f bash
> ls
bin dev home lib LOOKATMEEE mnt proc run srv tmp var boot etc init lib64 media opt root sbin sys usr
# ^ there is is!
But if I go connect to RStudio server at localhost:8787, I don't see it in the files pane, nor does it show up when run list.files() in the R console:
I'm sure I'm missing something basic, but if someone can tell me what that is... thank you!
In this circumstance, R and RStudio have a default working directory of /home/rstudio, two levels down from /, where I was telling docker to mount the folder.
After the docker run command in the question, you can go list.files('/') to see the folder.
If you want your folder to show up in the default working directory for R, as I do, then modify docker run like this:
docker run -d -p 8787:8787 -v $HOME/my_folder:/home/rstudio/LOOKATMEEE -e ROOT=TRUE rocker/tidyverse:3.4
and there it shall be:
Thank you to user alistaire.
This answer is for future generations :)
The concept is a "match" of the resource from the host with the container:
:
The command structure should be like this:
docker run -d -e PASSWORD= -p 8787:8787 -v
: /home/rstudio/ rocker/rstudio
Check the explanation here
I am a bit new to docker and I have been trying to run deploy a meteor container with my meteor application. I have been using the dockerfile and instructions from https://registry.hub.docker.com/u/golden/meteor-dev/
However, I cant run docker run -p 3000:3000 -t -i -v /path/to/meteor/app:/opt/application -w /opt/application meteor-dev because my docker (version 0.5.3) does not recognize the flag (-w) to set the working directory.
Is there some workaround to set the working directory with docker 0.5.3? The work directory is already set in the docker file, but I guess I need to set it again when I run the container.
well, my workaround was to create a bash script that would go to the working directory and call the commands one by one. I created the bash script where my source is located "/path/to/meteor/app" and call docker run -p 3000:3000 -t -i -v /path/to/meteor/app:/opt/application meteor-dev bash /opt/application/start.sh with the bash as command and my script as argument