-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
45 lines (34 loc) · 1.47 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
40
41
42
43
44
45
ARG STAR_BASE_IMAGE=starbnl/star-base:centos7
FROM ${STAR_BASE_IMAGE} AS build-stage
# Set arguments default values
ARG STAR_SW_REF=master
ARG STAR_CVS_REF=master
ARG STAR_BUILD_TYPE=Release
ARG STAR_PATCH="precmake"
WORKDIR /tmp
# Get STAR software
ADD https://api.github.com/repos/star-bnl/star-sw/commits/${STAR_SW_REF} star-sw-ref.json
RUN curl -s -L https://github.com/star-bnl/star-sw/archive/${STAR_SW_REF}.tar.gz | tar -xz -C /tmp \
&& TOP_DIR=`ls -d /tmp/star-sw*/` && ln -s $TOP_DIR star-sw
ADD https://api.github.com/repos/star-bnl/star-cvs/commits/${STAR_CVS_REF} star-cvs-ref.json
RUN curl -s -L https://github.com/star-bnl/star-cvs/archive/${STAR_CVS_REF}.tar.gz | tar -xz -C /tmp \
&& TOP_DIR=`ls -d /tmp/star-cvs*/` && ln -s $TOP_DIR star-cvs
# Build STAR software
WORKDIR /tmp/star-build
RUN cmake /tmp/star-sw -DSTAR_SRC=/tmp/star-cvs \
-DSTAR_PATCH=${STAR_PATCH} -DCMAKE_INSTALL_PREFIX=/tmp/star-install \
-DCERNLIB_ROOT=/cern/2006 -DCMAKE_BUILD_TYPE=${STAR_BUILD_TYPE} \
&& make -j $(nproc) \
&& make install
# Install additional packages for interactive work
RUN yum update -q -y \
&& yum install -y emacs vim-minimal \
&& yum clean all
ENTRYPOINT ["/tmp/star-install/.entrypoint.sh"]
CMD ["/bin/bash"]
# Get rid of source and build artifacts and only keep installed STAR software
FROM ${STAR_BASE_IMAGE}
COPY --from=build-stage /tmp/star-install /tmp/star-install
WORKDIR /tmp/star-install
ENTRYPOINT ["/tmp/star-install/.entrypoint.sh"]
CMD ["/bin/bash"]