-
Notifications
You must be signed in to change notification settings - Fork 6
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
A few quick thoughts #1
Comments
Thanks, @cboettig! A few quick responses:
Yep, right here; students are definitely going to want to be able to pull files (results) out of the docker bubble universe, and this is the simplest way.
Thanks again, great suggestions all! |
Yup, |
Its not necessary to prefix the docker command with sudo on Linux. Add your username to the docker group in /etc/groups and reboot the machine and you no longer need to use sudo. |
Just taking a quick look over this, looks very nice.
Will you cover linking local directories? In my experience, this helps the whole thing feel a lot more native to users than the typical virtualbox approach. https://github.com/rocker-org/rocker/wiki/Sharing-files-with-host-machine
Curious what you think about one thing: our docs show using the 8787 port, but I can't decide if it would be easier for users if we just mapped to port 80 instead (e.g.
-p 80:8787
instead of-p 80:8787
) to avoid that extra step of appending a port onto an IP (which sounds pretty convoluted the first time anyhow). But maybe that's asking for trouble.Good that you cover the basics of listing and killing a container; I've seen a new user be confused by trying to launch a second instance and not realizing one is already running (and getting the error about port already bound). However, seems you should really emphasize that this destroys any data in the container (unless you link local volumes; which is one reason why I like to teach that part).
Personally I would probably teach
docker commit
anddocker push
before teaching anything aboutDockerfiles
. This way users can install software on an image interactively via RStudio and save the image. Note thatcommit
saves changes to files on the container unless those files are actually on a linked local volume, in which case they are external to the container and then not saved. Maybe easier not to teach linking local volumes so you don't hit that issue... If you are not linking local files, this is another convenient way to save your work and even move it between machines (particularly cloud instances); though you'll want to use the 1 free private DockerHub repo to push to if you include the local data.I would also consider teaching a few
docker-machine
commands. Given that Docker Toolbox is nowdocker-machine
under the hood, this makes the leap from local to cloud instance crazy easy. You can get some free cloud credits or just practice via virtualbox.Minor thing, but in your "Writing Dockerfiles" section, perhaps your goal is to stick to generic commands, but we usually find it easier to add additional packages with
littler
, e.g.install2.r -e gapminder
instead ofwget
+R CMD INSTALL
(e.g. see our Dockerfiles). But maybe it's worse to introduce littler and Dockerfiles.The text was updated successfully, but these errors were encountered: