Last active
September 11, 2017 17:17
-
-
Save eschen42/d5b7850ea74c6dd8f37714f7d48955fc to your computer and use it in GitHub Desktop.
Dockerfile to run planemo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ref: https://gist.github.com/eschen42/d5b7850ea74c6dd8f37714f7d48955fc | |
# Objective - To create a Docker environment in which I can run planemo | |
# To build | |
# sudo docker build -t eschen42/planemo . | |
# To run and delete the container on exit | |
# sudo docker run --rm -ti eschen42/planemo | |
# You will be logged in as the 'debian' user without superuser privileges. | |
# For superuser privileges, supply arguments, e.g.: | |
# sudo docker run --rm -ti eschen42/planemo bash -c "export TERM=xterm; /bin/bash" | |
# | |
# If you want persistent storage outside the container, | |
# consider and understand the -v (--volume) option for 'docker run', | |
# e.g., | |
# mkdir ~/debhome; sudo docker run --rm -ti -v ~/debhome:/home/debian eschen42/planemo | |
# Note that this works best if your UID is the same as the debian user created here; | |
# if your UID is not 1000, change the "RUN groupadd ..." line to use your UID. | |
FROM debian:jessie | |
MAINTAINER Arthur C. Eschenlauer, esch0041@umn.edu | |
# explicitly set user/group IDs for debian user | |
RUN groupadd -r debian --gid=1000 && useradd -s /bin/bash -m -g debian --uid=1000 debian | |
RUN apt-get update \ | |
&& apt-get -y install bzip2 curl wget vim-tiny | |
RUN update-alternatives --install /usr/bin/vim vim /usr/bin/vim.tiny 10 | |
RUN apt-get -y install net-tools bind9-host dnsutils | |
RUN apt-get -y install locales gawk debconf git | |
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales | |
RUN su -l -c '/bin/bash -c "curl -fsSL https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh > /home/debian/Miniconda2-installer-Linux-x86_64.sh"' debian | |
RUN su -l -c "chmod +x /home/debian/Miniconda2-installer-Linux-x86_64.sh" debian \ | |
&& su -l -c "/home/debian/Miniconda2-installer-Linux-x86_64.sh -b" debian | |
RUN su -l -c "echo \"export PATH='/home/debian/miniconda2/bin:$PATH'\" >>~/.bash_profile" debian | |
RUN su -l -c "conda config --add channels r" debian | |
RUN su -l -c "conda config --add channels bioconda" debian | |
RUN su -l -c "conda install -c conda-forge pyaml" debian | |
RUN su -l -c "conda install planemo" debian | |
RUN echo '#!/usr/bin/env bash' > /entrypoint.sh \ | |
&& echo "if [ \"'$1'\" = \"''\" ]; then su - debian; else $0; fi" >> /entrypoint.sh \ | |
&& chmod +x /entrypoint.sh | |
RUN su -l -c "rm /home/debian/Miniconda2-installer-Linux-x86_64.sh" debian | |
CMD ["/usr/bin/env", "bash", "/entrypoint.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment