From d283613ba5d7e0b942d74031943d3c942a9eeb6f Mon Sep 17 00:00:00 2001 From: Jarett Date: Sun, 31 Mar 2024 13:54:13 -0700 Subject: [PATCH 1/4] add dockerfile to containerize conman also add git to docker build env. Also added docker-devel script to make it easier to use conman inside the container. --- docker-devel | 3 +++ docker/conman-buildenv-bionic/Dockerfile | 1 + docker/conman/Dockerfile | 17 +++++++++++++++++ docker/conman/README.md | 1 + 4 files changed, 22 insertions(+) create mode 100755 docker-devel create mode 100644 docker/conman/Dockerfile create mode 100644 docker/conman/README.md diff --git a/docker-devel b/docker-devel new file mode 100755 index 0000000..a592eb4 --- /dev/null +++ b/docker-devel @@ -0,0 +1,3 @@ +#!/bin/sh + +docker run -it --rm -v $HOME/conman:/home/conman_user/work conman \ No newline at end of file diff --git a/docker/conman-buildenv-bionic/Dockerfile b/docker/conman-buildenv-bionic/Dockerfile index 2dbfb57..a4180e4 100644 --- a/docker/conman-buildenv-bionic/Dockerfile +++ b/docker/conman-buildenv-bionic/Dockerfile @@ -5,4 +5,5 @@ RUN apt update && \ DEBCONF_NONINTERACTIVE_SEEN='true' \ apt install --yes \ build-essential \ + git \ gfortran diff --git a/docker/conman/Dockerfile b/docker/conman/Dockerfile new file mode 100644 index 0000000..e7cc20b --- /dev/null +++ b/docker/conman/Dockerfile @@ -0,0 +1,17 @@ +FROM geodynamics/conman-buildenv-bionic:latest + +RUN useradd \ + --create-home \ + conman_user + +USER conman_user + +WORKDIR /home/conman_user + +RUN git clone 'https://github.com/geodynamics/conman.git' + +WORKDIR /home/conman_user/conman/src + +RUN make + +WORKDIR /home/conman_user \ No newline at end of file diff --git a/docker/conman/README.md b/docker/conman/README.md new file mode 100644 index 0000000..894d6f6 --- /dev/null +++ b/docker/conman/README.md @@ -0,0 +1 @@ +This container hosts a built version of conman. From 2652b7c2986fefed07dac919472f64ddfbd64c69 Mon Sep 17 00:00:00 2001 From: Jarett Date: Wed, 3 Apr 2024 05:52:11 -0700 Subject: [PATCH 2/4] add path env for conman --- docker-devel | 2 +- docker/conman/Dockerfile | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docker-devel b/docker-devel index a592eb4..885c0a5 100755 --- a/docker-devel +++ b/docker-devel @@ -1,3 +1,3 @@ #!/bin/sh -docker run -it --rm -v $HOME/conman:/home/conman_user/work conman \ No newline at end of file +docker run -it --rm -v $HOME/conman:/home/conman_user/work conman diff --git a/docker/conman/Dockerfile b/docker/conman/Dockerfile index e7cc20b..932bdbe 100644 --- a/docker/conman/Dockerfile +++ b/docker/conman/Dockerfile @@ -10,8 +10,6 @@ WORKDIR /home/conman_user RUN git clone 'https://github.com/geodynamics/conman.git' -WORKDIR /home/conman_user/conman/src +ENV PATH="/home/conman_user/conman:${PATH}" -RUN make - -WORKDIR /home/conman_user \ No newline at end of file +RUN cd conman/src; make From 6c63680999b4de722687748ccc104c2b6c9abc55 Mon Sep 17 00:00:00 2001 From: Jarett Date: Thu, 11 Apr 2024 12:03:02 -0700 Subject: [PATCH 3/4] move docker-devel command to README --- docker-devel | 3 --- docker/conman/README.md | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) delete mode 100755 docker-devel diff --git a/docker-devel b/docker-devel deleted file mode 100755 index 885c0a5..0000000 --- a/docker-devel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -docker run -it --rm -v $HOME/conman:/home/conman_user/work conman diff --git a/docker/conman/README.md b/docker/conman/README.md index 894d6f6..d8d2986 100644 --- a/docker/conman/README.md +++ b/docker/conman/README.md @@ -1 +1,5 @@ This container hosts a built version of conman. + +docker run -it --rm -v $HOME/conman:/home/conman_user/work conman + +This command will start the conman docker image and give you terminal access. Any changes made in the /home/conman_user/work directory will be reflected on the host machine at home/conman. From de9749365aea4ff933cbb99584a1e2bceefd72a6 Mon Sep 17 00:00:00 2001 From: Jarett <72581853+JarettBakerDunn@users.noreply.github.com> Date: Thu, 11 Apr 2024 12:30:30 -0700 Subject: [PATCH 4/4] Update docker/conman/README.md Co-authored-by: Rene Gassmoeller --- docker/conman/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/conman/README.md b/docker/conman/README.md index d8d2986..1409765 100644 --- a/docker/conman/README.md +++ b/docker/conman/README.md @@ -1,5 +1,5 @@ This container hosts a built version of conman. -docker run -it --rm -v $HOME/conman:/home/conman_user/work conman +docker run -it --rm -v $HOME/conman:/home/conman_user/work geodynamics/conman This command will start the conman docker image and give you terminal access. Any changes made in the /home/conman_user/work directory will be reflected on the host machine at home/conman.