Skip to content

Commit

Permalink
build: add Dockerfile (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
uniqueg authored May 19, 2022
1 parent 2f99709 commit 3901673
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*
!data/
!htsinfer/
!tests/
!setup.py
!environment.yml
!LICENSE
!README.md
44 changes: 44 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
###### BASE IMAGE ######
FROM continuumio/miniconda3:4.11.0

####### METADATA #######
LABEL base_image="continuumio/miniconda3:4.11.0"
LABEL version="1.0"
LABEL software="HTSinfer"
LABEL software.version="v0.9.0"
LABEL about.summary="HTSinfer infers metadata from High Throughput Sequencing (HTS) data"
LABEL about.home="https://github.com/zavolanlab/htsinfer"
LABEL about.documentation="https://htsinfer.readthedocs.io/"
LABEL about.license_file="https://spdx.org/licenses/Apache-2.0"
LABEL about.license="Apache License 2.0"
LABEL about.tags="bioinformatics, ngs"

###### MAINTAINER ######
LABEL maintainer="Alexander Kanitz <[email protected]>"
LABEL maintainer.organisation="Biozentrum, University of Basel"
LABEL maintainer.location="Spitalstrasse 41, CH-4056 Basel, Switzerland"
LABEL maintainer.lab="Zavolan Lab"

##### INSTALLATION #####

# COPY THE YAML & INSTALL SOFTWARE WITH CONDA
WORKDIR /usr/src/app
COPY ./ ./
RUN conda env create --file environment.yml \
&& conda clean --all

# VARIABLES
ARG WORKDIR="/home/USER"
ARG USER="USER"
ARG GROUP="GROUP"
ENV PATH="${WORKDIR}:${PATH}"

# CREATE USER
RUN groupadd -r ${GROUP} && useradd --no-log-init -r -g ${GROUP} ${USER}

# SET ENVIRONMENT
WORKDIR ${WORKDIR}
RUN chown -R ${USER}:${GROUP} ${WORKDIR} && chmod 700 ${WORKDIR}
USER ${USER}
RUN echo "source activate htsinfer" > ~/.bashrc
ENV PATH /opt/conda/envs/htsinfer/bin:$PATH

0 comments on commit 3901673

Please sign in to comment.