-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Dockerfile
83 lines (70 loc) · 1.88 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
ARG VLANG_TAG=buster
FROM thevlang/vlang:${VLANG_TAG} AS vsl
# VLANG_TAG is specified again because the FROM directive resets ARGs
# (but their default value is retained if set previously)
ARG VLANG_TAG
# options
ARG DEV_IMG="false"
# disable tzdata questions
ENV DEBIAN_FRONTEND=noninteractive
# use bash
SHELL ["/bin/bash", "-c"]
RUN <<EOF
apt-get update -y
apt-get install -y --no-install-recommends \
apt-utils 2> >( grep -v 'debconf: delaying package configuration, since apt-utils is not installed' >&2 ) \
ca-certificates \
netbase \
curl \
git \
make \
python3.8 \
python3-pip \
python3.8-dev \
gcc \
gfortran \
libxi-dev \
libxcursor-dev \
mesa-common-dev \
liblapacke-dev \
libopenblas-dev \
libgc-dev \
libgl1-mesa-dev \
libopenmpi-dev \
libhdf5-dev \
hdf5-tools \
opencl-headers \
libmetis-dev \
libsuitesparse-dev \
libmumps-dev \
libfftw3-dev \
libfftw3-mpi-dev
apt-get autoremove -y
apt-get clean -y
rm -rf /var/lib/apt/lists/* /tmp/library-scripts
EOF
# build vsl
ARG VSL_VERSION="latest"
COPY docker/vsl-clone-and-build.sh /tmp/library-scripts/
RUN /bin/bash /tmp/library-scripts/vsl-clone-and-build.sh "${DEV_IMG}" "${VSL_VERSION}"
FROM vsl AS vsl-dev
# Options for setup script
ARG INSTALL_ZSH="true"
ARG UPGRADE_PACKAGES="false"
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ENV EDITOR code
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
COPY docker/common-debian.sh /tmp/library-scripts/
RUN <<EOF
apt-get update
/bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}"
apt-get autoremove -y
apt-get clean -y
rm -rf /var/lib/apt/lists/* /tmp/library-scripts
EOF
# install Docker tools (cli, buildx, compose)
COPY --from=gloursdocker/docker / /
USER ${USERNAME}
HEALTHCHECK CMD true