FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
FANS/docker/Dockerfile at develop · DataAnalyticsEngineering/FANS · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
DataAnalyticsEngineering
/
FANS
Public
Notifications
You must be signed in to change notification settings
Fork
7
Star
23
Code
Issues
1
Pull requests
1
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
FANS
/
docker
/
Dockerfile
Copy path
More file actions
More file actions
Latest commit
History
History
History
93 lines (77 loc) · 2.54 KB
Breadcrumbs
FANS
/
docker
/
Dockerfile
Copy path
File metadata and controls
93 lines (77 loc) · 2.54 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
83
84
85
86
87
88
89
90
91
92
93
#
During build time, don't ask for user input (has to be included in every stage
#
to take effect)
ARG
DEBIAN_FRONTEND=noninteractive
ARG
UBUNTU_VERSION=noble
ARG
USER=fans
#
###############################################################################
FROM
ubuntu:${UBUNTU_VERSION} AS fans_base
ARG
DEBIAN_FRONTEND
ARG
USER
#
Context: https://askubuntu.com/questions/1513927/ubuntu-24-04-docker-images-now-includes-user-ubuntu-with-uid-gid-1000
RUN
bash -c
'if id "ubuntu" &>/dev/null; then \
touch /var/mail/ubuntu && \
chown ubuntu /var/mail/ubuntu && \
userdel -r ubuntu && \
echo "Deleted user ubuntu."; \
fi'
#
Create a non-root user
RUN
useradd -m -s /bin/bash ${USER}
#
###############################################################################
FROM
fans_base AS fans_ci
ARG
DEBIAN_FRONTEND
RUN
apt-get update -qq && apt-get install -y --no-install-recommends \
#
Build basics
software-properties-common \
build-essential \
#
CMake + git for the CI checkout
cmake \
git \
#
FANS dependencies \
libhdf5-dev \
libhdf5-openmpi-dev \
libopenmpi-dev \
libeigen3-dev \
libfftw3-dev \
libfftw3-mpi-dev \
nlohmann-json3-dev \
libspdlog-dev \
#
Required for building pyfans
python3-dev \
#
Clean up
&& apt-get clean \
&& apt-get autoremove --purge -y \
&& rm -rf /var/lib/apt/lists/*
#
###############################################################################
FROM
fans_ci AS fans_dev
ARG
DEBIAN_FRONTEND
ARG
USER
ARG
FANS_venv=FANS_venv
RUN
apt-get update -qq && apt-get install -y --no-install-recommends \
#
Packages required for setting up the non-root user
sudo \
gosu \
#
Some additional packages for convenience
time \
htop \
vim \
python3-pip \
python3-venv \
python-is-python3 \
#
Clean up
&& apt-get clean \
&& apt-get autoremove --purge -y \
&& rm -rf /var/lib/apt/lists/*
#
Create a python venv for test/h52xdmf.py script
USER
${USER}
RUN
python -m venv /home/${USER}/venvs/${FANS_venv} && \
echo
"
\n
source /home/${USER}/venvs/${FANS_venv}/bin/activate
\n
"
>> /home/${USER}/.bashrc && \
. /home/${USER}/venvs/${FANS_venv}/bin/activate && \
python -m pip install --no-cache-dir h5py lxml
USER
root
#
Add fans user to sudoers
RUN
echo ${USER} ALL=
\(
root
\)
NOPASSWD:ALL > /etc/sudoers.d/${USER} \
&& chmod 440 /etc/sudoers.d/${USER}
#
Entrypoint script changes UID and GID to match given host UID and GID
COPY
--chmod=755 docker/Dockerfile_user_env_entrypoint.sh /entrypoint.sh
ENTRYPOINT
[
"/entrypoint.sh"
]
CMD
[
"bash"
]
Back
|
FazBrowse Home
|
New Git URL