forked from star-bnl/star-sw
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
41 lines (31 loc) · 891 Bytes
/
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
# syntax=docker/dockerfile:latest
ARG starenv=root5
# Pick one from [gcc485, gcc11]
ARG compiler=gcc485
FROM ghcr.io/star-bnl/star-spack:v0.3.0-${starenv}-${compiler}
ARG compiler
ENV NODEBUG=yes
ENV STAR=/star-sw
ENV STAR_LIB=$STAR/.${STAR_HOST_SYS}/LIB
ENV STAR_BIN=$STAR/.${STAR_HOST_SYS}/BIN
ENV STAR_SYS=x8664_sl7
ENV PATH=$STAR_BIN:$STAR/mgr:$PATH
ENV LD_LIBRARY_PATH=$STAR_LIB:$LD_LIBRARY_PATH
ENV ROOT_INCLUDE_PATH=$STAR/.${STAR_HOST_SYS}/include
WORKDIR ${STAR}
COPY . ${STAR}
SHELL ["/bin/bash", "-l", "-c"]
RUN <<EOF
set -e
[[ $compiler = "gcc485" ]] && EXTRA_CXXFLAGS="-Werror" || EXTRA_CXXFLAGS=""
cons EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS"
find .$STAR_HOST_SYS -name *.o -exec rm '{}' \;
EOF
COPY --chmod=0755 <<-"EOF" /opt/entrypoint.sh
#!/bin/bash -l
set -e
install $STAR/StRoot/macros/.rootrc .
exec "$@"
EOF
ENTRYPOINT ["/opt/entrypoint.sh"]
CMD ["/bin/bash"]