From 5c8808d29a4117168b183c6bc9020970afd54ced Mon Sep 17 00:00:00 2001 From: Jonathan Crooke Date: Mon, 1 Jul 2024 13:56:12 +0100 Subject: [PATCH 1/3] Fix creating test network --- hooks/pre_test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/pre_test b/hooks/pre_test index ad970d4..f5acf63 100755 --- a/hooks/pre_test +++ b/hooks/pre_test @@ -2,4 +2,4 @@ if [ "$GITHUB_REF_NAME" = "master" ]; then exit 0; fi # shellcheck disable=SC1091 source "$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/pre_build" -docker network create --driver=bridge --subnet=172.99.0.0/16 --ip-range=172.99.0.2/16 --gateway=172.99.0.1 -o 'com.docker.network.bridge.name'='test_shared' test_shared &> /dev/null || true +docker network create --driver=bridge --subnet=172.99.0.0/16 --ip-range=172.99.0.0/16 --gateway=172.99.0.1 -o 'com.docker.network.bridge.name'='test_shared' test_shared From 5499dc70c6e5d6187ee30e642846fc23ffebcf34 Mon Sep 17 00:00:00 2001 From: Jonathan Crooke Date: Mon, 1 Jul 2024 14:56:06 +0100 Subject: [PATCH 2/3] Migrate to docker compose plugin --- README.md | 6 +++--- build/bin/track | 2 +- hooks/build | 2 +- hooks/test | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b1b1281..2aeb890 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,9 @@ services: ``` * Run the build - * `docker-compose build .` - * If using `extends`: `docker-compose -f docker-compose.build.yml build` -* Start the container: `docker-compose up -d` + * `docker compose build .` + * If using `extends`: `docker compose -f docker-compose.build.yml build` +* Start the container: `docker compose up -d` * Initally test the build by connecting to the ispconfig control panel: `http://:8080` * Do addition verification! * Ideally, push your image to Docker Cloud diff --git a/build/bin/track b/build/bin/track index 7f4e97b..590958e 100755 --- a/build/bin/track +++ b/build/bin/track @@ -6,7 +6,7 @@ echo "dfasf" rm -rf .git git init git add --all - git commit -m "docker-compose track : initial checkin" >/dev/null + git commit -m "docker compose track : initial checkin" >/dev/null exit 0 fi diff --git a/hooks/build b/hooks/build index 7e1e410..bc6eeec 100755 --- a/hooks/build +++ b/hooks/build @@ -6,4 +6,4 @@ OPTIONS=() source "$DIR/pre_build" [ -t 1 ] && OPTIONS+=(--progress tty) -docker-compose -f "$DIR/../build/docker-compose.build.yml" build "${OPTIONS[@]}" "$@" +docker compose -f "$DIR/../build/docker-compose.build.yml" build "${OPTIONS[@]}" "$@" diff --git a/hooks/test b/hooks/test index 291d068..672979c 100755 --- a/hooks/test +++ b/hooks/test @@ -10,8 +10,8 @@ export CONTAINER="ispconfig-test" function buildAndTest() { YML=$1 - UP="docker-compose -f test/$YML up --build --abort-on-container-exit --force-recreate --remove-orphans sut" - DOWN="docker-compose -f test/$YML down -v" + UP="docker compose -f test/$YML up --build --abort-on-container-exit --force-recreate --remove-orphans sut" + DOWN="docker compose -f test/$YML down -v" if ! $UP; then echo "Failed: \"$UP\"" From dc7efe871d407c62809c78673b4de1e868588c90 Mon Sep 17 00:00:00 2001 From: Jonathan Crooke Date: Mon, 1 Jul 2024 15:25:19 +0100 Subject: [PATCH 3/3] Fix ENV args --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index cdbaebe..6a77820 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,9 +68,9 @@ ENV POSTGREY_TEXT="Delayed by postgrey" # --- prep SHELL ["/bin/bash", "-Eeuo", "pipefail", "-c"] # --- set timezone and locale -ENV LANG "${BUILD_LOCALE}.UTF-8" -ENV LANGUAGE "${BUILD_LOCALE}:en" -ENV LC_ALL "${BUILD_LOCALE}.UTF-8" +ENV LANG="${BUILD_LOCALE}.UTF-8" +ENV LANGUAGE="${BUILD_LOCALE}:en" +ENV LC_ALL="${BUILD_LOCALE}.UTF-8" # hadolint ignore=SC1091 RUN . /etc/os-release && \ touch /etc/apt/sources.list && \ @@ -345,7 +345,7 @@ RUN cp -v /etc/passwd /etc/passwd.bootstrap && \ mkdir -p /var/vmail && \ tar -C /var/vmail -czf /bootstrap/vmail.tgz . && \ tar -C /var/www -czf /bootstrap/www.tgz . -ENV TERM xterm +ENV TERM=xterm RUN printf "export TERM=xterm\n" >> /root/.bashrc && \ #