forked from CancerCollaboratory/dockstore-tool-bamstats
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
39 lines (33 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#############################################################
# Dockerfile to build a sample tool container for BAMStats
#############################################################
# set the base image to a version of Ubuntu with LTS
FROM ubuntu:22.04
# two different ways of declaring authorship
LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.authors="Brian O'Connor <[email protected]>, Ash O'Farrell <[email protected]>"
# setup packages
# software-properties-common: needed to add openjdk repository
# openjdk 11: needed by bamstats
# wget: needed to download bamstats
# unzip: needed to install bamstats
# zip: needed to handle bamstats output
USER root
RUN apt-get -m update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:openjdk-r/ppa && apt-get update -q && apt install -y openjdk-11-jdk && \
apt-get install -y wget && \
apt-get install -y unzip && \
apt-get install -y zip
# get the tool and install it in /usr/local/bin
RUN wget -q http://downloads.sourceforge.net/project/bamstats/BAMStats-1.25.zip
RUN unzip BAMStats-1.25.zip && \
rm BAMStats-1.25.zip && \
mv BAMStats-1.25 /opt/
COPY bin/bamstats /usr/local/bin/
RUN chmod a+x /usr/local/bin/bamstats
# switch back to the ubuntu user so this tool (and the files written) are not owned by root
RUN groupadd -r -g 1000 ubuntu && useradd -r -g ubuntu -u 1000 -m ubuntu
USER ubuntu
# by default, /bin/bash is executed
CMD ["/bin/bash"]