diff --git a/docs/advanced_topics.rst b/docs/advanced_topics.rst index f4e8788..d209895 100644 --- a/docs/advanced_topics.rst +++ b/docs/advanced_topics.rst @@ -24,7 +24,7 @@ Docker useful tips Bash interactive script ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. code-block:: +.. code-block:: bash $ docker run -t -i ubuntu /bin/bash root@af8bae53bdd3:/# @@ -36,7 +36,7 @@ In this example: Let’s try running some commands inside the container: -.. code-block:: +.. code-block:: bash root@af8bae53bdd3:/# ls bin boot dev etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var @@ -51,7 +51,7 @@ Start a daemonized Hello world Let’s create a container that runs as a daemon. -.. code-block:: +.. code-block:: bash $ docker run -d ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done" 1e5535038e285177d5214659a068137486f96ee5c2e85a4ac52dc83f2ebe4147 @@ -60,7 +60,7 @@ Let’s create a container that runs as a daemon. We can use this container ID to see what’s happening with our hello world daemon. First, let’s make sure our container is running. Run the ``docker ps`` command. The docker ``ps`` command queries the Docker daemon for information about all the containers it knows about. -.. code-block:: +.. code-block:: console $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES diff --git a/docs/best_practices.rst b/docs/best_practices.rst index 5ca2061..ba1b6c3 100644 --- a/docs/best_practices.rst +++ b/docs/best_practices.rst @@ -155,7 +155,7 @@ General * ADD vs COPY: Both ADD and COPY adds local files when building a container but ADD does some additional magic like adding remote files and ungzipping and untaring archives. Only use ADD if you understand this difference. -* WORKDIR and ENV: Each command will create a new temporary image and runs in a new shell hence if you do a cd :raw-html-m2r:`` or export :raw-html-m2r:``\ =\ :raw-html-m2r:`` in your Dockerfile it won't work. Use WORKDIR to set your working directory across multiple commands and ENV to set environment variables. +* WORKDIR and ENV: Each command will create a new temporary image and runs in a new shell hence if you do a `cd ` or `export =` in your Dockerfile it won't work. Use WORKDIR to set your working directory across multiple commands and ENV to set environment variables. * CMD and ENTRYPOINT: CMD is the default command to execute when an image is run. The default ENTRYPOINT is /bin/sh -c and CMD is passed into that as an argument. We can override ENTRYPOINT in our Dockerfile and make our container behave like an executable taking command line arguments (with default arguments in CMD in our Dockerfile). * ADD your code last: ADD invalidates your cache if files have changed. Don't invalidate the cache by adding frequently changing stuff too high up in your Dockerfile. Add your code last, libraries and dependencies first. For node.js apps that means adding your package.json first, running npm install and only then adding your code. * USER in Dockerfiles: By default docker runs everything as root but you can use USER in Dockerfiles. There's no user namespacing in docker so the container sees the users on the host but only uids hence you need the add the users in the container. diff --git a/docs/conda_integration.rst b/docs/conda_integration.rst index 6d2fdc6..f25625f 100644 --- a/docs/conda_integration.rst +++ b/docs/conda_integration.rst @@ -97,7 +97,7 @@ We utilize `mulled `_ with `involucro `_. Proteomics data analysis is dominated by database-based search engines strategies. Amount Search Engines, **Tide** is one of the most popular nowadays. Get the docker container ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. code-block:: +.. code-block:: bash $ docker pull biocontainers/crux:v3.2_cv3 @@ -34,7 +34,7 @@ I'm placing all these files inside a folder in your machine, in my case I will u Start searching ~~~~~~~~~~~~~~~~~~~~~~ -.. code-block:: +.. code-block:: bash $ docker run -v /Users/yperez/workplace/:/data/ biocontainers/crux:v3.2_cv3 crux tide-index small-yeast.fasta yeast-index @@ -43,7 +43,7 @@ Start searching After running this command you will see a new folder called yeast-index in your path (``/Users/yperez/workplace``). -.. code-block:: +.. code-block:: bash $ docker run -v /Users/yperez/workplace/:/data/ biocontainers/crux:v3.2_cv3 crux tide-search --compute-sp T --mzid-output T demo.ms2 yeast-index diff --git a/docs/getting_started.rst b/docs/getting_started.rst index d6f1cb3..f10839f 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -4,7 +4,7 @@ Getting started with Docker ============================ Docker Configuration ---------------- +-------------------- `Docker `__ is the world’s leading platform for software containerization. Docker includes multiple tools and components such as: `docker `__, `docker engine `__, `docker hub `__. @@ -76,7 +76,7 @@ In many cases the software you are using requires an input or an output file to After setting the folder and necessary files inside we can execute the image we want. In the example bellow we are running an image built from an example container: -.. code-block:: +.. code-block:: bash $ docker run -v /home/user/docker/:/data/ biocontainers/program:version -input /data/prot.fa -output /data/result.txt` diff --git a/docs/index.rst b/docs/index.rst index 78f0872..a094f63 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -13,49 +13,14 @@ Contents :maxdepth: 1 introduction - .. toctree:: - :maxdepth: 3 - what_is_container - .. toctree:: - :maxdepth: 3 - what_is_biocontainers - .. toctree:: - :maxdepth: 3 - getting_started - .. toctree:: - :maxdepth: 3 - running_example - .. toctree:: - :maxdepth: 3 - conda_integration - .. toctree:: - :maxdepth: 3 - biocontainers_registry - .. toctree:: - :maxdepth: 3 - examples - .. toctree:: - :maxdepth: 3 - best_practices - .. toctree:: - :maxdepth: 3 - citations - .. toctree:: - :maxdepth: 3 - advanced_topics - .. toctree:: - :maxdepth: 3 - contributing - .. toctree:: - :maxdepth: 3 \ No newline at end of file diff --git a/docs/presentations.rst b/docs/presentations.rst index 44e39e6..04cdf4b 100644 --- a/docs/presentations.rst +++ b/docs/presentations.rst @@ -3,5 +3,5 @@ Presentations and Training Materials ============================================== -* Introduction to BioContainers at EBI Campus, November 2016: :raw-html-m2r:`Presentation Slides` +* Introduction to BioContainers at EBI Campus, November 2016: `Presentation Slides `_ * ELIXIR Webinar: Bioconda and BioContainers, March 2017: `get the PDF `_ diff --git a/docs/running_example.rst b/docs/running_example.rst index 6a714ee..5ed9426 100644 --- a/docs/running_example.rst +++ b/docs/running_example.rst @@ -85,7 +85,7 @@ Now that you have enough information to start comparing sequences using BLAST, y We hope that this short example can shed some light on how important and easy it is to run containerized software. Run everything in one go -~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: bash diff --git a/docs/singularitycontainers.rst b/docs/singularitycontainers.rst index 84f027c..96e2780 100644 --- a/docs/singularitycontainers.rst +++ b/docs/singularitycontainers.rst @@ -1,5 +1,5 @@ .. _singularitycontainers Using Singularity containers -========================= +============================ diff --git a/docs/what_is_biocontainers.rst b/docs/what_is_biocontainers.rst index fa35fb6..c446284 100644 --- a/docs/what_is_biocontainers.rst +++ b/docs/what_is_biocontainers.rst @@ -57,7 +57,7 @@ When a container is deployed and the developer closes the issue in GitHub, the u .. note:: You can read other sections about :doc:`conda_integration` and :doc:`singularitycontainers` Reporting a problem with a container -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If the user finds a problem with a container an issue should be opened in the `container repository `__, the user should use the **broken tag** (`see tags `_). Developers of the project will pick-up the issue and deploy a new version of the container. A message will be delivered when the container has been fixed. @@ -74,7 +74,7 @@ BioContainers build the docker containers from two different sources the `Docker In order to be able to contribute to BioContainers you should be able to create a BioConda recipe or a Dockerfile recipe. Create a BioConda recipe -~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~ .. note:: Before you start please read the Conda documentation and `how to setup conda in your machine `__ @@ -87,7 +87,7 @@ In summary should follow these steps: After the PR gets merged, a Conda package gets created and the corresponding docker container get pushed into `Quay.io Registry `__ and the `BioContainers Registry `__ Create a Dockerfile recipe -~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a standard template for creating a new Dockerfile for BioContainers: diff --git a/docs/what_is_container.rst b/docs/what_is_container.rst index ee5557a..a87ee5f 100644 --- a/docs/what_is_container.rst +++ b/docs/what_is_container.rst @@ -32,6 +32,7 @@ In the next video you can check out what you can achieve by using docker contain .. raw:: html + Container technologies