Skip to content

Commit 5438368

Browse files
committed
Sync dockerfiles with newest changes
1 parent 7cbdf68 commit 5438368

File tree

5 files changed

+182
-135
lines changed

5 files changed

+182
-135
lines changed

docker/main-images/el8/Dockerfile

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,45 @@
11
FROM rockylinux:8
22

3+
# Ensure commands fail on error
4+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
5+
36
# Install dependencies
4-
RUN yum -y update; yum clean all; \
5-
yum -y install git make cmake wget unzip patch which file; \
6-
yum -y install gcc gcc-c++ gcc-gfortran; \
7-
yum -y install dnf-plugins-core; \
8-
yum config-manager --set-enabled powertools; \
9-
yum -y install python3 lapack-devel findutils diffutils;
7+
RUN dnf -y update \
8+
&& dnf -y install dnf-plugins-core \
9+
&& dnf config-manager --set-enabled powertools || dnf config-manager --set-enabled PowerTools || true \
10+
&& dnf -y install epel-release \
11+
&& dnf -y install \
12+
git make cmake wget unzip patch which file \
13+
gcc gcc-c++ gcc-gfortran \
14+
lapack-devel \
15+
python3 python3-devel \
16+
findutils diffutils \
17+
&& dnf clean all
1018

1119
# Create directory structure
12-
RUN mkdir repo
20+
RUN mkdir -p /repo
21+
22+
# Copy the coinhsl.tar.gz file into the repo folder
23+
# COPY ./hsl/coinhsl.tar.gz /repo/coinhsl.tar.gz
1324

1425
# Install PETSc
15-
RUN cd repo; \
16-
wget https://gitlab.com/petsc/petsc/-/archive/v3.20.6/petsc-v3.20.6.tar.gz; \
17-
tar -zxvf petsc-v3.20.6.tar.gz; \
18-
mv petsc-v3.20.6 petsc; \
19-
mkdir petsc-dist; \
20-
cd petsc; \
21-
./configure configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 --download-metis --download-mumps --with-mumps-serial=1 --prefix=/repo/petsc-dist; \
22-
make;\
23-
make install;
26+
RUN cd /repo \
27+
&& wget https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.20.6.tar.gz \
28+
&& tar -zxvf petsc-3.20.6.tar.gz \
29+
&& mv petsc-3.20.6 petsc \
30+
&& mkdir petsc-dist \
31+
&& cd petsc \
32+
&& ./configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 \
33+
--download-metis --download-mumps --with-mumps-serial=1 \
34+
--prefix=/repo/petsc-dist \
35+
&& make \
36+
&& make install
2437

2538
# Install boost
26-
RUN cd repo; \
27-
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz; \
28-
tar -zxvf boost_1_87_0.tar.gz; \
29-
cd ./boost_1_87_0; \
30-
sh bootstrap.sh --prefix=/usr/local/; \
31-
chmod a+x ./b2; \
32-
./b2 install || true;
33-
39+
RUN cd /repo \
40+
&& wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz \
41+
&& tar -zxvf boost_1_87_0.tar.gz \
42+
&& cd boost_1_87_0 \
43+
&& sh bootstrap.sh --prefix=/usr/local \
44+
&& chmod a+x ./b2 \
45+
&& ./b2 install

docker/main-images/el9/Dockerfile

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,49 @@
11
FROM rockylinux:9
22

3+
# Ensure commands fail on error
4+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
5+
36
# Install dependencies
4-
RUN dnf -y update; dnf clean all; \
5-
dnf config-manager --set-enabled crb; \
6-
dnf -y install git make cmake wget unzip patch which file; \
7-
dnf -y install gcc gcc-c++ gcc-gfortran lapack-devel; \
8-
dnf -y install python3 python-devel findutils diffutils patchelf;
7+
RUN dnf -y update \
8+
&& dnf -y install dnf-plugins-core \
9+
&& dnf config-manager --set-enabled crb \
10+
&& dnf -y install epel-release \
11+
&& dnf -y install \
12+
git make cmake wget unzip patch which file \
13+
gcc gcc-c++ gcc-gfortran lapack-devel \
14+
python3 python3-devel findutils diffutils patchelf \
15+
&& dnf clean all
916

10-
# Fix the symlinks: https://bugs.rockylinux.org/view.php?id=7855
11-
RUN cd /usr/lib64; \
12-
ln -sf libblas.so.3.9.0 libblas.so.3; \
13-
ln -sf liblapack.so.3.9.0 liblapack.so.3;
17+
# Fix LAPACK/BLAS symlinks
18+
# See: https://bugs.rockylinux.org/view.php?id=7855
19+
RUN cd /usr/lib64 \
20+
&& ln -sf libblas.so.3.9.0 libblas.so.3 \
21+
&& ln -sf liblapack.so.3.9.0 liblapack.so.3
1422

1523
# Create directory structure
16-
RUN mkdir repo
24+
RUN mkdir -p /repo
25+
26+
# Copy the coinhsl.tar.gz file into the repo folder
27+
# COPY ./hsl/coinhsl.tar.gz /repo/coinhsl.tar.gz
1728

1829
# Install PETSc
19-
RUN cd repo; \
20-
wget https://gitlab.com/petsc/petsc/-/archive/v3.20.6/petsc-v3.20.6.tar.gz; \
21-
tar -zxvf petsc-v3.20.6.tar.gz; \
22-
mv petsc-v3.20.6 petsc; \
23-
mkdir petsc-dist; \
24-
cd petsc; \
25-
./configure configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 --download-metis --download-mumps --with-mumps-serial=1 --prefix=/repo/petsc-dist; \
26-
make;\
27-
make install;
30+
RUN cd /repo \
31+
&& wget https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.20.6.tar.gz \
32+
&& tar -zxvf petsc-3.20.6.tar.gz \
33+
&& mv petsc-3.20.6 petsc \
34+
&& mkdir petsc-dist \
35+
&& cd petsc \
36+
&& ./configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 \
37+
--download-metis --download-mumps --with-mumps-serial=1 \
38+
--prefix=/repo/petsc-dist \
39+
&& make \
40+
&& make install
2841

2942
# Install boost
30-
RUN cd repo; \
31-
wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz; \
32-
tar -zxvf boost_1_87_0.tar.gz; \
33-
cd ./boost_1_87_0; \
34-
sh bootstrap.sh --prefix=/usr/local/; \
35-
chmod a+x ./b2; \
36-
./b2 install || true;
37-
38-
43+
RUN cd /repo \
44+
&& wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz \
45+
&& tar -zxvf boost_1_87_0.tar.gz \
46+
&& cd boost_1_87_0 \
47+
&& sh bootstrap.sh --prefix=/usr/local \
48+
&& chmod a+x ./b2 \
49+
&& ./b2 install
Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,46 @@
11
FROM ubuntu:20.04
22

3+
# Ensure commands fail on error
4+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
5+
6+
# Set noninteractive apt and timezone
7+
ENV DEBIAN_FRONTEND=noninteractive
8+
ENV TZ=America/New_York
9+
310
# Install dependencies
4-
RUN apt-get -y update; \
5-
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime; \
6-
export DEBIAN_FRONTEND=noninteractive; \
7-
apt-get -y upgrade; \
8-
apt-get -y install ubuntu-dev-tools liblapack-dev libblas-dev unzip; \
9-
apt-get -y install gfortran cmake; \
10-
apt-get -y install pkg-config bison; \
11-
apt-get -y install flex valgrind;
11+
RUN apt-get update -y \
12+
&& apt-get upgrade -y \
13+
&& apt-get install -y \
14+
ubuntu-dev-tools unzip cmake pkg-config wget \
15+
gfortran liblapack-dev libblas-dev libpython3-dev \
16+
&& ln -fs /usr/share/zoneinfo/$TZ /etc/localtime \
17+
&& dpkg-reconfigure -f noninteractive tzdata \
18+
&& rm -rf /var/lib/apt/lists/*
1219

1320
# Create directory structure
14-
RUN mkdir repo
21+
RUN mkdir -p /repo
22+
23+
# Copy the coinhsl.tar.gz file into the repo folder
24+
# COPY ./hsl/coinhsl.tar.gz /repo/coinhsl.tar.gz
1525

1626
# Install PETSc
17-
# 3.20.6 is the newest version that works with the PETSc extras
18-
# included in this repo
19-
RUN cd repo; \
20-
wget https://gitlab.com/petsc/petsc/-/archive/v3.20.6/petsc-v3.20.6.tar.gz; \
21-
tar -zxvf petsc-v3.20.6.tar.gz; \
22-
mv petsc-v3.20.6 petsc; \
23-
mkdir petsc-dist; \
24-
cd petsc; \
25-
./configure configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 --download-metis --download-mumps --with-mumps-serial=1 --prefix=/repo/petsc-dist; \
26-
make;\
27-
make install;
27+
RUN cd /repo \
28+
&& wget https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.20.6.tar.gz \
29+
&& tar -zxvf petsc-3.20.6.tar.gz \
30+
&& mv petsc-3.20.6 petsc \
31+
&& mkdir petsc-dist \
32+
&& cd petsc \
33+
&& ./configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 \
34+
--download-metis --download-mumps --with-mumps-serial=1 \
35+
--prefix=/repo/petsc-dist \
36+
&& make \
37+
&& make install
2838

2939
# Install boost
30-
RUN cd repo; \
31-
wget https://boostorg.jfrog.io/artifactory/main/release/1.86.0/source/boost_1_86_0.tar.gz; \
32-
tar -zxvf boost_1_86_0.tar.gz; \
33-
cd ./boost_1_86_0; \
34-
sh bootstrap.sh --prefix=/usr/local/; \
35-
chmod a+x ./b2; \
36-
./b2 install || true;
40+
RUN cd /repo \
41+
&& wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz \
42+
&& tar -zxvf boost_1_87_0.tar.gz \
43+
&& cd boost_1_87_0 \
44+
&& sh bootstrap.sh --prefix=/usr/local \
45+
&& chmod a+x ./b2 \
46+
&& ./b2 install
Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
11
FROM ubuntu:22.04
22

3-
ENV DEBIAN_FRONTEND=noninteractive
3+
# Ensure commands fail on error
4+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
45

5-
# Fix a symlink
6-
RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime;
6+
# Set noninteractive apt and timezone
7+
ENV DEBIAN_FRONTEND=noninteractive
8+
ENV TZ=America/New_York
79

810
# Install dependencies
9-
RUN apt-get -y update; \
10-
apt-get -y upgrade; \
11-
apt-get -y install ubuntu-dev-tools liblapack-dev libblas-dev unzip; \
12-
apt-get -y install gfortran cmake; \
13-
apt-get -y install pkg-config bison; \
14-
apt-get -y install flex valgrind;
11+
RUN apt-get update -y \
12+
&& apt-get upgrade -y \
13+
&& apt-get install -y \
14+
ubuntu-dev-tools unzip cmake pkg-config wget \
15+
gfortran liblapack-dev libblas-dev libpython3-dev \
16+
&& ln -fs /usr/share/zoneinfo/$TZ /etc/localtime \
17+
&& dpkg-reconfigure -f noninteractive tzdata \
18+
&& rm -rf /var/lib/apt/lists/*
1519

1620
# Create directory structure
17-
RUN mkdir repo
21+
RUN mkdir -p /repo
22+
23+
# Copy the coinhsl.tar.gz file into the repo folder
24+
# COPY ./hsl/coinhsl.tar.gz /repo/coinhsl.tar.gz
1825

1926
# Install PETSc
20-
# 3.20.6 is the newest version that works with the PETSc extras
21-
# included in this repo
22-
RUN cd repo; \
23-
wget https://gitlab.com/petsc/petsc/-/archive/v3.20.6/petsc-v3.20.6.tar.gz; \
24-
tar -zxvf petsc-v3.20.6.tar.gz; \
25-
mv petsc-v3.20.6 petsc; \
26-
mkdir petsc-dist; \
27-
cd petsc; \
28-
./configure configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 --download-metis --download-mumps --with-mumps-serial=1 --prefix=/repo/petsc-dist; \
29-
make;\
30-
make install;
27+
RUN cd /repo \
28+
&& wget https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.20.6.tar.gz \
29+
&& tar -zxvf petsc-3.20.6.tar.gz \
30+
&& mv petsc-3.20.6 petsc \
31+
&& mkdir petsc-dist \
32+
&& cd petsc \
33+
&& ./configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 \
34+
--download-metis --download-mumps --with-mumps-serial=1 \
35+
--prefix=/repo/petsc-dist \
36+
&& make \
37+
&& make install
3138

3239
# Install boost
33-
RUN cd repo; \
34-
wget https://boostorg.jfrog.io/artifactory/main/release/1.86.0/source/boost_1_86_0.tar.gz; \
35-
tar -zxvf boost_1_86_0.tar.gz; \
36-
cd ./boost_1_86_0; \
37-
sh bootstrap.sh --prefix=/usr/local/; \
38-
chmod a+x ./b2; \
39-
./b2 install || true;
40+
RUN cd /repo \
41+
&& wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz \
42+
&& tar -zxvf boost_1_87_0.tar.gz \
43+
&& cd boost_1_87_0 \
44+
&& sh bootstrap.sh --prefix=/usr/local \
45+
&& chmod a+x ./b2 \
46+
&& ./b2 install
Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
11
FROM ubuntu:24.04
22

3-
ENV DEBIAN_FRONTEND=noninteractive
3+
# Ensure commands fail on error
4+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
45

5-
# Fix a symlink
6-
RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime;
6+
# Set noninteractive apt and timezone
7+
ENV DEBIAN_FRONTEND=noninteractive
8+
ENV TZ=America/New_York
79

810
# Install dependencies
9-
RUN apt-get -y update; \
10-
apt-get -y upgrade; \
11-
apt-get -y install ubuntu-dev-tools liblapack-dev libblas-dev unzip; \
12-
apt-get -y install gfortran cmake; \
13-
apt-get -y install pkg-config bison; \
14-
apt-get -y install flex valgrind;
11+
RUN apt-get update -y \
12+
&& apt-get upgrade -y \
13+
&& apt-get install -y \
14+
ubuntu-dev-tools unzip cmake pkg-config wget \
15+
gfortran liblapack-dev libblas-dev libpython3-dev \
16+
&& ln -fs /usr/share/zoneinfo/$TZ /etc/localtime \
17+
&& dpkg-reconfigure -f noninteractive tzdata \
18+
&& rm -rf /var/lib/apt/lists/*
1519

1620
# Create directory structure
17-
RUN mkdir repo
21+
RUN mkdir -p /repo
22+
23+
# Copy the coinhsl.tar.gz file into the repo folder
24+
# COPY ./hsl/coinhsl.tar.gz /repo/coinhsl.tar.gz
1825

1926
# Install PETSc
20-
# 3.20.6 is the newest version that works with the PETSc extras
21-
# included in this repo
22-
RUN cd repo; \
23-
wget https://gitlab.com/petsc/petsc/-/archive/v3.20.6/petsc-v3.20.6.tar.gz; \
24-
tar -zxvf petsc-v3.20.6.tar.gz; \
25-
mv petsc-v3.20.6 petsc; \
26-
mkdir petsc-dist; \
27-
cd petsc; \
28-
./configure configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 --download-metis --download-mumps --with-mumps-serial=1 --prefix=/repo/petsc-dist; \
29-
make;\
30-
make install;
27+
RUN cd /repo \
28+
&& wget https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-3.20.6.tar.gz \
29+
&& tar -zxvf petsc-3.20.6.tar.gz \
30+
&& mv petsc-3.20.6 petsc \
31+
&& mkdir petsc-dist \
32+
&& cd petsc \
33+
&& ./configure --with-debug=0 --with-shared=0 --with-mpi=0 --with-fortran-bindings=0 \
34+
--download-metis --download-mumps --with-mumps-serial=1 \
35+
--prefix=/repo/petsc-dist \
36+
&& make \
37+
&& make install
3138

3239
# Install boost
33-
RUN cd repo; \
34-
wget https://boostorg.jfrog.io/artifactory/main/release/1.86.0/source/boost_1_86_0.tar.gz; \
35-
tar -zxvf boost_1_86_0.tar.gz; \
36-
cd ./boost_1_86_0; \
37-
sh bootstrap.sh --prefix=/usr/local/; \
38-
chmod a+x ./b2; \
39-
./b2 install || true;
40+
RUN cd /repo \
41+
&& wget https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz \
42+
&& tar -zxvf boost_1_87_0.tar.gz \
43+
&& cd boost_1_87_0 \
44+
&& sh bootstrap.sh --prefix=/usr/local \
45+
&& chmod a+x ./b2 \
46+
&& ./b2 install

0 commit comments

Comments
 (0)