|
1 | | -FROM continuumio/miniconda3:4.10.3-alpine |
| 1 | +FROM continuumio/miniconda3:25.1.1-2 |
2 | 2 |
|
3 | | -LABEL base.image="continuumio/miniconda3:4.10.3-alpine" |
4 | | -LABEL about.home="https://github.com/Clinical-Genomics/BALSAMIC" |
5 | | -LABEL about.documentation="https://balsamic.readthedocs.io/" |
6 | | -LABEL about.license="MIT License (MIT)" |
7 | | -LABEL about.maintainer="Khurram Maqbool khurram dot maqbool at scilifelab dot se" |
8 | | -LABEL about.description="Bioinformatic analysis pipeline for somatic mutations in cancer" |
| 3 | +LABEL base.image="continuumio/miniconda3" \ |
| 4 | + maintainer="Clinical Genomics" \ |
| 5 | + about.contact= "[email protected]" \ |
| 6 | + about.license="MIT License (MIT)" \ |
| 7 | + about.home="https://github.com/Clinical-Genomics/BALSAMIC" \ |
| 8 | + about.documentation="https://balsamic.readthedocs.io/" \ |
| 9 | + about.description="Bioinformatic analysis pipeline for somatic mutations in cancer" |
9 | 10 |
|
10 | | -ENV PATH="/opt/conda/bin/:${PATH}" |
| 11 | +ARG CONTAINER_NAME |
11 | 12 |
|
12 | | -RUN apk add --no-cache bash gcc git zlib-dev musl-dev |
| 13 | +# Copy enviroment file |
| 14 | +COPY BALSAMIC/containers/${CONTAINER_NAME}/${CONTAINER_NAME}.yaml /tmp/environment.yaml |
13 | 15 |
|
14 | | -ARG WORK_DIR=project |
15 | | -ARG CONTAINER_NAME |
| 16 | +# Create conda environment |
| 17 | +RUN conda env create -n ${CONTAINER_NAME} -f /tmp/environment.yaml && \ |
| 18 | + conda clean -afy && \ |
| 19 | + rm -f /tmp/environment.yaml |
16 | 20 |
|
17 | | -# Copy all project files |
18 | | -COPY . /${WORK_DIR} |
| 21 | +ENV PATH="/opt/conda/envs/${CONTAINER_NAME}/bin/:${PATH}" |
19 | 22 |
|
20 | | -RUN apk add --no-cache make |
| 23 | +# Run as a non-root |
| 24 | +RUN useradd -m dockeruser |
| 25 | +USER dockeruser |
21 | 26 |
|
22 | | -RUN cd /opt \ |
23 | | - && git clone https://github.com/lgmgeo/AnnotSV.git \ |
24 | | - && cd /opt/AnnotSV/ \ |
25 | | - && git checkout v3.1.3 \ |
26 | | - && make PREFIX=. install \ |
27 | | - && export ANNOTSV=/opt/AnnotSV |
| 27 | +# Set the work directory |
| 28 | +WORKDIR /home/dockeruser/ |
28 | 29 |
|
29 | | -RUN cd /${WORK_DIR}/BALSAMIC/containers/${CONTAINER_NAME}/ && /bin/sh ${CONTAINER_NAME}.sh ${CONTAINER_NAME} |
| 30 | +# Set the default shell |
| 31 | +SHELL ["/bin/bash", "-c"] |
30 | 32 |
|
31 | | -# Clean work environment |
32 | | -RUN rm -rf /${WORK_DIR} && conda clean --all --yes |
| 33 | +# Define the default command |
| 34 | +CMD ["/bin/bash"] |
0 commit comments