Skip to content
Snippets Groups Projects
Commit 3a7b42e4 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'feature/improve-docker-iamge-creation-script' into 'master'

Feature/improve docker iamge creation script

See merge request !2985
parents 1b831a1b 84d5dd85
No related branches found
No related tags found
Loading
Checking pipeline status
......@@ -55,7 +55,8 @@ if __name__ == "__main__":
# get folder with the template files
templateFolder = args["templateFolder"]
if not templateFolder:
templateFolder = os.path.join(modulePath, "../dumux/docker")
templateFolder = os.path.join(__file__, "../dumux/docker")
print(f"Folder with template files not given. Defaulting to '{templateFolder}'.")
if not os.path.exists(templateFolder):
sys.exit(f"Template folder {templateFolder} could not be found")
......@@ -163,7 +164,7 @@ if __name__ == "__main__":
else:
print(
"You can build your Docker image later by running "
f"'docker build -f Dockerfile -t {dockerTag}' "
f"'docker build -f Dockerfile -t {dockerTag}' ."
"from within the folder 'docker' that was created by this script, "
"and in which you should find the 'Dockerfile'."
)
# ${modName} docker container
# see https://github.com/phusion/baseimage-docker for information on the base image
# It is Ubuntu LTS customized for better Docker compatibility
FROM phusion/baseimage:18.04-1.0.0
FROM phusion/baseimage:focal-1.1.0
MAINTAINER ${modMaintainer}
# run Ubuntu update as advised on https://github.com/phusion/baseimage-docker
......@@ -20,6 +20,7 @@ RUN apt-get update \
python3-pip \
git \
pkg-config \
cmake \
build-essential \
gfortran \
mpi-default-bin \
......@@ -32,11 +33,6 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# get cmake 3.18 and export it to path
RUN mkdir -p cmake-3.18
RUN wget -qO- "https://cmake.org/files/v3.18/cmake-3.18.0-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C cmake-3.18
ENV PATH="/cmake-3.18/bin:$${PATH}"
# add the permission helper script to the my_init service
COPY setpermissions.sh /etc/my_init.d/setpermissions.sh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment