From cf6ebfe9370fc2c6353ebbc9050bd6b739886c33 Mon Sep 17 00:00:00 2001 From: MADELA Patrick <patrick.madela@synchrotron-soleil.fr> Date: Wed, 29 Sep 2021 15:42:15 +0200 Subject: [PATCH] Update README and Dockerfile --- Dockerfile | 12 ++++++------ README.md | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 891acf9..9d3a93e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ FROM centos:6 -RUN sed -i '/^mirrorlist/s/^/#/;/^#baseurl/{s/#//;s/mirror.centos.org\/centos\/$releasever/vault.centos.org\/6.10/}' /etc/yum.repos.d/*B* ; \ - yum -y update && yum clean all ; \ - yum -y groupinstall -y "Development Tools" ; \ - yum -y install cmake ; \ - yum -y install epel-release ; \ - yum -y install cmake3 +RUN sed -i '/^mirrorlist/s/^/#/;/^#baseurl/{s/#//;s/mirror.centos.org\/centos\/$releasever/vault.centos.org\/6.10/}' /etc/yum.repos.d/*B* \ +&& yum -y update && yum clean all \ +&& yum -y groupinstall -y "Development Tools" \ +&& yum -y install cmake \ +&& yum -y install epel-release \ +&& yum -y install cmake3 CMD ["/bin/bash"] diff --git a/README.md b/README.md index 217d2a3..8a19103 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,38 @@ # dev-el6 -To build a CentOS 6 development container for build and unit test +Docker container image based on official CentOS 6 image with development tools + +- gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC) +- cmake version 2.8.12.2 +- cmake3 version 3.6.1 + +## Build image + +``` +docker build -t registry.gitlab.com/synchrotron-soleil/control-system/containers/dev-el6 . +``` + +If proxy issue + +``` +docker build --build-arg http_proxy=http://proxy.synchrotron-soleil.fr:8080 --build-arg https_proxy=http://proxy.synchrotron-soleil.fr:8080 -t registry.gitlab.com/synchrotron-soleil/control-system/containers/dev-el6 . +``` + +## Example of usage + +``` +$ git clone git@gitlab.synchrotron-soleil.fr:control-system/sandbox/cmake-catch1-hello.git +... +$ docker run --rm -it --user $UID -v $(pwd):/data registry.gitlab.com/synchrotron-soleil/control-system/containers/dev-el6 +bash-4.2$ cd /data +bash-4.2$ cmake3 -H. -Bbuild +... +bash-4.2$ cmake3 --build build +... +bash-4.2$ build/unit_tests +... +bash-4.2$ build/unit_tests -r xml +... +bash-4.2$ build/SayHello +Hello World +``` -- GitLab