Skip to content

Commit

Permalink
optional stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
HeidiSeibold authored and ttimbers committed Apr 1, 2016
1 parent 4685db5 commit 3a4ce64
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions 02-Launching-Docker.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ The first thing we need to do to launch Docker is to open a Unix Shell. If you'r

Next, we will ask Docker to run an image that already exists, we will use the hadleyverse Docker image from [Rocker](https://github.com/rocker-org/rocker/wiki) which will allow us to run RStudio inside the container and has many useful R packages already installed.

**call-out box**
`p` and `--rm` are flags that allow you to customize how you run the container. `p` tells Docker that you will be using a port (the location of which we specify afterwards as `8787:8787`). This is necessary to run RStudio in the container. Finally, --rm ensures that when we quit the container, the container is deleted. If we did not do this, everytime we run a container, a version of it will be saved to our local computer. This can lead to the eventual wastage of a lot of disk space until we manually remove these containers. Later we will show you how to save your container if you want to do so.
Optional:
*`p` and `--rm` are flags that allow you to customize how you run the container. `p` tells Docker that you will be using a port (the location of which we specify afterwards as `8787:8787`). This is necessary to run RStudio in the container. Finally, --rm ensures that when we quit the container, the container is deleted. If we did not do this, everytime we run a container, a version of it will be saved to our local computer. This can lead to the eventual wastage of a lot of disk space until we manually remove these containers. Later we will show you how to save your container if you want to do so.*

~~~
docker run --rm -p 8787:8787 rocker/hadleyverse
~~~

[//]: # (**TODO: call-out box**)
If you try to run a Docker container which you have not installed locally then Docker will automatically search for the container on Docker Hub (an online repository for docker images) and download it if it exists.
Optional:
*If you try to run a Docker container which you have not installed locally then Docker will automatically search for the container on Docker Hub (an online repository for docker images) and download it if it exists.*

The command above will lead RStudio-Server to launch invisibly. To connect to it, open a browser and enter `http://`, followed by your ip address, followed by `:8787`. If you are running a Mac or Windows machine, you will find the ip address on the first line of text that appeared in your terminal when you launched the Docker Quickstart Terminal. For example, you should see:

Expand Down
4 changes: 2 additions & 2 deletions 02-Launching-Docker.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ <h2>Installation</h2>
<h2>Launching RStudio in Docker</h2>
<p>The first thing we need to do to launch Docker is to open a Unix Shell. If you’re on Mac or Windows, in the last step you installed something called the <em>Docker Quickstart Terminal</em>; open that up now - it should look like just a plain shell prompt (<code>~$</code>), but really it’s pointing at a linux virtual machine that Docker likes to run in, and this is where you should do everything for the rest of this tutorial unless otherwise noted. If you’re on a linux machine, then you can just use a plain old terminal prompt.</p>
<p>Next, we will ask Docker to run an image that already exists, we will use the hadleyverse Docker image from <a href="https://github.com/rocker-org/rocker/wiki">Rocker</a> which will allow us to run RStudio inside the container and has many useful R packages already installed.</p>
<p><strong>call-out box</strong> <code>p</code> and <code>--rm</code> are flags that allow you to customize how you run the container. <code>p</code> tells Docker that you will be using a port (the location of which we specify afterwards as <code>8787:8787</code>). This is necessary to run RStudio in the container. Finally, –rm ensures that when we quit the container, the container is deleted. If we did not do this, everytime we run a container, a version of it will be saved to our local computer. This can lead to the eventual wastage of a lot of disk space until we manually remove these containers. Later we will show you how to save your container if you want to do so.</p>
<p>Optional: <em><code>p</code> and <code>--rm</code> are flags that allow you to customize how you run the container. <code>p</code> tells Docker that you will be using a port (the location of which we specify afterwards as <code>8787:8787</code>). This is necessary to run RStudio in the container. Finally, –rm ensures that when we quit the container, the container is deleted. If we did not do this, everytime we run a container, a version of it will be saved to our local computer. This can lead to the eventual wastage of a lot of disk space until we manually remove these containers. Later we will show you how to save your container if you want to do so.</em></p>
<pre><code>docker run --rm -p 8787:8787 rocker/hadleyverse</code></pre>
<p>If you try to run a Docker container which you have not installed locally then Docker will automatically search for the container on Docker Hub (an online repository for docker images) and download it if it exists.</p>
<p>Optional: <em>If you try to run a Docker container which you have not installed locally then Docker will automatically search for the container on Docker Hub (an online repository for docker images) and download it if it exists.</em></p>
<p>The command above will lead RStudio-Server to launch invisibly. To connect to it, open a browser and enter <code>http://</code>, followed by your ip address, followed by <code>:8787</code>. If you are running a Mac or Windows machine, you will find the ip address on the first line of text that appeared in your terminal when you launched the Docker Quickstart Terminal. For example, you should see:</p>
<pre><code>
## .
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ we go into the the details on how to use it for a reproducible transportable pro
- [For lesson developers](http://pad.software-carpentry.org/RopenSci-docker-tutorial)

## Instructor notes
Bring thumb drives with the docker images. If a bunch of people want to download
- Bring thumb drives with the docker images. If a bunch of people want to download
the same 3GB image you might run into problems.
- Optional parts are marked with the word "Optional:" and *italic text*.

0 comments on commit 3a4ce64

Please sign in to comment.