From 2a3aca70e0a214ab8ec5afc0600ab3949d5a5ca0 Mon Sep 17 00:00:00 2001 From: Dirk Baechle Date: Sun, 15 Mar 2020 18:23:28 +0100 Subject: Adding Docker container files for Ubuntu 19.10. Adding a 'build' and 'test' Docker container, such that users/developers can create a clean and reproducible environment for testing and building/releasing SCons on their machines. --- docker/docker.rst | 101 +++++++++++++++++++++ docker/ubuntu19.10/build/Dockerfile | 17 ++++ docker/ubuntu19.10/build/build_image.sh | 16 ++++ docker/ubuntu19.10/build/docker-compose.yml | 22 +++++ docker/ubuntu19.10/build/readme.rst | 43 +++++++++ docker/ubuntu19.10/build/start_build_shell.sh | 18 ++++ .../ubuntu19.10/build/startup/setup_container.sh | 10 ++ docker/ubuntu19.10/build/stop_build_shell.sh | 17 ++++ docker/ubuntu19.10/test/Dockerfile | 10 ++ docker/ubuntu19.10/test/build_image.sh | 16 ++++ docker/ubuntu19.10/test/docker-compose.yml | 22 +++++ docker/ubuntu19.10/test/readme.rst | 43 +++++++++ docker/ubuntu19.10/test/start_test_shell.sh | 18 ++++ docker/ubuntu19.10/test/startup/setup_container.sh | 10 ++ docker/ubuntu19.10/test/stop_test_shell.sh | 17 ++++ 15 files changed, 380 insertions(+) create mode 100644 docker/docker.rst create mode 100644 docker/ubuntu19.10/build/Dockerfile create mode 100755 docker/ubuntu19.10/build/build_image.sh create mode 100644 docker/ubuntu19.10/build/docker-compose.yml create mode 100644 docker/ubuntu19.10/build/readme.rst create mode 100755 docker/ubuntu19.10/build/start_build_shell.sh create mode 100755 docker/ubuntu19.10/build/startup/setup_container.sh create mode 100755 docker/ubuntu19.10/build/stop_build_shell.sh create mode 100644 docker/ubuntu19.10/test/Dockerfile create mode 100755 docker/ubuntu19.10/test/build_image.sh create mode 100644 docker/ubuntu19.10/test/docker-compose.yml create mode 100644 docker/ubuntu19.10/test/readme.rst create mode 100755 docker/ubuntu19.10/test/start_test_shell.sh create mode 100755 docker/ubuntu19.10/test/startup/setup_container.sh create mode 100755 docker/ubuntu19.10/test/stop_test_shell.sh diff --git a/docker/docker.rst b/docker/docker.rst new file mode 100644 index 0000000..5845486 --- /dev/null +++ b/docker/docker.rst @@ -0,0 +1,101 @@ +================================== +Basic working with docker registry +================================== + +Install required packages +========================= + +Ensure that the following packages are installed on your local machine:: + + docker.io >= v18.09 + docker-compose >= v1.17 + +User and group +============== + +Add your local user to the `docker` group, e.g. by:: + + sudo usermod -aG docker ${USER} + +. After this step logout and login again, so that the change has been applied and the new group +is in effect. + + +Configuring docker daemon +========================= + +Reconfigure by editing `/etc/docker/daemon.json` as *root*:: + + { + "debug": false + } + +. + +Then reboot the machine or simply restart the daemon as *root* with:: + + sudo systemctl restart docker.service + +To check that the docker daemon was configured correctly, do a:: + + docker info + +which should result in an output similar to:: + + Client: + Debug Mode: false + + Server: + Containers: 0 + Running: 0 + Paused: 0 + Stopped: 0 + Images: 0 + Server Version: 19.03.6 + Storage Driver: overlay2 + Backing Filesystem: extfs + Supports d_type: true + Native Overlay Diff: true + Logging Driver: json-file + Cgroup Driver: cgroupfs + Plugins: + Volume: local + Network: bridge host ipvlan macvlan null overlay + Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog + Swarm: inactive + Runtimes: runc + Default Runtime: runc + Init Binary: docker-init + containerd version: + runc version: + init version: + Security Options: + apparmor + seccomp + Profile: default + Kernel Version: 4.15.0-88-generic + Operating System: Ubuntu 18.04.4 LTS + OSType: linux + Architecture: x86_64 + CPUs: 4 + Total Memory: 6.997GiB + Name: ubuntu + ID: H2N5:VOZ6:UO6V:B36O:MD6Q:7GXR:M4QY:7EBB:NC6R:HQCQ:7ARF:CZBH + Docker Root Dir: /var/lib/docker + Debug Mode: false + Registry: https://index.docker.io/v1/ + Labels: + Experimental: false + Insecure Registries: + 127.0.0.0/8 + Live Restore Enabled: false + + WARNING: No swap limit support + +Setup resolv.conf if necessary +=============================== + +Docker uses `etc/resolv.conf` DNS information and passes that automatically to containers. If the file is not configured +properly or if entries are not valid, the server adds automatically public Google DNS nameservers +(8.8.8.8 and 8.8.4.4) to the container's DNS configuration. + diff --git a/docker/ubuntu19.10/build/Dockerfile b/docker/ubuntu19.10/build/Dockerfile new file mode 100644 index 0000000..38f4dd7 --- /dev/null +++ b/docker/ubuntu19.10/build/Dockerfile @@ -0,0 +1,17 @@ +# Building an SCons Release Build image under Ubuntu 19.10 +FROM ubuntu:19.10 + +LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Release Build, based on an Ubuntu 19.10" + +# Install additional packages +RUN apt-get update && apt-get -y install git python3-lxml fop libfontbox-java python3-dev rpm tar curl lynx xterm vim vim-common nano sudo + +# Install hyphenation patterns for FOP +RUN mkdir /opt/offo && cd /opt/offo && curl -L --output offo-hyphenation-compiled.zip https://sourceforge.net/projects/offo/files/offo-hyphenation/2.2/offo-hyphenation-compiled.zip/download && unzip offo-hyphenation-compiled.zip && cp offo-hyphenation-compiled/fop-hyph.jar /usr/share/fop/ + +# Epydoc can be installed via pip3, but it doesn't seem to work properly. +# For the moment we don't install it and might replace it with Sphinx later... +# RUN apt-get -y install python3-pip && pip3 install epydoc + +CMD ["/bin/bash"] + diff --git a/docker/ubuntu19.10/build/build_image.sh b/docker/ubuntu19.10/build/build_image.sh new file mode 100755 index 0000000..29e0f7e --- /dev/null +++ b/docker/ubuntu19.10/build/build_image.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker build passing any other build options (command line options may override!) +docker build --network=host --file Dockerfile \ + -t scons-build-ubuntu19.10:latest -t scons-build-ubuntu19.10:0.0.1 "$@" . + +cd $OLD_WD + diff --git a/docker/ubuntu19.10/build/docker-compose.yml b/docker/ubuntu19.10/build/docker-compose.yml new file mode 100644 index 0000000..aa34bac --- /dev/null +++ b/docker/ubuntu19.10/build/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + build: + image: scons-build-ubuntu19.10:latest + restart: always + environment: + - DISPLAY + - HOME + volumes: + - /home:/home + - /tmp:/tmp + - /etc/sudoers:/etc/sudoers:ro + - /etc/passwd:/etc/passwd:ro + - /etc/shadow:/etc/shadow:ro + - /etc/group:/etc/group:ro + - ./startup:/startup + container_name: SCons_Build_Ubuntu19.10 + entrypoint: /startup/setup_container.sh + user: $DOCKERUID:$DOCKERGID + working_dir: $HOME + diff --git a/docker/ubuntu19.10/build/readme.rst b/docker/ubuntu19.10/build/readme.rst new file mode 100644 index 0000000..b21d52c --- /dev/null +++ b/docker/ubuntu19.10/build/readme.rst @@ -0,0 +1,43 @@ +================================== +Image for building/releasing SCons +================================== + +This folder contains the files and scripts that can be used to +build and release SCons, based on an Ubuntu 19.10. + +Building the image +================== + +Build the local docker image by calling:: + + ./build_image.sh + +This will download the base image and install the required additional packages. + +Starting the image +================== + +Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: + + ./start_build_shell.sh + +which will open a new ``xterm`` with your current user on the host system as default. + +If you need additional setup steps or want to *mount* different folders to the build image, change the +files:: + + docker-compose.yml + ./startup/setup_container.sh + +locally. + + +Stopping the image +================== + +Simply call:: + + ./stop_build_shell.sh + +. + diff --git a/docker/ubuntu19.10/build/start_build_shell.sh b/docker/ubuntu19.10/build/start_build_shell.sh new file mode 100755 index 0000000..6905634 --- /dev/null +++ b/docker/ubuntu19.10/build/start_build_shell.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +xhost +local:docker +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose up -d + +cd $OLD_WD + diff --git a/docker/ubuntu19.10/build/startup/setup_container.sh b/docker/ubuntu19.10/build/startup/setup_container.sh new file mode 100755 index 0000000..f655441 --- /dev/null +++ b/docker/ubuntu19.10/build/startup/setup_container.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Here we can add local setup steps for the finishing touches to our Docker build container. +# This can be setting symbolic links, e.g. +# sudo ln -s /disk2/stuff /stuff +# or triggering further scripts. + +# We start a separate xterm/terminal, such that the container doesn't exit right away... +/usr/bin/xterm + diff --git a/docker/ubuntu19.10/build/stop_build_shell.sh b/docker/ubuntu19.10/build/stop_build_shell.sh new file mode 100755 index 0000000..c0a9707 --- /dev/null +++ b/docker/ubuntu19.10/build/stop_build_shell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose down + +cd $OLD_WD + diff --git a/docker/ubuntu19.10/test/Dockerfile b/docker/ubuntu19.10/test/Dockerfile new file mode 100644 index 0000000..a86947e --- /dev/null +++ b/docker/ubuntu19.10/test/Dockerfile @@ -0,0 +1,10 @@ +# Building an SCons Test image under Ubuntu 19.10 +FROM ubuntu:19.10 + +LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Test image, based on an Ubuntu 19.10" + +# Install additional packages +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install git bison cssc cvs flex g++ gcc ghostscript m4 openssh-client openssh-server python3-profiler python3-all-dev pypy-dev rcs rpm openjdk-8-jdk swig texlive-base-bin texlive-extra-utils texlive-latex-base texlive-latex-extra zip xterm vim vim-common nano sudo + +CMD ["/bin/bash"] + diff --git a/docker/ubuntu19.10/test/build_image.sh b/docker/ubuntu19.10/test/build_image.sh new file mode 100755 index 0000000..92649a0 --- /dev/null +++ b/docker/ubuntu19.10/test/build_image.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker build passing any other build options (command line options may override!) +docker build --network=host --file Dockerfile \ + -t scons-test-ubuntu19.10:latest -t scons-test-ubuntu19.10:0.0.1 "$@" . + +cd $OLD_WD + diff --git a/docker/ubuntu19.10/test/docker-compose.yml b/docker/ubuntu19.10/test/docker-compose.yml new file mode 100644 index 0000000..1f3777f --- /dev/null +++ b/docker/ubuntu19.10/test/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + build: + image: scons-test-ubuntu19.10:latest + restart: always + environment: + - DISPLAY + - HOME + volumes: + - /home:/home + - /tmp:/tmp + - /etc/sudoers:/etc/sudoers:ro + - /etc/passwd:/etc/passwd:ro + - /etc/shadow:/etc/shadow:ro + - /etc/group:/etc/group:ro + - ./startup:/startup + container_name: SCons_Test_Ubuntu19.10 + entrypoint: /startup/setup_container.sh + user: $DOCKERUID:$DOCKERGID + working_dir: $HOME + diff --git a/docker/ubuntu19.10/test/readme.rst b/docker/ubuntu19.10/test/readme.rst new file mode 100644 index 0000000..d7247d2 --- /dev/null +++ b/docker/ubuntu19.10/test/readme.rst @@ -0,0 +1,43 @@ +======================= +Image for testing SCons +======================= + +This folder contains the files and scripts that can be used to +test SCons, based on an Ubuntu 19.10. + +Building the image +================== + +Build the local docker image by calling:: + + ./build_image.sh + +This will download the base image and install the required additional packages. + +Starting the image +================== + +Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: + + ./start_test_shell.sh + +which will open a new ``xterm`` with your current user on the host system as default. + +If you need additional setup steps or want to *mount* different folders to the test image, change the +files:: + + docker-compose.yml + ./startup/setup_container.sh + +locally. + + +Stopping the image +================== + +Simply call:: + + ./stop_test_shell.sh + +. + diff --git a/docker/ubuntu19.10/test/start_test_shell.sh b/docker/ubuntu19.10/test/start_test_shell.sh new file mode 100755 index 0000000..6905634 --- /dev/null +++ b/docker/ubuntu19.10/test/start_test_shell.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +xhost +local:docker +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose up -d + +cd $OLD_WD + diff --git a/docker/ubuntu19.10/test/startup/setup_container.sh b/docker/ubuntu19.10/test/startup/setup_container.sh new file mode 100755 index 0000000..f655441 --- /dev/null +++ b/docker/ubuntu19.10/test/startup/setup_container.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Here we can add local setup steps for the finishing touches to our Docker build container. +# This can be setting symbolic links, e.g. +# sudo ln -s /disk2/stuff /stuff +# or triggering further scripts. + +# We start a separate xterm/terminal, such that the container doesn't exit right away... +/usr/bin/xterm + diff --git a/docker/ubuntu19.10/test/stop_test_shell.sh b/docker/ubuntu19.10/test/stop_test_shell.sh new file mode 100755 index 0000000..c0a9707 --- /dev/null +++ b/docker/ubuntu19.10/test/stop_test_shell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose down + +cd $OLD_WD + -- cgit v0.12 From cb1943f56f40c099b9aa77d8f3aa9e8262950560 Mon Sep 17 00:00:00 2001 From: Dirk Baechle Date: Sun, 15 Mar 2020 23:13:35 +0100 Subject: Adding Docker container files for Fedora 30. --- docker/fedora30/build/Dockerfile | 17 ++++++++++ docker/fedora30/build/build_image.sh | 16 +++++++++ docker/fedora30/build/docker-compose.yml | 22 ++++++++++++ docker/fedora30/build/readme.rst | 43 ++++++++++++++++++++++++ docker/fedora30/build/start_build_shell.sh | 18 ++++++++++ docker/fedora30/build/startup/setup_container.sh | 10 ++++++ docker/fedora30/build/stop_build_shell.sh | 17 ++++++++++ docker/fedora30/test/Dockerfile | 10 ++++++ docker/fedora30/test/build_image.sh | 16 +++++++++ docker/fedora30/test/docker-compose.yml | 22 ++++++++++++ docker/fedora30/test/readme.rst | 43 ++++++++++++++++++++++++ docker/fedora30/test/start_test_shell.sh | 18 ++++++++++ docker/fedora30/test/startup/setup_container.sh | 10 ++++++ docker/fedora30/test/stop_test_shell.sh | 17 ++++++++++ 14 files changed, 279 insertions(+) create mode 100644 docker/fedora30/build/Dockerfile create mode 100755 docker/fedora30/build/build_image.sh create mode 100644 docker/fedora30/build/docker-compose.yml create mode 100644 docker/fedora30/build/readme.rst create mode 100755 docker/fedora30/build/start_build_shell.sh create mode 100755 docker/fedora30/build/startup/setup_container.sh create mode 100755 docker/fedora30/build/stop_build_shell.sh create mode 100644 docker/fedora30/test/Dockerfile create mode 100755 docker/fedora30/test/build_image.sh create mode 100644 docker/fedora30/test/docker-compose.yml create mode 100644 docker/fedora30/test/readme.rst create mode 100755 docker/fedora30/test/start_test_shell.sh create mode 100755 docker/fedora30/test/startup/setup_container.sh create mode 100755 docker/fedora30/test/stop_test_shell.sh diff --git a/docker/fedora30/build/Dockerfile b/docker/fedora30/build/Dockerfile new file mode 100644 index 0000000..c62037b --- /dev/null +++ b/docker/fedora30/build/Dockerfile @@ -0,0 +1,17 @@ +# Building an SCons Release Build image under Fedora 30 +FROM fedora:30 + +LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Release Build, based on a Fedora 30" + +# Install additional packages +RUN dnf -y install git python3-lxml fop fontbox python3-devel lynx xterm vim vim-common nano + +# Install hyphenation patterns for FOP +RUN mkdir /opt/offo && cd /opt/offo && curl -L --output offo-hyphenation-compiled.zip https://sourceforge.net/projects/offo/files/offo-hyphenation/2.2/offo-hyphenation-compiled.zip/download && unzip offo-hyphenation-compiled.zip && cp offo-hyphenation-compiled/fop-hyph.jar /usr/share/fop/ + +# Epydoc can be installed via pip3, but it doesn't seem to work properly. +# For the moment we don't install it and might replace it with Sphinx later... +# RUN dnf -y install python3-pip && pip3 install epydoc + +CMD ["/bin/bash"] + diff --git a/docker/fedora30/build/build_image.sh b/docker/fedora30/build/build_image.sh new file mode 100755 index 0000000..afd04b8 --- /dev/null +++ b/docker/fedora30/build/build_image.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker build passing any other build options (command line options may override!) +docker build --network=host --file Dockerfile \ + -t scons-build-fedora30:latest -t scons-build-fedora30:0.0.1 "$@" . + +cd $OLD_WD + diff --git a/docker/fedora30/build/docker-compose.yml b/docker/fedora30/build/docker-compose.yml new file mode 100644 index 0000000..86f3031 --- /dev/null +++ b/docker/fedora30/build/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + build: + image: scons-build-fedora30:latest + restart: always + environment: + - DISPLAY + - HOME + volumes: + - /home:/home + - /tmp:/tmp + - /etc/sudoers:/etc/sudoers:ro + - /etc/passwd:/etc/passwd:ro + - /etc/shadow:/etc/shadow:ro + - /etc/group:/etc/group:ro + - ./startup:/startup + container_name: SCons_Build_Fedora30 + entrypoint: /startup/setup_container.sh + user: $DOCKERUID:$DOCKERGID + working_dir: $HOME + diff --git a/docker/fedora30/build/readme.rst b/docker/fedora30/build/readme.rst new file mode 100644 index 0000000..18ac401 --- /dev/null +++ b/docker/fedora30/build/readme.rst @@ -0,0 +1,43 @@ +================================== +Image for building/releasing SCons +================================== + +This folder contains the files and scripts that can be used to +build and release SCons, based on a Fedora 30. + +Building the image +================== + +Build the local docker image by calling:: + + ./build_image.sh + +This will download the base image and install the required additional packages. + +Starting the image +================== + +Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: + + ./start_build_shell.sh + +which will open a new ``xterm`` with your current user on the host system as default. + +If you need additional setup steps or want to *mount* different folders to the build image, change the +files:: + + docker-compose.yml + ./startup/setup_container.sh + +locally. + + +Stopping the image +================== + +Simply call:: + + ./stop_build_shell.sh + +. + diff --git a/docker/fedora30/build/start_build_shell.sh b/docker/fedora30/build/start_build_shell.sh new file mode 100755 index 0000000..6905634 --- /dev/null +++ b/docker/fedora30/build/start_build_shell.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +xhost +local:docker +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose up -d + +cd $OLD_WD + diff --git a/docker/fedora30/build/startup/setup_container.sh b/docker/fedora30/build/startup/setup_container.sh new file mode 100755 index 0000000..f655441 --- /dev/null +++ b/docker/fedora30/build/startup/setup_container.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Here we can add local setup steps for the finishing touches to our Docker build container. +# This can be setting symbolic links, e.g. +# sudo ln -s /disk2/stuff /stuff +# or triggering further scripts. + +# We start a separate xterm/terminal, such that the container doesn't exit right away... +/usr/bin/xterm + diff --git a/docker/fedora30/build/stop_build_shell.sh b/docker/fedora30/build/stop_build_shell.sh new file mode 100755 index 0000000..c0a9707 --- /dev/null +++ b/docker/fedora30/build/stop_build_shell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose down + +cd $OLD_WD + diff --git a/docker/fedora30/test/Dockerfile b/docker/fedora30/test/Dockerfile new file mode 100644 index 0000000..20a0749 --- /dev/null +++ b/docker/fedora30/test/Dockerfile @@ -0,0 +1,10 @@ +# Building an SCons Test image under Fedora 30 +FROM fedora:30 + +LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Test image, based on a Fedora 30" + +# Install additional packages +RUN dnf -y install git bison cvs flex g++ gcc ghostscript m4 openssh-clients openssh-server python3-line_profiler python3-devel pypy3-devel rpm-build rcs java-1.8.0-openjdk swig texlive-scheme-basic texlive-base texlive-latex zip xterm vim vim-common nano + +CMD ["/bin/bash"] + diff --git a/docker/fedora30/test/build_image.sh b/docker/fedora30/test/build_image.sh new file mode 100755 index 0000000..5e1eaba --- /dev/null +++ b/docker/fedora30/test/build_image.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker build passing any other build options (command line options may override!) +docker build --network=host --file Dockerfile \ + -t scons-test-fedora30:latest -t scons-test-fedora30:0.0.1 "$@" . + +cd $OLD_WD + diff --git a/docker/fedora30/test/docker-compose.yml b/docker/fedora30/test/docker-compose.yml new file mode 100644 index 0000000..25daa18 --- /dev/null +++ b/docker/fedora30/test/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + build: + image: scons-test-fedora30:latest + restart: always + environment: + - DISPLAY + - HOME + volumes: + - /home:/home + - /tmp:/tmp + - /etc/sudoers:/etc/sudoers:ro + - /etc/passwd:/etc/passwd:ro + - /etc/shadow:/etc/shadow:ro + - /etc/group:/etc/group:ro + - ./startup:/startup + container_name: SCons_Test_Fedora30 + entrypoint: /startup/setup_container.sh + user: $DOCKERUID:$DOCKERGID + working_dir: $HOME + diff --git a/docker/fedora30/test/readme.rst b/docker/fedora30/test/readme.rst new file mode 100644 index 0000000..8cba2e9 --- /dev/null +++ b/docker/fedora30/test/readme.rst @@ -0,0 +1,43 @@ +======================= +Image for testing SCons +======================= + +This folder contains the files and scripts that can be used to +test SCons, based on a Fedora 30. + +Building the image +================== + +Build the local docker image by calling:: + + ./build_image.sh + +This will download the base image and install the required additional packages. + +Starting the image +================== + +Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: + + ./start_test_shell.sh + +which will open a new ``xterm`` with your current user on the host system as default. + +If you need additional setup steps or want to *mount* different folders to the test image, change the +files:: + + docker-compose.yml + ./startup/setup_container.sh + +locally. + + +Stopping the image +================== + +Simply call:: + + ./stop_test_shell.sh + +. + diff --git a/docker/fedora30/test/start_test_shell.sh b/docker/fedora30/test/start_test_shell.sh new file mode 100755 index 0000000..6905634 --- /dev/null +++ b/docker/fedora30/test/start_test_shell.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +xhost +local:docker +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose up -d + +cd $OLD_WD + diff --git a/docker/fedora30/test/startup/setup_container.sh b/docker/fedora30/test/startup/setup_container.sh new file mode 100755 index 0000000..f655441 --- /dev/null +++ b/docker/fedora30/test/startup/setup_container.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Here we can add local setup steps for the finishing touches to our Docker build container. +# This can be setting symbolic links, e.g. +# sudo ln -s /disk2/stuff /stuff +# or triggering further scripts. + +# We start a separate xterm/terminal, such that the container doesn't exit right away... +/usr/bin/xterm + diff --git a/docker/fedora30/test/stop_test_shell.sh b/docker/fedora30/test/stop_test_shell.sh new file mode 100755 index 0000000..c0a9707 --- /dev/null +++ b/docker/fedora30/test/stop_test_shell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose down + +cd $OLD_WD + -- cgit v0.12 From eeb7d3132ca73ee72ce215b458174d474eccfa26 Mon Sep 17 00:00:00 2001 From: Dirk Baechle Date: Tue, 9 Jun 2020 22:53:04 +0200 Subject: Added issue reference to CHANGES.txt. --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index ea288f5..6257093 100755 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -10,6 +10,9 @@ NOTE: Please include a reference to any Issues resolved by your changes in the b RELEASE VERSION/DATE TO BE FILLED IN LATER + From Dirk Baechle: + - Added Docker images for building and testing SCons. (issue #3585) + From James Benton: - Improve Visual Studio solution/project generation code to add support for a per-variant cppflags. Intellisense can be affected by cppflags, -- cgit v0.12 From 3ed4cb6fd8dfe3e0655a6af00ae9c41430e5a019 Mon Sep 17 00:00:00 2001 From: Dirk Baechle Date: Wed, 10 Jun 2020 08:24:25 +0200 Subject: Moved the Docker files into the testing folder. [ci skip] --- docker/docker.rst | 101 --------------------- docker/fedora30/build/Dockerfile | 17 ---- docker/fedora30/build/build_image.sh | 16 ---- docker/fedora30/build/docker-compose.yml | 22 ----- docker/fedora30/build/readme.rst | 43 --------- docker/fedora30/build/start_build_shell.sh | 18 ---- docker/fedora30/build/startup/setup_container.sh | 10 -- docker/fedora30/build/stop_build_shell.sh | 17 ---- docker/fedora30/test/Dockerfile | 10 -- docker/fedora30/test/build_image.sh | 16 ---- docker/fedora30/test/docker-compose.yml | 22 ----- docker/fedora30/test/readme.rst | 43 --------- docker/fedora30/test/start_test_shell.sh | 18 ---- docker/fedora30/test/startup/setup_container.sh | 10 -- docker/fedora30/test/stop_test_shell.sh | 17 ---- docker/ubuntu19.10/build/Dockerfile | 17 ---- docker/ubuntu19.10/build/build_image.sh | 16 ---- docker/ubuntu19.10/build/docker-compose.yml | 22 ----- docker/ubuntu19.10/build/readme.rst | 43 --------- docker/ubuntu19.10/build/start_build_shell.sh | 18 ---- .../ubuntu19.10/build/startup/setup_container.sh | 10 -- docker/ubuntu19.10/build/stop_build_shell.sh | 17 ---- docker/ubuntu19.10/test/Dockerfile | 10 -- docker/ubuntu19.10/test/build_image.sh | 16 ---- docker/ubuntu19.10/test/docker-compose.yml | 22 ----- docker/ubuntu19.10/test/readme.rst | 43 --------- docker/ubuntu19.10/test/start_test_shell.sh | 18 ---- docker/ubuntu19.10/test/startup/setup_container.sh | 10 -- docker/ubuntu19.10/test/stop_test_shell.sh | 17 ---- testing/docker/docker.rst | 101 +++++++++++++++++++++ testing/docker/fedora30/build/Dockerfile | 17 ++++ testing/docker/fedora30/build/build_image.sh | 16 ++++ testing/docker/fedora30/build/docker-compose.yml | 22 +++++ testing/docker/fedora30/build/readme.rst | 43 +++++++++ testing/docker/fedora30/build/start_build_shell.sh | 18 ++++ .../fedora30/build/startup/setup_container.sh | 10 ++ testing/docker/fedora30/build/stop_build_shell.sh | 17 ++++ testing/docker/fedora30/test/Dockerfile | 10 ++ testing/docker/fedora30/test/build_image.sh | 16 ++++ testing/docker/fedora30/test/docker-compose.yml | 22 +++++ testing/docker/fedora30/test/readme.rst | 43 +++++++++ testing/docker/fedora30/test/start_test_shell.sh | 18 ++++ .../fedora30/test/startup/setup_container.sh | 10 ++ testing/docker/fedora30/test/stop_test_shell.sh | 17 ++++ testing/docker/ubuntu19.10/build/Dockerfile | 17 ++++ testing/docker/ubuntu19.10/build/build_image.sh | 16 ++++ .../docker/ubuntu19.10/build/docker-compose.yml | 22 +++++ testing/docker/ubuntu19.10/build/readme.rst | 43 +++++++++ .../docker/ubuntu19.10/build/start_build_shell.sh | 18 ++++ .../ubuntu19.10/build/startup/setup_container.sh | 10 ++ .../docker/ubuntu19.10/build/stop_build_shell.sh | 17 ++++ testing/docker/ubuntu19.10/test/Dockerfile | 10 ++ testing/docker/ubuntu19.10/test/build_image.sh | 16 ++++ testing/docker/ubuntu19.10/test/docker-compose.yml | 22 +++++ testing/docker/ubuntu19.10/test/readme.rst | 43 +++++++++ .../docker/ubuntu19.10/test/start_test_shell.sh | 18 ++++ .../ubuntu19.10/test/startup/setup_container.sh | 10 ++ testing/docker/ubuntu19.10/test/stop_test_shell.sh | 17 ++++ 58 files changed, 659 insertions(+), 659 deletions(-) delete mode 100644 docker/docker.rst delete mode 100644 docker/fedora30/build/Dockerfile delete mode 100755 docker/fedora30/build/build_image.sh delete mode 100644 docker/fedora30/build/docker-compose.yml delete mode 100644 docker/fedora30/build/readme.rst delete mode 100755 docker/fedora30/build/start_build_shell.sh delete mode 100755 docker/fedora30/build/startup/setup_container.sh delete mode 100755 docker/fedora30/build/stop_build_shell.sh delete mode 100644 docker/fedora30/test/Dockerfile delete mode 100755 docker/fedora30/test/build_image.sh delete mode 100644 docker/fedora30/test/docker-compose.yml delete mode 100644 docker/fedora30/test/readme.rst delete mode 100755 docker/fedora30/test/start_test_shell.sh delete mode 100755 docker/fedora30/test/startup/setup_container.sh delete mode 100755 docker/fedora30/test/stop_test_shell.sh delete mode 100644 docker/ubuntu19.10/build/Dockerfile delete mode 100755 docker/ubuntu19.10/build/build_image.sh delete mode 100644 docker/ubuntu19.10/build/docker-compose.yml delete mode 100644 docker/ubuntu19.10/build/readme.rst delete mode 100755 docker/ubuntu19.10/build/start_build_shell.sh delete mode 100755 docker/ubuntu19.10/build/startup/setup_container.sh delete mode 100755 docker/ubuntu19.10/build/stop_build_shell.sh delete mode 100644 docker/ubuntu19.10/test/Dockerfile delete mode 100755 docker/ubuntu19.10/test/build_image.sh delete mode 100644 docker/ubuntu19.10/test/docker-compose.yml delete mode 100644 docker/ubuntu19.10/test/readme.rst delete mode 100755 docker/ubuntu19.10/test/start_test_shell.sh delete mode 100755 docker/ubuntu19.10/test/startup/setup_container.sh delete mode 100755 docker/ubuntu19.10/test/stop_test_shell.sh create mode 100644 testing/docker/docker.rst create mode 100644 testing/docker/fedora30/build/Dockerfile create mode 100755 testing/docker/fedora30/build/build_image.sh create mode 100644 testing/docker/fedora30/build/docker-compose.yml create mode 100644 testing/docker/fedora30/build/readme.rst create mode 100755 testing/docker/fedora30/build/start_build_shell.sh create mode 100755 testing/docker/fedora30/build/startup/setup_container.sh create mode 100755 testing/docker/fedora30/build/stop_build_shell.sh create mode 100644 testing/docker/fedora30/test/Dockerfile create mode 100755 testing/docker/fedora30/test/build_image.sh create mode 100644 testing/docker/fedora30/test/docker-compose.yml create mode 100644 testing/docker/fedora30/test/readme.rst create mode 100755 testing/docker/fedora30/test/start_test_shell.sh create mode 100755 testing/docker/fedora30/test/startup/setup_container.sh create mode 100755 testing/docker/fedora30/test/stop_test_shell.sh create mode 100644 testing/docker/ubuntu19.10/build/Dockerfile create mode 100755 testing/docker/ubuntu19.10/build/build_image.sh create mode 100644 testing/docker/ubuntu19.10/build/docker-compose.yml create mode 100644 testing/docker/ubuntu19.10/build/readme.rst create mode 100755 testing/docker/ubuntu19.10/build/start_build_shell.sh create mode 100755 testing/docker/ubuntu19.10/build/startup/setup_container.sh create mode 100755 testing/docker/ubuntu19.10/build/stop_build_shell.sh create mode 100644 testing/docker/ubuntu19.10/test/Dockerfile create mode 100755 testing/docker/ubuntu19.10/test/build_image.sh create mode 100644 testing/docker/ubuntu19.10/test/docker-compose.yml create mode 100644 testing/docker/ubuntu19.10/test/readme.rst create mode 100755 testing/docker/ubuntu19.10/test/start_test_shell.sh create mode 100755 testing/docker/ubuntu19.10/test/startup/setup_container.sh create mode 100755 testing/docker/ubuntu19.10/test/stop_test_shell.sh diff --git a/docker/docker.rst b/docker/docker.rst deleted file mode 100644 index 5845486..0000000 --- a/docker/docker.rst +++ /dev/null @@ -1,101 +0,0 @@ -================================== -Basic working with docker registry -================================== - -Install required packages -========================= - -Ensure that the following packages are installed on your local machine:: - - docker.io >= v18.09 - docker-compose >= v1.17 - -User and group -============== - -Add your local user to the `docker` group, e.g. by:: - - sudo usermod -aG docker ${USER} - -. After this step logout and login again, so that the change has been applied and the new group -is in effect. - - -Configuring docker daemon -========================= - -Reconfigure by editing `/etc/docker/daemon.json` as *root*:: - - { - "debug": false - } - -. - -Then reboot the machine or simply restart the daemon as *root* with:: - - sudo systemctl restart docker.service - -To check that the docker daemon was configured correctly, do a:: - - docker info - -which should result in an output similar to:: - - Client: - Debug Mode: false - - Server: - Containers: 0 - Running: 0 - Paused: 0 - Stopped: 0 - Images: 0 - Server Version: 19.03.6 - Storage Driver: overlay2 - Backing Filesystem: extfs - Supports d_type: true - Native Overlay Diff: true - Logging Driver: json-file - Cgroup Driver: cgroupfs - Plugins: - Volume: local - Network: bridge host ipvlan macvlan null overlay - Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog - Swarm: inactive - Runtimes: runc - Default Runtime: runc - Init Binary: docker-init - containerd version: - runc version: - init version: - Security Options: - apparmor - seccomp - Profile: default - Kernel Version: 4.15.0-88-generic - Operating System: Ubuntu 18.04.4 LTS - OSType: linux - Architecture: x86_64 - CPUs: 4 - Total Memory: 6.997GiB - Name: ubuntu - ID: H2N5:VOZ6:UO6V:B36O:MD6Q:7GXR:M4QY:7EBB:NC6R:HQCQ:7ARF:CZBH - Docker Root Dir: /var/lib/docker - Debug Mode: false - Registry: https://index.docker.io/v1/ - Labels: - Experimental: false - Insecure Registries: - 127.0.0.0/8 - Live Restore Enabled: false - - WARNING: No swap limit support - -Setup resolv.conf if necessary -=============================== - -Docker uses `etc/resolv.conf` DNS information and passes that automatically to containers. If the file is not configured -properly or if entries are not valid, the server adds automatically public Google DNS nameservers -(8.8.8.8 and 8.8.4.4) to the container's DNS configuration. - diff --git a/docker/fedora30/build/Dockerfile b/docker/fedora30/build/Dockerfile deleted file mode 100644 index c62037b..0000000 --- a/docker/fedora30/build/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -# Building an SCons Release Build image under Fedora 30 -FROM fedora:30 - -LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Release Build, based on a Fedora 30" - -# Install additional packages -RUN dnf -y install git python3-lxml fop fontbox python3-devel lynx xterm vim vim-common nano - -# Install hyphenation patterns for FOP -RUN mkdir /opt/offo && cd /opt/offo && curl -L --output offo-hyphenation-compiled.zip https://sourceforge.net/projects/offo/files/offo-hyphenation/2.2/offo-hyphenation-compiled.zip/download && unzip offo-hyphenation-compiled.zip && cp offo-hyphenation-compiled/fop-hyph.jar /usr/share/fop/ - -# Epydoc can be installed via pip3, but it doesn't seem to work properly. -# For the moment we don't install it and might replace it with Sphinx later... -# RUN dnf -y install python3-pip && pip3 install epydoc - -CMD ["/bin/bash"] - diff --git a/docker/fedora30/build/build_image.sh b/docker/fedora30/build/build_image.sh deleted file mode 100755 index afd04b8..0000000 --- a/docker/fedora30/build/build_image.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker build passing any other build options (command line options may override!) -docker build --network=host --file Dockerfile \ - -t scons-build-fedora30:latest -t scons-build-fedora30:0.0.1 "$@" . - -cd $OLD_WD - diff --git a/docker/fedora30/build/docker-compose.yml b/docker/fedora30/build/docker-compose.yml deleted file mode 100644 index 86f3031..0000000 --- a/docker/fedora30/build/docker-compose.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: '3' - -services: - build: - image: scons-build-fedora30:latest - restart: always - environment: - - DISPLAY - - HOME - volumes: - - /home:/home - - /tmp:/tmp - - /etc/sudoers:/etc/sudoers:ro - - /etc/passwd:/etc/passwd:ro - - /etc/shadow:/etc/shadow:ro - - /etc/group:/etc/group:ro - - ./startup:/startup - container_name: SCons_Build_Fedora30 - entrypoint: /startup/setup_container.sh - user: $DOCKERUID:$DOCKERGID - working_dir: $HOME - diff --git a/docker/fedora30/build/readme.rst b/docker/fedora30/build/readme.rst deleted file mode 100644 index 18ac401..0000000 --- a/docker/fedora30/build/readme.rst +++ /dev/null @@ -1,43 +0,0 @@ -================================== -Image for building/releasing SCons -================================== - -This folder contains the files and scripts that can be used to -build and release SCons, based on a Fedora 30. - -Building the image -================== - -Build the local docker image by calling:: - - ./build_image.sh - -This will download the base image and install the required additional packages. - -Starting the image -================== - -Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: - - ./start_build_shell.sh - -which will open a new ``xterm`` with your current user on the host system as default. - -If you need additional setup steps or want to *mount* different folders to the build image, change the -files:: - - docker-compose.yml - ./startup/setup_container.sh - -locally. - - -Stopping the image -================== - -Simply call:: - - ./stop_build_shell.sh - -. - diff --git a/docker/fedora30/build/start_build_shell.sh b/docker/fedora30/build/start_build_shell.sh deleted file mode 100755 index 6905634..0000000 --- a/docker/fedora30/build/start_build_shell.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -xhost +local:docker -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose up -d - -cd $OLD_WD - diff --git a/docker/fedora30/build/startup/setup_container.sh b/docker/fedora30/build/startup/setup_container.sh deleted file mode 100755 index f655441..0000000 --- a/docker/fedora30/build/startup/setup_container.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Here we can add local setup steps for the finishing touches to our Docker build container. -# This can be setting symbolic links, e.g. -# sudo ln -s /disk2/stuff /stuff -# or triggering further scripts. - -# We start a separate xterm/terminal, such that the container doesn't exit right away... -/usr/bin/xterm - diff --git a/docker/fedora30/build/stop_build_shell.sh b/docker/fedora30/build/stop_build_shell.sh deleted file mode 100755 index c0a9707..0000000 --- a/docker/fedora30/build/stop_build_shell.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose down - -cd $OLD_WD - diff --git a/docker/fedora30/test/Dockerfile b/docker/fedora30/test/Dockerfile deleted file mode 100644 index 20a0749..0000000 --- a/docker/fedora30/test/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -# Building an SCons Test image under Fedora 30 -FROM fedora:30 - -LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Test image, based on a Fedora 30" - -# Install additional packages -RUN dnf -y install git bison cvs flex g++ gcc ghostscript m4 openssh-clients openssh-server python3-line_profiler python3-devel pypy3-devel rpm-build rcs java-1.8.0-openjdk swig texlive-scheme-basic texlive-base texlive-latex zip xterm vim vim-common nano - -CMD ["/bin/bash"] - diff --git a/docker/fedora30/test/build_image.sh b/docker/fedora30/test/build_image.sh deleted file mode 100755 index 5e1eaba..0000000 --- a/docker/fedora30/test/build_image.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker build passing any other build options (command line options may override!) -docker build --network=host --file Dockerfile \ - -t scons-test-fedora30:latest -t scons-test-fedora30:0.0.1 "$@" . - -cd $OLD_WD - diff --git a/docker/fedora30/test/docker-compose.yml b/docker/fedora30/test/docker-compose.yml deleted file mode 100644 index 25daa18..0000000 --- a/docker/fedora30/test/docker-compose.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: '3' - -services: - build: - image: scons-test-fedora30:latest - restart: always - environment: - - DISPLAY - - HOME - volumes: - - /home:/home - - /tmp:/tmp - - /etc/sudoers:/etc/sudoers:ro - - /etc/passwd:/etc/passwd:ro - - /etc/shadow:/etc/shadow:ro - - /etc/group:/etc/group:ro - - ./startup:/startup - container_name: SCons_Test_Fedora30 - entrypoint: /startup/setup_container.sh - user: $DOCKERUID:$DOCKERGID - working_dir: $HOME - diff --git a/docker/fedora30/test/readme.rst b/docker/fedora30/test/readme.rst deleted file mode 100644 index 8cba2e9..0000000 --- a/docker/fedora30/test/readme.rst +++ /dev/null @@ -1,43 +0,0 @@ -======================= -Image for testing SCons -======================= - -This folder contains the files and scripts that can be used to -test SCons, based on a Fedora 30. - -Building the image -================== - -Build the local docker image by calling:: - - ./build_image.sh - -This will download the base image and install the required additional packages. - -Starting the image -================== - -Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: - - ./start_test_shell.sh - -which will open a new ``xterm`` with your current user on the host system as default. - -If you need additional setup steps or want to *mount* different folders to the test image, change the -files:: - - docker-compose.yml - ./startup/setup_container.sh - -locally. - - -Stopping the image -================== - -Simply call:: - - ./stop_test_shell.sh - -. - diff --git a/docker/fedora30/test/start_test_shell.sh b/docker/fedora30/test/start_test_shell.sh deleted file mode 100755 index 6905634..0000000 --- a/docker/fedora30/test/start_test_shell.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -xhost +local:docker -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose up -d - -cd $OLD_WD - diff --git a/docker/fedora30/test/startup/setup_container.sh b/docker/fedora30/test/startup/setup_container.sh deleted file mode 100755 index f655441..0000000 --- a/docker/fedora30/test/startup/setup_container.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Here we can add local setup steps for the finishing touches to our Docker build container. -# This can be setting symbolic links, e.g. -# sudo ln -s /disk2/stuff /stuff -# or triggering further scripts. - -# We start a separate xterm/terminal, such that the container doesn't exit right away... -/usr/bin/xterm - diff --git a/docker/fedora30/test/stop_test_shell.sh b/docker/fedora30/test/stop_test_shell.sh deleted file mode 100755 index c0a9707..0000000 --- a/docker/fedora30/test/stop_test_shell.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose down - -cd $OLD_WD - diff --git a/docker/ubuntu19.10/build/Dockerfile b/docker/ubuntu19.10/build/Dockerfile deleted file mode 100644 index 38f4dd7..0000000 --- a/docker/ubuntu19.10/build/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -# Building an SCons Release Build image under Ubuntu 19.10 -FROM ubuntu:19.10 - -LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Release Build, based on an Ubuntu 19.10" - -# Install additional packages -RUN apt-get update && apt-get -y install git python3-lxml fop libfontbox-java python3-dev rpm tar curl lynx xterm vim vim-common nano sudo - -# Install hyphenation patterns for FOP -RUN mkdir /opt/offo && cd /opt/offo && curl -L --output offo-hyphenation-compiled.zip https://sourceforge.net/projects/offo/files/offo-hyphenation/2.2/offo-hyphenation-compiled.zip/download && unzip offo-hyphenation-compiled.zip && cp offo-hyphenation-compiled/fop-hyph.jar /usr/share/fop/ - -# Epydoc can be installed via pip3, but it doesn't seem to work properly. -# For the moment we don't install it and might replace it with Sphinx later... -# RUN apt-get -y install python3-pip && pip3 install epydoc - -CMD ["/bin/bash"] - diff --git a/docker/ubuntu19.10/build/build_image.sh b/docker/ubuntu19.10/build/build_image.sh deleted file mode 100755 index 29e0f7e..0000000 --- a/docker/ubuntu19.10/build/build_image.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker build passing any other build options (command line options may override!) -docker build --network=host --file Dockerfile \ - -t scons-build-ubuntu19.10:latest -t scons-build-ubuntu19.10:0.0.1 "$@" . - -cd $OLD_WD - diff --git a/docker/ubuntu19.10/build/docker-compose.yml b/docker/ubuntu19.10/build/docker-compose.yml deleted file mode 100644 index aa34bac..0000000 --- a/docker/ubuntu19.10/build/docker-compose.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: '3' - -services: - build: - image: scons-build-ubuntu19.10:latest - restart: always - environment: - - DISPLAY - - HOME - volumes: - - /home:/home - - /tmp:/tmp - - /etc/sudoers:/etc/sudoers:ro - - /etc/passwd:/etc/passwd:ro - - /etc/shadow:/etc/shadow:ro - - /etc/group:/etc/group:ro - - ./startup:/startup - container_name: SCons_Build_Ubuntu19.10 - entrypoint: /startup/setup_container.sh - user: $DOCKERUID:$DOCKERGID - working_dir: $HOME - diff --git a/docker/ubuntu19.10/build/readme.rst b/docker/ubuntu19.10/build/readme.rst deleted file mode 100644 index b21d52c..0000000 --- a/docker/ubuntu19.10/build/readme.rst +++ /dev/null @@ -1,43 +0,0 @@ -================================== -Image for building/releasing SCons -================================== - -This folder contains the files and scripts that can be used to -build and release SCons, based on an Ubuntu 19.10. - -Building the image -================== - -Build the local docker image by calling:: - - ./build_image.sh - -This will download the base image and install the required additional packages. - -Starting the image -================== - -Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: - - ./start_build_shell.sh - -which will open a new ``xterm`` with your current user on the host system as default. - -If you need additional setup steps or want to *mount* different folders to the build image, change the -files:: - - docker-compose.yml - ./startup/setup_container.sh - -locally. - - -Stopping the image -================== - -Simply call:: - - ./stop_build_shell.sh - -. - diff --git a/docker/ubuntu19.10/build/start_build_shell.sh b/docker/ubuntu19.10/build/start_build_shell.sh deleted file mode 100755 index 6905634..0000000 --- a/docker/ubuntu19.10/build/start_build_shell.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -xhost +local:docker -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose up -d - -cd $OLD_WD - diff --git a/docker/ubuntu19.10/build/startup/setup_container.sh b/docker/ubuntu19.10/build/startup/setup_container.sh deleted file mode 100755 index f655441..0000000 --- a/docker/ubuntu19.10/build/startup/setup_container.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Here we can add local setup steps for the finishing touches to our Docker build container. -# This can be setting symbolic links, e.g. -# sudo ln -s /disk2/stuff /stuff -# or triggering further scripts. - -# We start a separate xterm/terminal, such that the container doesn't exit right away... -/usr/bin/xterm - diff --git a/docker/ubuntu19.10/build/stop_build_shell.sh b/docker/ubuntu19.10/build/stop_build_shell.sh deleted file mode 100755 index c0a9707..0000000 --- a/docker/ubuntu19.10/build/stop_build_shell.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose down - -cd $OLD_WD - diff --git a/docker/ubuntu19.10/test/Dockerfile b/docker/ubuntu19.10/test/Dockerfile deleted file mode 100644 index a86947e..0000000 --- a/docker/ubuntu19.10/test/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -# Building an SCons Test image under Ubuntu 19.10 -FROM ubuntu:19.10 - -LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Test image, based on an Ubuntu 19.10" - -# Install additional packages -RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install git bison cssc cvs flex g++ gcc ghostscript m4 openssh-client openssh-server python3-profiler python3-all-dev pypy-dev rcs rpm openjdk-8-jdk swig texlive-base-bin texlive-extra-utils texlive-latex-base texlive-latex-extra zip xterm vim vim-common nano sudo - -CMD ["/bin/bash"] - diff --git a/docker/ubuntu19.10/test/build_image.sh b/docker/ubuntu19.10/test/build_image.sh deleted file mode 100755 index 92649a0..0000000 --- a/docker/ubuntu19.10/test/build_image.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker build passing any other build options (command line options may override!) -docker build --network=host --file Dockerfile \ - -t scons-test-ubuntu19.10:latest -t scons-test-ubuntu19.10:0.0.1 "$@" . - -cd $OLD_WD - diff --git a/docker/ubuntu19.10/test/docker-compose.yml b/docker/ubuntu19.10/test/docker-compose.yml deleted file mode 100644 index 1f3777f..0000000 --- a/docker/ubuntu19.10/test/docker-compose.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: '3' - -services: - build: - image: scons-test-ubuntu19.10:latest - restart: always - environment: - - DISPLAY - - HOME - volumes: - - /home:/home - - /tmp:/tmp - - /etc/sudoers:/etc/sudoers:ro - - /etc/passwd:/etc/passwd:ro - - /etc/shadow:/etc/shadow:ro - - /etc/group:/etc/group:ro - - ./startup:/startup - container_name: SCons_Test_Ubuntu19.10 - entrypoint: /startup/setup_container.sh - user: $DOCKERUID:$DOCKERGID - working_dir: $HOME - diff --git a/docker/ubuntu19.10/test/readme.rst b/docker/ubuntu19.10/test/readme.rst deleted file mode 100644 index d7247d2..0000000 --- a/docker/ubuntu19.10/test/readme.rst +++ /dev/null @@ -1,43 +0,0 @@ -======================= -Image for testing SCons -======================= - -This folder contains the files and scripts that can be used to -test SCons, based on an Ubuntu 19.10. - -Building the image -================== - -Build the local docker image by calling:: - - ./build_image.sh - -This will download the base image and install the required additional packages. - -Starting the image -================== - -Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: - - ./start_test_shell.sh - -which will open a new ``xterm`` with your current user on the host system as default. - -If you need additional setup steps or want to *mount* different folders to the test image, change the -files:: - - docker-compose.yml - ./startup/setup_container.sh - -locally. - - -Stopping the image -================== - -Simply call:: - - ./stop_test_shell.sh - -. - diff --git a/docker/ubuntu19.10/test/start_test_shell.sh b/docker/ubuntu19.10/test/start_test_shell.sh deleted file mode 100755 index 6905634..0000000 --- a/docker/ubuntu19.10/test/start_test_shell.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -xhost +local:docker -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose up -d - -cd $OLD_WD - diff --git a/docker/ubuntu19.10/test/startup/setup_container.sh b/docker/ubuntu19.10/test/startup/setup_container.sh deleted file mode 100755 index f655441..0000000 --- a/docker/ubuntu19.10/test/startup/setup_container.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Here we can add local setup steps for the finishing touches to our Docker build container. -# This can be setting symbolic links, e.g. -# sudo ln -s /disk2/stuff /stuff -# or triggering further scripts. - -# We start a separate xterm/terminal, such that the container doesn't exit right away... -/usr/bin/xterm - diff --git a/docker/ubuntu19.10/test/stop_test_shell.sh b/docker/ubuntu19.10/test/stop_test_shell.sh deleted file mode 100755 index c0a9707..0000000 --- a/docker/ubuntu19.10/test/stop_test_shell.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose down - -cd $OLD_WD - diff --git a/testing/docker/docker.rst b/testing/docker/docker.rst new file mode 100644 index 0000000..5845486 --- /dev/null +++ b/testing/docker/docker.rst @@ -0,0 +1,101 @@ +================================== +Basic working with docker registry +================================== + +Install required packages +========================= + +Ensure that the following packages are installed on your local machine:: + + docker.io >= v18.09 + docker-compose >= v1.17 + +User and group +============== + +Add your local user to the `docker` group, e.g. by:: + + sudo usermod -aG docker ${USER} + +. After this step logout and login again, so that the change has been applied and the new group +is in effect. + + +Configuring docker daemon +========================= + +Reconfigure by editing `/etc/docker/daemon.json` as *root*:: + + { + "debug": false + } + +. + +Then reboot the machine or simply restart the daemon as *root* with:: + + sudo systemctl restart docker.service + +To check that the docker daemon was configured correctly, do a:: + + docker info + +which should result in an output similar to:: + + Client: + Debug Mode: false + + Server: + Containers: 0 + Running: 0 + Paused: 0 + Stopped: 0 + Images: 0 + Server Version: 19.03.6 + Storage Driver: overlay2 + Backing Filesystem: extfs + Supports d_type: true + Native Overlay Diff: true + Logging Driver: json-file + Cgroup Driver: cgroupfs + Plugins: + Volume: local + Network: bridge host ipvlan macvlan null overlay + Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog + Swarm: inactive + Runtimes: runc + Default Runtime: runc + Init Binary: docker-init + containerd version: + runc version: + init version: + Security Options: + apparmor + seccomp + Profile: default + Kernel Version: 4.15.0-88-generic + Operating System: Ubuntu 18.04.4 LTS + OSType: linux + Architecture: x86_64 + CPUs: 4 + Total Memory: 6.997GiB + Name: ubuntu + ID: H2N5:VOZ6:UO6V:B36O:MD6Q:7GXR:M4QY:7EBB:NC6R:HQCQ:7ARF:CZBH + Docker Root Dir: /var/lib/docker + Debug Mode: false + Registry: https://index.docker.io/v1/ + Labels: + Experimental: false + Insecure Registries: + 127.0.0.0/8 + Live Restore Enabled: false + + WARNING: No swap limit support + +Setup resolv.conf if necessary +=============================== + +Docker uses `etc/resolv.conf` DNS information and passes that automatically to containers. If the file is not configured +properly or if entries are not valid, the server adds automatically public Google DNS nameservers +(8.8.8.8 and 8.8.4.4) to the container's DNS configuration. + diff --git a/testing/docker/fedora30/build/Dockerfile b/testing/docker/fedora30/build/Dockerfile new file mode 100644 index 0000000..c62037b --- /dev/null +++ b/testing/docker/fedora30/build/Dockerfile @@ -0,0 +1,17 @@ +# Building an SCons Release Build image under Fedora 30 +FROM fedora:30 + +LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Release Build, based on a Fedora 30" + +# Install additional packages +RUN dnf -y install git python3-lxml fop fontbox python3-devel lynx xterm vim vim-common nano + +# Install hyphenation patterns for FOP +RUN mkdir /opt/offo && cd /opt/offo && curl -L --output offo-hyphenation-compiled.zip https://sourceforge.net/projects/offo/files/offo-hyphenation/2.2/offo-hyphenation-compiled.zip/download && unzip offo-hyphenation-compiled.zip && cp offo-hyphenation-compiled/fop-hyph.jar /usr/share/fop/ + +# Epydoc can be installed via pip3, but it doesn't seem to work properly. +# For the moment we don't install it and might replace it with Sphinx later... +# RUN dnf -y install python3-pip && pip3 install epydoc + +CMD ["/bin/bash"] + diff --git a/testing/docker/fedora30/build/build_image.sh b/testing/docker/fedora30/build/build_image.sh new file mode 100755 index 0000000..afd04b8 --- /dev/null +++ b/testing/docker/fedora30/build/build_image.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker build passing any other build options (command line options may override!) +docker build --network=host --file Dockerfile \ + -t scons-build-fedora30:latest -t scons-build-fedora30:0.0.1 "$@" . + +cd $OLD_WD + diff --git a/testing/docker/fedora30/build/docker-compose.yml b/testing/docker/fedora30/build/docker-compose.yml new file mode 100644 index 0000000..86f3031 --- /dev/null +++ b/testing/docker/fedora30/build/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + build: + image: scons-build-fedora30:latest + restart: always + environment: + - DISPLAY + - HOME + volumes: + - /home:/home + - /tmp:/tmp + - /etc/sudoers:/etc/sudoers:ro + - /etc/passwd:/etc/passwd:ro + - /etc/shadow:/etc/shadow:ro + - /etc/group:/etc/group:ro + - ./startup:/startup + container_name: SCons_Build_Fedora30 + entrypoint: /startup/setup_container.sh + user: $DOCKERUID:$DOCKERGID + working_dir: $HOME + diff --git a/testing/docker/fedora30/build/readme.rst b/testing/docker/fedora30/build/readme.rst new file mode 100644 index 0000000..18ac401 --- /dev/null +++ b/testing/docker/fedora30/build/readme.rst @@ -0,0 +1,43 @@ +================================== +Image for building/releasing SCons +================================== + +This folder contains the files and scripts that can be used to +build and release SCons, based on a Fedora 30. + +Building the image +================== + +Build the local docker image by calling:: + + ./build_image.sh + +This will download the base image and install the required additional packages. + +Starting the image +================== + +Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: + + ./start_build_shell.sh + +which will open a new ``xterm`` with your current user on the host system as default. + +If you need additional setup steps or want to *mount* different folders to the build image, change the +files:: + + docker-compose.yml + ./startup/setup_container.sh + +locally. + + +Stopping the image +================== + +Simply call:: + + ./stop_build_shell.sh + +. + diff --git a/testing/docker/fedora30/build/start_build_shell.sh b/testing/docker/fedora30/build/start_build_shell.sh new file mode 100755 index 0000000..6905634 --- /dev/null +++ b/testing/docker/fedora30/build/start_build_shell.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +xhost +local:docker +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose up -d + +cd $OLD_WD + diff --git a/testing/docker/fedora30/build/startup/setup_container.sh b/testing/docker/fedora30/build/startup/setup_container.sh new file mode 100755 index 0000000..f655441 --- /dev/null +++ b/testing/docker/fedora30/build/startup/setup_container.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Here we can add local setup steps for the finishing touches to our Docker build container. +# This can be setting symbolic links, e.g. +# sudo ln -s /disk2/stuff /stuff +# or triggering further scripts. + +# We start a separate xterm/terminal, such that the container doesn't exit right away... +/usr/bin/xterm + diff --git a/testing/docker/fedora30/build/stop_build_shell.sh b/testing/docker/fedora30/build/stop_build_shell.sh new file mode 100755 index 0000000..c0a9707 --- /dev/null +++ b/testing/docker/fedora30/build/stop_build_shell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose down + +cd $OLD_WD + diff --git a/testing/docker/fedora30/test/Dockerfile b/testing/docker/fedora30/test/Dockerfile new file mode 100644 index 0000000..20a0749 --- /dev/null +++ b/testing/docker/fedora30/test/Dockerfile @@ -0,0 +1,10 @@ +# Building an SCons Test image under Fedora 30 +FROM fedora:30 + +LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Test image, based on a Fedora 30" + +# Install additional packages +RUN dnf -y install git bison cvs flex g++ gcc ghostscript m4 openssh-clients openssh-server python3-line_profiler python3-devel pypy3-devel rpm-build rcs java-1.8.0-openjdk swig texlive-scheme-basic texlive-base texlive-latex zip xterm vim vim-common nano + +CMD ["/bin/bash"] + diff --git a/testing/docker/fedora30/test/build_image.sh b/testing/docker/fedora30/test/build_image.sh new file mode 100755 index 0000000..5e1eaba --- /dev/null +++ b/testing/docker/fedora30/test/build_image.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker build passing any other build options (command line options may override!) +docker build --network=host --file Dockerfile \ + -t scons-test-fedora30:latest -t scons-test-fedora30:0.0.1 "$@" . + +cd $OLD_WD + diff --git a/testing/docker/fedora30/test/docker-compose.yml b/testing/docker/fedora30/test/docker-compose.yml new file mode 100644 index 0000000..25daa18 --- /dev/null +++ b/testing/docker/fedora30/test/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + build: + image: scons-test-fedora30:latest + restart: always + environment: + - DISPLAY + - HOME + volumes: + - /home:/home + - /tmp:/tmp + - /etc/sudoers:/etc/sudoers:ro + - /etc/passwd:/etc/passwd:ro + - /etc/shadow:/etc/shadow:ro + - /etc/group:/etc/group:ro + - ./startup:/startup + container_name: SCons_Test_Fedora30 + entrypoint: /startup/setup_container.sh + user: $DOCKERUID:$DOCKERGID + working_dir: $HOME + diff --git a/testing/docker/fedora30/test/readme.rst b/testing/docker/fedora30/test/readme.rst new file mode 100644 index 0000000..8cba2e9 --- /dev/null +++ b/testing/docker/fedora30/test/readme.rst @@ -0,0 +1,43 @@ +======================= +Image for testing SCons +======================= + +This folder contains the files and scripts that can be used to +test SCons, based on a Fedora 30. + +Building the image +================== + +Build the local docker image by calling:: + + ./build_image.sh + +This will download the base image and install the required additional packages. + +Starting the image +================== + +Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: + + ./start_test_shell.sh + +which will open a new ``xterm`` with your current user on the host system as default. + +If you need additional setup steps or want to *mount* different folders to the test image, change the +files:: + + docker-compose.yml + ./startup/setup_container.sh + +locally. + + +Stopping the image +================== + +Simply call:: + + ./stop_test_shell.sh + +. + diff --git a/testing/docker/fedora30/test/start_test_shell.sh b/testing/docker/fedora30/test/start_test_shell.sh new file mode 100755 index 0000000..6905634 --- /dev/null +++ b/testing/docker/fedora30/test/start_test_shell.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +xhost +local:docker +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose up -d + +cd $OLD_WD + diff --git a/testing/docker/fedora30/test/startup/setup_container.sh b/testing/docker/fedora30/test/startup/setup_container.sh new file mode 100755 index 0000000..f655441 --- /dev/null +++ b/testing/docker/fedora30/test/startup/setup_container.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Here we can add local setup steps for the finishing touches to our Docker build container. +# This can be setting symbolic links, e.g. +# sudo ln -s /disk2/stuff /stuff +# or triggering further scripts. + +# We start a separate xterm/terminal, such that the container doesn't exit right away... +/usr/bin/xterm + diff --git a/testing/docker/fedora30/test/stop_test_shell.sh b/testing/docker/fedora30/test/stop_test_shell.sh new file mode 100755 index 0000000..c0a9707 --- /dev/null +++ b/testing/docker/fedora30/test/stop_test_shell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose down + +cd $OLD_WD + diff --git a/testing/docker/ubuntu19.10/build/Dockerfile b/testing/docker/ubuntu19.10/build/Dockerfile new file mode 100644 index 0000000..38f4dd7 --- /dev/null +++ b/testing/docker/ubuntu19.10/build/Dockerfile @@ -0,0 +1,17 @@ +# Building an SCons Release Build image under Ubuntu 19.10 +FROM ubuntu:19.10 + +LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Release Build, based on an Ubuntu 19.10" + +# Install additional packages +RUN apt-get update && apt-get -y install git python3-lxml fop libfontbox-java python3-dev rpm tar curl lynx xterm vim vim-common nano sudo + +# Install hyphenation patterns for FOP +RUN mkdir /opt/offo && cd /opt/offo && curl -L --output offo-hyphenation-compiled.zip https://sourceforge.net/projects/offo/files/offo-hyphenation/2.2/offo-hyphenation-compiled.zip/download && unzip offo-hyphenation-compiled.zip && cp offo-hyphenation-compiled/fop-hyph.jar /usr/share/fop/ + +# Epydoc can be installed via pip3, but it doesn't seem to work properly. +# For the moment we don't install it and might replace it with Sphinx later... +# RUN apt-get -y install python3-pip && pip3 install epydoc + +CMD ["/bin/bash"] + diff --git a/testing/docker/ubuntu19.10/build/build_image.sh b/testing/docker/ubuntu19.10/build/build_image.sh new file mode 100755 index 0000000..29e0f7e --- /dev/null +++ b/testing/docker/ubuntu19.10/build/build_image.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker build passing any other build options (command line options may override!) +docker build --network=host --file Dockerfile \ + -t scons-build-ubuntu19.10:latest -t scons-build-ubuntu19.10:0.0.1 "$@" . + +cd $OLD_WD + diff --git a/testing/docker/ubuntu19.10/build/docker-compose.yml b/testing/docker/ubuntu19.10/build/docker-compose.yml new file mode 100644 index 0000000..aa34bac --- /dev/null +++ b/testing/docker/ubuntu19.10/build/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + build: + image: scons-build-ubuntu19.10:latest + restart: always + environment: + - DISPLAY + - HOME + volumes: + - /home:/home + - /tmp:/tmp + - /etc/sudoers:/etc/sudoers:ro + - /etc/passwd:/etc/passwd:ro + - /etc/shadow:/etc/shadow:ro + - /etc/group:/etc/group:ro + - ./startup:/startup + container_name: SCons_Build_Ubuntu19.10 + entrypoint: /startup/setup_container.sh + user: $DOCKERUID:$DOCKERGID + working_dir: $HOME + diff --git a/testing/docker/ubuntu19.10/build/readme.rst b/testing/docker/ubuntu19.10/build/readme.rst new file mode 100644 index 0000000..b21d52c --- /dev/null +++ b/testing/docker/ubuntu19.10/build/readme.rst @@ -0,0 +1,43 @@ +================================== +Image for building/releasing SCons +================================== + +This folder contains the files and scripts that can be used to +build and release SCons, based on an Ubuntu 19.10. + +Building the image +================== + +Build the local docker image by calling:: + + ./build_image.sh + +This will download the base image and install the required additional packages. + +Starting the image +================== + +Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: + + ./start_build_shell.sh + +which will open a new ``xterm`` with your current user on the host system as default. + +If you need additional setup steps or want to *mount* different folders to the build image, change the +files:: + + docker-compose.yml + ./startup/setup_container.sh + +locally. + + +Stopping the image +================== + +Simply call:: + + ./stop_build_shell.sh + +. + diff --git a/testing/docker/ubuntu19.10/build/start_build_shell.sh b/testing/docker/ubuntu19.10/build/start_build_shell.sh new file mode 100755 index 0000000..6905634 --- /dev/null +++ b/testing/docker/ubuntu19.10/build/start_build_shell.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +xhost +local:docker +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose up -d + +cd $OLD_WD + diff --git a/testing/docker/ubuntu19.10/build/startup/setup_container.sh b/testing/docker/ubuntu19.10/build/startup/setup_container.sh new file mode 100755 index 0000000..f655441 --- /dev/null +++ b/testing/docker/ubuntu19.10/build/startup/setup_container.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Here we can add local setup steps for the finishing touches to our Docker build container. +# This can be setting symbolic links, e.g. +# sudo ln -s /disk2/stuff /stuff +# or triggering further scripts. + +# We start a separate xterm/terminal, such that the container doesn't exit right away... +/usr/bin/xterm + diff --git a/testing/docker/ubuntu19.10/build/stop_build_shell.sh b/testing/docker/ubuntu19.10/build/stop_build_shell.sh new file mode 100755 index 0000000..c0a9707 --- /dev/null +++ b/testing/docker/ubuntu19.10/build/stop_build_shell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose down + +cd $OLD_WD + diff --git a/testing/docker/ubuntu19.10/test/Dockerfile b/testing/docker/ubuntu19.10/test/Dockerfile new file mode 100644 index 0000000..a86947e --- /dev/null +++ b/testing/docker/ubuntu19.10/test/Dockerfile @@ -0,0 +1,10 @@ +# Building an SCons Test image under Ubuntu 19.10 +FROM ubuntu:19.10 + +LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Test image, based on an Ubuntu 19.10" + +# Install additional packages +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install git bison cssc cvs flex g++ gcc ghostscript m4 openssh-client openssh-server python3-profiler python3-all-dev pypy-dev rcs rpm openjdk-8-jdk swig texlive-base-bin texlive-extra-utils texlive-latex-base texlive-latex-extra zip xterm vim vim-common nano sudo + +CMD ["/bin/bash"] + diff --git a/testing/docker/ubuntu19.10/test/build_image.sh b/testing/docker/ubuntu19.10/test/build_image.sh new file mode 100755 index 0000000..92649a0 --- /dev/null +++ b/testing/docker/ubuntu19.10/test/build_image.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker build passing any other build options (command line options may override!) +docker build --network=host --file Dockerfile \ + -t scons-test-ubuntu19.10:latest -t scons-test-ubuntu19.10:0.0.1 "$@" . + +cd $OLD_WD + diff --git a/testing/docker/ubuntu19.10/test/docker-compose.yml b/testing/docker/ubuntu19.10/test/docker-compose.yml new file mode 100644 index 0000000..1f3777f --- /dev/null +++ b/testing/docker/ubuntu19.10/test/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + build: + image: scons-test-ubuntu19.10:latest + restart: always + environment: + - DISPLAY + - HOME + volumes: + - /home:/home + - /tmp:/tmp + - /etc/sudoers:/etc/sudoers:ro + - /etc/passwd:/etc/passwd:ro + - /etc/shadow:/etc/shadow:ro + - /etc/group:/etc/group:ro + - ./startup:/startup + container_name: SCons_Test_Ubuntu19.10 + entrypoint: /startup/setup_container.sh + user: $DOCKERUID:$DOCKERGID + working_dir: $HOME + diff --git a/testing/docker/ubuntu19.10/test/readme.rst b/testing/docker/ubuntu19.10/test/readme.rst new file mode 100644 index 0000000..d7247d2 --- /dev/null +++ b/testing/docker/ubuntu19.10/test/readme.rst @@ -0,0 +1,43 @@ +======================= +Image for testing SCons +======================= + +This folder contains the files and scripts that can be used to +test SCons, based on an Ubuntu 19.10. + +Building the image +================== + +Build the local docker image by calling:: + + ./build_image.sh + +This will download the base image and install the required additional packages. + +Starting the image +================== + +Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: + + ./start_test_shell.sh + +which will open a new ``xterm`` with your current user on the host system as default. + +If you need additional setup steps or want to *mount* different folders to the test image, change the +files:: + + docker-compose.yml + ./startup/setup_container.sh + +locally. + + +Stopping the image +================== + +Simply call:: + + ./stop_test_shell.sh + +. + diff --git a/testing/docker/ubuntu19.10/test/start_test_shell.sh b/testing/docker/ubuntu19.10/test/start_test_shell.sh new file mode 100755 index 0000000..6905634 --- /dev/null +++ b/testing/docker/ubuntu19.10/test/start_test_shell.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +xhost +local:docker +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose up -d + +cd $OLD_WD + diff --git a/testing/docker/ubuntu19.10/test/startup/setup_container.sh b/testing/docker/ubuntu19.10/test/startup/setup_container.sh new file mode 100755 index 0000000..f655441 --- /dev/null +++ b/testing/docker/ubuntu19.10/test/startup/setup_container.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Here we can add local setup steps for the finishing touches to our Docker build container. +# This can be setting symbolic links, e.g. +# sudo ln -s /disk2/stuff /stuff +# or triggering further scripts. + +# We start a separate xterm/terminal, such that the container doesn't exit right away... +/usr/bin/xterm + diff --git a/testing/docker/ubuntu19.10/test/stop_test_shell.sh b/testing/docker/ubuntu19.10/test/stop_test_shell.sh new file mode 100755 index 0000000..c0a9707 --- /dev/null +++ b/testing/docker/ubuntu19.10/test/stop_test_shell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose down + +cd $OLD_WD + -- cgit v0.12 From 36665166265b22c5852a24639aa0dd1c77cbb003 Mon Sep 17 00:00:00 2001 From: Dirk Baechle Date: Fri, 12 Jun 2020 12:43:32 +0200 Subject: Bumped the Fedora version up to 32. We bump up the Fedora version, since v30 has reached its EOL on 2020-05-26. --- testing/docker/fedora30/build/Dockerfile | 17 --------- testing/docker/fedora30/build/build_image.sh | 16 -------- testing/docker/fedora30/build/docker-compose.yml | 22 ----------- testing/docker/fedora30/build/readme.rst | 43 ---------------------- testing/docker/fedora30/build/start_build_shell.sh | 18 --------- .../fedora30/build/startup/setup_container.sh | 10 ----- testing/docker/fedora30/build/stop_build_shell.sh | 17 --------- testing/docker/fedora30/test/Dockerfile | 10 ----- testing/docker/fedora30/test/build_image.sh | 16 -------- testing/docker/fedora30/test/docker-compose.yml | 22 ----------- testing/docker/fedora30/test/readme.rst | 43 ---------------------- testing/docker/fedora30/test/start_test_shell.sh | 18 --------- .../fedora30/test/startup/setup_container.sh | 10 ----- testing/docker/fedora30/test/stop_test_shell.sh | 17 --------- testing/docker/fedora32/build/Dockerfile | 17 +++++++++ testing/docker/fedora32/build/build_image.sh | 16 ++++++++ testing/docker/fedora32/build/docker-compose.yml | 22 +++++++++++ testing/docker/fedora32/build/readme.rst | 43 ++++++++++++++++++++++ testing/docker/fedora32/build/start_build_shell.sh | 18 +++++++++ .../fedora32/build/startup/setup_container.sh | 10 +++++ testing/docker/fedora32/build/stop_build_shell.sh | 17 +++++++++ testing/docker/fedora32/test/Dockerfile | 10 +++++ testing/docker/fedora32/test/build_image.sh | 16 ++++++++ testing/docker/fedora32/test/docker-compose.yml | 22 +++++++++++ testing/docker/fedora32/test/readme.rst | 43 ++++++++++++++++++++++ testing/docker/fedora32/test/start_test_shell.sh | 18 +++++++++ .../fedora32/test/startup/setup_container.sh | 10 +++++ testing/docker/fedora32/test/stop_test_shell.sh | 17 +++++++++ 28 files changed, 279 insertions(+), 279 deletions(-) delete mode 100644 testing/docker/fedora30/build/Dockerfile delete mode 100755 testing/docker/fedora30/build/build_image.sh delete mode 100644 testing/docker/fedora30/build/docker-compose.yml delete mode 100644 testing/docker/fedora30/build/readme.rst delete mode 100755 testing/docker/fedora30/build/start_build_shell.sh delete mode 100755 testing/docker/fedora30/build/startup/setup_container.sh delete mode 100755 testing/docker/fedora30/build/stop_build_shell.sh delete mode 100644 testing/docker/fedora30/test/Dockerfile delete mode 100755 testing/docker/fedora30/test/build_image.sh delete mode 100644 testing/docker/fedora30/test/docker-compose.yml delete mode 100644 testing/docker/fedora30/test/readme.rst delete mode 100755 testing/docker/fedora30/test/start_test_shell.sh delete mode 100755 testing/docker/fedora30/test/startup/setup_container.sh delete mode 100755 testing/docker/fedora30/test/stop_test_shell.sh create mode 100644 testing/docker/fedora32/build/Dockerfile create mode 100755 testing/docker/fedora32/build/build_image.sh create mode 100644 testing/docker/fedora32/build/docker-compose.yml create mode 100644 testing/docker/fedora32/build/readme.rst create mode 100755 testing/docker/fedora32/build/start_build_shell.sh create mode 100755 testing/docker/fedora32/build/startup/setup_container.sh create mode 100755 testing/docker/fedora32/build/stop_build_shell.sh create mode 100644 testing/docker/fedora32/test/Dockerfile create mode 100755 testing/docker/fedora32/test/build_image.sh create mode 100644 testing/docker/fedora32/test/docker-compose.yml create mode 100644 testing/docker/fedora32/test/readme.rst create mode 100755 testing/docker/fedora32/test/start_test_shell.sh create mode 100755 testing/docker/fedora32/test/startup/setup_container.sh create mode 100755 testing/docker/fedora32/test/stop_test_shell.sh diff --git a/testing/docker/fedora30/build/Dockerfile b/testing/docker/fedora30/build/Dockerfile deleted file mode 100644 index c62037b..0000000 --- a/testing/docker/fedora30/build/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -# Building an SCons Release Build image under Fedora 30 -FROM fedora:30 - -LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Release Build, based on a Fedora 30" - -# Install additional packages -RUN dnf -y install git python3-lxml fop fontbox python3-devel lynx xterm vim vim-common nano - -# Install hyphenation patterns for FOP -RUN mkdir /opt/offo && cd /opt/offo && curl -L --output offo-hyphenation-compiled.zip https://sourceforge.net/projects/offo/files/offo-hyphenation/2.2/offo-hyphenation-compiled.zip/download && unzip offo-hyphenation-compiled.zip && cp offo-hyphenation-compiled/fop-hyph.jar /usr/share/fop/ - -# Epydoc can be installed via pip3, but it doesn't seem to work properly. -# For the moment we don't install it and might replace it with Sphinx later... -# RUN dnf -y install python3-pip && pip3 install epydoc - -CMD ["/bin/bash"] - diff --git a/testing/docker/fedora30/build/build_image.sh b/testing/docker/fedora30/build/build_image.sh deleted file mode 100755 index afd04b8..0000000 --- a/testing/docker/fedora30/build/build_image.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker build passing any other build options (command line options may override!) -docker build --network=host --file Dockerfile \ - -t scons-build-fedora30:latest -t scons-build-fedora30:0.0.1 "$@" . - -cd $OLD_WD - diff --git a/testing/docker/fedora30/build/docker-compose.yml b/testing/docker/fedora30/build/docker-compose.yml deleted file mode 100644 index 86f3031..0000000 --- a/testing/docker/fedora30/build/docker-compose.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: '3' - -services: - build: - image: scons-build-fedora30:latest - restart: always - environment: - - DISPLAY - - HOME - volumes: - - /home:/home - - /tmp:/tmp - - /etc/sudoers:/etc/sudoers:ro - - /etc/passwd:/etc/passwd:ro - - /etc/shadow:/etc/shadow:ro - - /etc/group:/etc/group:ro - - ./startup:/startup - container_name: SCons_Build_Fedora30 - entrypoint: /startup/setup_container.sh - user: $DOCKERUID:$DOCKERGID - working_dir: $HOME - diff --git a/testing/docker/fedora30/build/readme.rst b/testing/docker/fedora30/build/readme.rst deleted file mode 100644 index 18ac401..0000000 --- a/testing/docker/fedora30/build/readme.rst +++ /dev/null @@ -1,43 +0,0 @@ -================================== -Image for building/releasing SCons -================================== - -This folder contains the files and scripts that can be used to -build and release SCons, based on a Fedora 30. - -Building the image -================== - -Build the local docker image by calling:: - - ./build_image.sh - -This will download the base image and install the required additional packages. - -Starting the image -================== - -Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: - - ./start_build_shell.sh - -which will open a new ``xterm`` with your current user on the host system as default. - -If you need additional setup steps or want to *mount* different folders to the build image, change the -files:: - - docker-compose.yml - ./startup/setup_container.sh - -locally. - - -Stopping the image -================== - -Simply call:: - - ./stop_build_shell.sh - -. - diff --git a/testing/docker/fedora30/build/start_build_shell.sh b/testing/docker/fedora30/build/start_build_shell.sh deleted file mode 100755 index 6905634..0000000 --- a/testing/docker/fedora30/build/start_build_shell.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -xhost +local:docker -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose up -d - -cd $OLD_WD - diff --git a/testing/docker/fedora30/build/startup/setup_container.sh b/testing/docker/fedora30/build/startup/setup_container.sh deleted file mode 100755 index f655441..0000000 --- a/testing/docker/fedora30/build/startup/setup_container.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Here we can add local setup steps for the finishing touches to our Docker build container. -# This can be setting symbolic links, e.g. -# sudo ln -s /disk2/stuff /stuff -# or triggering further scripts. - -# We start a separate xterm/terminal, such that the container doesn't exit right away... -/usr/bin/xterm - diff --git a/testing/docker/fedora30/build/stop_build_shell.sh b/testing/docker/fedora30/build/stop_build_shell.sh deleted file mode 100755 index c0a9707..0000000 --- a/testing/docker/fedora30/build/stop_build_shell.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose down - -cd $OLD_WD - diff --git a/testing/docker/fedora30/test/Dockerfile b/testing/docker/fedora30/test/Dockerfile deleted file mode 100644 index 20a0749..0000000 --- a/testing/docker/fedora30/test/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -# Building an SCons Test image under Fedora 30 -FROM fedora:30 - -LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Test image, based on a Fedora 30" - -# Install additional packages -RUN dnf -y install git bison cvs flex g++ gcc ghostscript m4 openssh-clients openssh-server python3-line_profiler python3-devel pypy3-devel rpm-build rcs java-1.8.0-openjdk swig texlive-scheme-basic texlive-base texlive-latex zip xterm vim vim-common nano - -CMD ["/bin/bash"] - diff --git a/testing/docker/fedora30/test/build_image.sh b/testing/docker/fedora30/test/build_image.sh deleted file mode 100755 index 5e1eaba..0000000 --- a/testing/docker/fedora30/test/build_image.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker build passing any other build options (command line options may override!) -docker build --network=host --file Dockerfile \ - -t scons-test-fedora30:latest -t scons-test-fedora30:0.0.1 "$@" . - -cd $OLD_WD - diff --git a/testing/docker/fedora30/test/docker-compose.yml b/testing/docker/fedora30/test/docker-compose.yml deleted file mode 100644 index 25daa18..0000000 --- a/testing/docker/fedora30/test/docker-compose.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: '3' - -services: - build: - image: scons-test-fedora30:latest - restart: always - environment: - - DISPLAY - - HOME - volumes: - - /home:/home - - /tmp:/tmp - - /etc/sudoers:/etc/sudoers:ro - - /etc/passwd:/etc/passwd:ro - - /etc/shadow:/etc/shadow:ro - - /etc/group:/etc/group:ro - - ./startup:/startup - container_name: SCons_Test_Fedora30 - entrypoint: /startup/setup_container.sh - user: $DOCKERUID:$DOCKERGID - working_dir: $HOME - diff --git a/testing/docker/fedora30/test/readme.rst b/testing/docker/fedora30/test/readme.rst deleted file mode 100644 index 8cba2e9..0000000 --- a/testing/docker/fedora30/test/readme.rst +++ /dev/null @@ -1,43 +0,0 @@ -======================= -Image for testing SCons -======================= - -This folder contains the files and scripts that can be used to -test SCons, based on a Fedora 30. - -Building the image -================== - -Build the local docker image by calling:: - - ./build_image.sh - -This will download the base image and install the required additional packages. - -Starting the image -================== - -Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: - - ./start_test_shell.sh - -which will open a new ``xterm`` with your current user on the host system as default. - -If you need additional setup steps or want to *mount* different folders to the test image, change the -files:: - - docker-compose.yml - ./startup/setup_container.sh - -locally. - - -Stopping the image -================== - -Simply call:: - - ./stop_test_shell.sh - -. - diff --git a/testing/docker/fedora30/test/start_test_shell.sh b/testing/docker/fedora30/test/start_test_shell.sh deleted file mode 100755 index 6905634..0000000 --- a/testing/docker/fedora30/test/start_test_shell.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -xhost +local:docker -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose up -d - -cd $OLD_WD - diff --git a/testing/docker/fedora30/test/startup/setup_container.sh b/testing/docker/fedora30/test/startup/setup_container.sh deleted file mode 100755 index f655441..0000000 --- a/testing/docker/fedora30/test/startup/setup_container.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Here we can add local setup steps for the finishing touches to our Docker build container. -# This can be setting symbolic links, e.g. -# sudo ln -s /disk2/stuff /stuff -# or triggering further scripts. - -# We start a separate xterm/terminal, such that the container doesn't exit right away... -/usr/bin/xterm - diff --git a/testing/docker/fedora30/test/stop_test_shell.sh b/testing/docker/fedora30/test/stop_test_shell.sh deleted file mode 100755 index c0a9707..0000000 --- a/testing/docker/fedora30/test/stop_test_shell.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# store starting working directory -OLD_WD=$PWD - -# determine working directory of shell script -WD=$(dirname "$(readlink -f "$0")") - -cd $WD - -# call docker container with local user -export DOCKERUID=$(id -u) -export DOCKERGID=$(id -g) -docker-compose down - -cd $OLD_WD - diff --git a/testing/docker/fedora32/build/Dockerfile b/testing/docker/fedora32/build/Dockerfile new file mode 100644 index 0000000..8d31d29 --- /dev/null +++ b/testing/docker/fedora32/build/Dockerfile @@ -0,0 +1,17 @@ +# Building an SCons Release Build image under Fedora 32 +FROM fedora:32 + +LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Release Build, based on a Fedora 32" + +# Install additional packages +RUN dnf -y install git python3-lxml fop fontbox python3-devel lynx xterm vim vim-common nano unzip + +# Install hyphenation patterns for FOP +RUN mkdir /opt/offo && cd /opt/offo && curl -L --output offo-hyphenation-compiled.zip https://sourceforge.net/projects/offo/files/offo-hyphenation/2.2/offo-hyphenation-compiled.zip/download && unzip offo-hyphenation-compiled.zip && cp offo-hyphenation-compiled/fop-hyph.jar /usr/share/fop/ + +# Epydoc can be installed via pip3, but it doesn't seem to work properly. +# For the moment we don't install it and might replace it with Sphinx later... +# RUN dnf -y install python3-pip && pip3 install epydoc + +CMD ["/bin/bash"] + diff --git a/testing/docker/fedora32/build/build_image.sh b/testing/docker/fedora32/build/build_image.sh new file mode 100755 index 0000000..cad4c84 --- /dev/null +++ b/testing/docker/fedora32/build/build_image.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker build passing any other build options (command line options may override!) +docker build --network=host --file Dockerfile \ + -t scons-build-fedora32:latest -t scons-build-fedora32:0.0.1 "$@" . + +cd $OLD_WD + diff --git a/testing/docker/fedora32/build/docker-compose.yml b/testing/docker/fedora32/build/docker-compose.yml new file mode 100644 index 0000000..1b0b8d0 --- /dev/null +++ b/testing/docker/fedora32/build/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + build: + image: scons-build-fedora32:latest + restart: always + environment: + - DISPLAY + - HOME + volumes: + - /home:/home + - /tmp:/tmp + - /etc/sudoers:/etc/sudoers:ro + - /etc/passwd:/etc/passwd:ro + - /etc/shadow:/etc/shadow:ro + - /etc/group:/etc/group:ro + - ./startup:/startup + container_name: SCons_Build_Fedora32 + entrypoint: /startup/setup_container.sh + user: $DOCKERUID:$DOCKERGID + working_dir: $HOME + diff --git a/testing/docker/fedora32/build/readme.rst b/testing/docker/fedora32/build/readme.rst new file mode 100644 index 0000000..d593fe6 --- /dev/null +++ b/testing/docker/fedora32/build/readme.rst @@ -0,0 +1,43 @@ +================================== +Image for building/releasing SCons +================================== + +This folder contains the files and scripts that can be used to +build and release SCons, based on a Fedora 32. + +Building the image +================== + +Build the local docker image by calling:: + + ./build_image.sh + +This will download the base image and install the required additional packages. + +Starting the image +================== + +Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: + + ./start_build_shell.sh + +which will open a new ``xterm`` with your current user on the host system as default. + +If you need additional setup steps or want to *mount* different folders to the build image, change the +files:: + + docker-compose.yml + ./startup/setup_container.sh + +locally. + + +Stopping the image +================== + +Simply call:: + + ./stop_build_shell.sh + +. + diff --git a/testing/docker/fedora32/build/start_build_shell.sh b/testing/docker/fedora32/build/start_build_shell.sh new file mode 100755 index 0000000..6905634 --- /dev/null +++ b/testing/docker/fedora32/build/start_build_shell.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +xhost +local:docker +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose up -d + +cd $OLD_WD + diff --git a/testing/docker/fedora32/build/startup/setup_container.sh b/testing/docker/fedora32/build/startup/setup_container.sh new file mode 100755 index 0000000..f655441 --- /dev/null +++ b/testing/docker/fedora32/build/startup/setup_container.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Here we can add local setup steps for the finishing touches to our Docker build container. +# This can be setting symbolic links, e.g. +# sudo ln -s /disk2/stuff /stuff +# or triggering further scripts. + +# We start a separate xterm/terminal, such that the container doesn't exit right away... +/usr/bin/xterm + diff --git a/testing/docker/fedora32/build/stop_build_shell.sh b/testing/docker/fedora32/build/stop_build_shell.sh new file mode 100755 index 0000000..c0a9707 --- /dev/null +++ b/testing/docker/fedora32/build/stop_build_shell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose down + +cd $OLD_WD + diff --git a/testing/docker/fedora32/test/Dockerfile b/testing/docker/fedora32/test/Dockerfile new file mode 100644 index 0000000..694810e --- /dev/null +++ b/testing/docker/fedora32/test/Dockerfile @@ -0,0 +1,10 @@ +# Building an SCons Test image under Fedora 32 +FROM fedora:32 + +LABEL version="0.0.1" maintainer="Dirk Baechle " description="SCons Test image, based on a Fedora 32" + +# Install additional packages +RUN dnf -y install git bison cvs flex g++ gcc ghostscript m4 openssh-clients openssh-server python3-line_profiler python3-devel pypy3-devel rpm-build rcs java-1.8.0-openjdk swig texlive-scheme-basic texlive-base texlive-latex zip xterm vim vim-common nano + +CMD ["/bin/bash"] + diff --git a/testing/docker/fedora32/test/build_image.sh b/testing/docker/fedora32/test/build_image.sh new file mode 100755 index 0000000..9a97878 --- /dev/null +++ b/testing/docker/fedora32/test/build_image.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker build passing any other build options (command line options may override!) +docker build --network=host --file Dockerfile \ + -t scons-test-fedora32:latest -t scons-test-fedora32:0.0.1 "$@" . + +cd $OLD_WD + diff --git a/testing/docker/fedora32/test/docker-compose.yml b/testing/docker/fedora32/test/docker-compose.yml new file mode 100644 index 0000000..7d25992 --- /dev/null +++ b/testing/docker/fedora32/test/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' + +services: + build: + image: scons-test-fedora32:latest + restart: always + environment: + - DISPLAY + - HOME + volumes: + - /home:/home + - /tmp:/tmp + - /etc/sudoers:/etc/sudoers:ro + - /etc/passwd:/etc/passwd:ro + - /etc/shadow:/etc/shadow:ro + - /etc/group:/etc/group:ro + - ./startup:/startup + container_name: SCons_Test_Fedora32 + entrypoint: /startup/setup_container.sh + user: $DOCKERUID:$DOCKERGID + working_dir: $HOME + diff --git a/testing/docker/fedora32/test/readme.rst b/testing/docker/fedora32/test/readme.rst new file mode 100644 index 0000000..da91176 --- /dev/null +++ b/testing/docker/fedora32/test/readme.rst @@ -0,0 +1,43 @@ +======================= +Image for testing SCons +======================= + +This folder contains the files and scripts that can be used to +test SCons, based on a Fedora 32. + +Building the image +================== + +Build the local docker image by calling:: + + ./build_image.sh + +This will download the base image and install the required additional packages. + +Starting the image +================== + +Is done via ``docker-compose`` so make sure you have this package installed in your host system. Then call:: + + ./start_test_shell.sh + +which will open a new ``xterm`` with your current user on the host system as default. + +If you need additional setup steps or want to *mount* different folders to the test image, change the +files:: + + docker-compose.yml + ./startup/setup_container.sh + +locally. + + +Stopping the image +================== + +Simply call:: + + ./stop_test_shell.sh + +. + diff --git a/testing/docker/fedora32/test/start_test_shell.sh b/testing/docker/fedora32/test/start_test_shell.sh new file mode 100755 index 0000000..6905634 --- /dev/null +++ b/testing/docker/fedora32/test/start_test_shell.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +xhost +local:docker +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose up -d + +cd $OLD_WD + diff --git a/testing/docker/fedora32/test/startup/setup_container.sh b/testing/docker/fedora32/test/startup/setup_container.sh new file mode 100755 index 0000000..f655441 --- /dev/null +++ b/testing/docker/fedora32/test/startup/setup_container.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Here we can add local setup steps for the finishing touches to our Docker build container. +# This can be setting symbolic links, e.g. +# sudo ln -s /disk2/stuff /stuff +# or triggering further scripts. + +# We start a separate xterm/terminal, such that the container doesn't exit right away... +/usr/bin/xterm + diff --git a/testing/docker/fedora32/test/stop_test_shell.sh b/testing/docker/fedora32/test/stop_test_shell.sh new file mode 100755 index 0000000..c0a9707 --- /dev/null +++ b/testing/docker/fedora32/test/stop_test_shell.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# store starting working directory +OLD_WD=$PWD + +# determine working directory of shell script +WD=$(dirname "$(readlink -f "$0")") + +cd $WD + +# call docker container with local user +export DOCKERUID=$(id -u) +export DOCKERGID=$(id -g) +docker-compose down + +cd $OLD_WD + -- cgit v0.12