-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile_lifex
57 lines (39 loc) · 1.27 KB
/
Dockerfile_lifex
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
46
47
48
49
50
51
52
53
54
55
56
57
# Build with:
# docker build --build-arg MK="mk-2024.0-lifex.tar.gz" -t registry.gitlab.com/lifex/lifex/mk -f Dockerfile_lifex .
# docker tag registry.gitlab.com/lifex/lifex/mk registry.gitlab.com/lifex/lifex/mk:2024.0
# Then push with:
# docker login registry.gitlab.com
# docker push registry.gitlab.com/lifex/lifex/mk:latest
# docker push registry.gitlab.com/lifex/lifex/mk:2024.0
FROM ubuntu:latest AS mk_builder
MAINTAINER [email protected]
# Define variables.
ARG MK
# Install dependencies.
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y wget curl openssh-client zip unzip \
lcov clang-format cppcheck doxygen graphviz jabref
# Copy modules file.
COPY ${MK} /
# Un-tar modules.
RUN tar xvzf ${MK} -C / && \
rm ${MK}
# Install python-gitlab.
RUN /bin/bash -c \
"source /u/sw/etc/profile && module load gcc-glibc && \
python -m pip install --upgrade pip && \
pip install python-gitlab"
# Initialize JabRef.
RUN jabref -n -b
FROM scratch AS mk
COPY --from=mk_builder / /
ENV HOME /root
# Enable modules by default.
RUN printf "\n# mk.\n\
source /u/sw/etc/profile\n\
module load gcc-glibc dealii vtk\n" >> ${HOME}/.bashrc
# Set configuration variables.
USER root
WORKDIR ${HOME}