From d4b1fb1e9e07d4714c8744e3b020d99e798c9e47 Mon Sep 17 00:00:00 2001 From: dvlbot Date: Wed, 14 Dec 2022 11:35:06 +0100 Subject: [PATCH 1/4] Fix wkhtmltodf and wp-cli installation --- .ansible/group_vars/all/work.yml | 8 +++++--- Dockerfiles/work/Dockerfile-5.3 | 2 ++ Dockerfiles/work/Dockerfile-5.4 | 2 ++ Dockerfiles/work/Dockerfile-5.5 | 2 ++ Dockerfiles/work/Dockerfile-5.6 | 6 ++++-- Dockerfiles/work/Dockerfile-7.0 | 6 ++++-- Dockerfiles/work/Dockerfile-7.1 | 6 ++++-- Dockerfiles/work/Dockerfile-7.2 | 6 ++++-- Dockerfiles/work/Dockerfile-7.3 | 6 ++++-- Dockerfiles/work/Dockerfile-7.4 | 6 ++++-- Dockerfiles/work/Dockerfile-8.0 | 6 ++++-- Dockerfiles/work/Dockerfile-8.1 | 6 ++++-- Dockerfiles/work/Dockerfile-8.2 | 6 ++++-- php_tools/wkhtmltopdf/install.yml | 4 ++-- php_tools/wp-cli/install.yml | 4 +++- 15 files changed, 52 insertions(+), 24 deletions(-) diff --git a/.ansible/group_vars/all/work.yml b/.ansible/group_vars/all/work.yml index 133826a2..15758be4 100644 --- a/.ansible/group_vars/all/work.yml +++ b/.ansible/group_vars/all/work.yml @@ -623,8 +623,8 @@ tools_available: command: | DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ @@ -677,7 +677,9 @@ tools_available: type: custom command: curl -sS -L --fail "${WPCLI_URL}" -L -o /usr/local/bin/wp build_dep: [] - run_dep: [] + # Fixes: sh: 1: less: not found during 'wp help' + # It internally pipes it to less. + run_dep: [less] pre: WPCLI_URL="https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" post: chmod +x /usr/local/bin/wp 5.5: diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index fdc03395..f2130501 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -270,6 +270,7 @@ RUN set -eux \ # ---------- run_deps ---------- dos2unix \ file \ + less \ moreutils \ ruby \ # ---------- type: apt ---------- @@ -581,6 +582,7 @@ RUN set -eux \ # ---------- run_deps ---------- dos2unix \ file \ + less \ moreutils \ ruby \ # ---------- type: apt ---------- diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 16637912..64345673 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -270,6 +270,7 @@ RUN set -eux \ # ---------- run_deps ---------- dos2unix \ file \ + less \ moreutils \ ruby \ # ---------- type: apt ---------- @@ -604,6 +605,7 @@ RUN set -eux \ # ---------- run_deps ---------- dos2unix \ file \ + less \ moreutils \ ruby \ # ---------- type: apt ---------- diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 6b346bbe..5fe0713e 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -270,6 +270,7 @@ RUN set -eux \ # ---------- run_deps ---------- dos2unix \ file \ + less \ moreutils \ ruby \ # ---------- type: apt ---------- @@ -659,6 +660,7 @@ RUN set -eux \ # ---------- run_deps ---------- dos2unix \ file \ + less \ moreutils \ ruby \ # ---------- type: apt ---------- diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index ee00b618..c25e34bd 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -271,6 +271,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont1 \ libxrender1 \ @@ -615,8 +616,8 @@ RUN set -eux \ && OS_RELEASE="stretch" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ @@ -685,6 +686,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont1 \ libxrender1 \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 81eb367d..dfba8f3f 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -271,6 +271,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont1 \ libxrender1 \ @@ -615,8 +616,8 @@ RUN set -eux \ && OS_RELEASE="stretch" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ @@ -685,6 +686,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont1 \ libxrender1 \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index c2b8d065..85c3f7b5 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -271,6 +271,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ @@ -615,8 +616,8 @@ RUN set -eux \ && OS_RELEASE="buster" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ @@ -685,6 +686,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 0573cb71..0a4fda36 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -271,6 +271,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ @@ -615,8 +616,8 @@ RUN set -eux \ && OS_RELEASE="buster" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ @@ -685,6 +686,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index f9da98cc..7d8618ed 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -273,6 +273,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ @@ -615,8 +616,8 @@ RUN set -eux \ && OS_RELEASE="bullseye" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ @@ -685,6 +686,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index 3bc68e6d..230e242b 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -273,6 +273,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ @@ -615,8 +616,8 @@ RUN set -eux \ && OS_RELEASE="bullseye" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ @@ -685,6 +686,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index f0f070bd..68f602f8 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -273,6 +273,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ @@ -615,8 +616,8 @@ RUN set -eux \ && OS_RELEASE="bullseye" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ @@ -685,6 +686,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ diff --git a/Dockerfiles/work/Dockerfile-8.1 b/Dockerfiles/work/Dockerfile-8.1 index 94a2038e..b3fb8b81 100644 --- a/Dockerfiles/work/Dockerfile-8.1 +++ b/Dockerfiles/work/Dockerfile-8.1 @@ -273,6 +273,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ @@ -615,8 +616,8 @@ RUN set -eux \ && OS_RELEASE="bullseye" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ @@ -685,6 +686,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ diff --git a/Dockerfiles/work/Dockerfile-8.2 b/Dockerfiles/work/Dockerfile-8.2 index 5d7557b7..a0200a43 100644 --- a/Dockerfiles/work/Dockerfile-8.2 +++ b/Dockerfiles/work/Dockerfile-8.2 @@ -273,6 +273,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ @@ -568,8 +569,8 @@ RUN set -eux \ && OS_RELEASE="bullseye" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ @@ -638,6 +639,7 @@ RUN set -eux \ dos2unix \ file \ fontconfig \ + less \ libfontenc1 \ libxfont2 \ libxrender1 \ diff --git a/php_tools/wkhtmltopdf/install.yml b/php_tools/wkhtmltopdf/install.yml index 286f7d02..b2f58de5 100644 --- a/php_tools/wkhtmltopdf/install.yml +++ b/php_tools/wkhtmltopdf/install.yml @@ -8,8 +8,8 @@ all: command: | DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sSL -L --fail https://api.github.com/repos/wkhtmltopdf/packaging/releases \ - | awk -F\" "/wkhtmltopdf.*.${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ + curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ diff --git a/php_tools/wp-cli/install.yml b/php_tools/wp-cli/install.yml index 4039379f..d08a3866 100644 --- a/php_tools/wp-cli/install.yml +++ b/php_tools/wp-cli/install.yml @@ -6,7 +6,9 @@ all: type: custom command: curl -sS -L --fail "${WPCLI_URL}" -L -o /usr/local/bin/wp build_dep: [] - run_dep: [] + # Fixes: sh: 1: less: not found during 'wp help' + # It internally pipes it to less. + run_dep: [less] pre: WPCLI_URL="https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" post: chmod +x /usr/local/bin/wp From fada51d70e75706d8f3c7f4e94ef0c6111ebae45 Mon Sep 17 00:00:00 2001 From: dvlbot Date: Wed, 14 Dec 2022 11:36:59 +0100 Subject: [PATCH 2/4] Updated changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ddc787..ac9783d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ ## Unreleased +## Release 0.147 + +### Fixed +- Fixed wkhtmltopdf version finder during install +- Fixed wp-cli runtime requirements (needs `less` in order to function) + + ## Release 0.146 This release adds lots of documentation about recently added features. From 5613a402475af2d22e73792cea7e5c81ccab5401 Mon Sep 17 00:00:00 2001 From: dvlbot Date: Wed, 14 Dec 2022 18:50:57 +0100 Subject: [PATCH 3/4] Ignore expired certs during version check --- .ansible/group_vars/all/work.yml | 4 ++-- Dockerfiles/work/Dockerfile-5.6 | 4 ++-- Dockerfiles/work/Dockerfile-7.0 | 4 ++-- Dockerfiles/work/Dockerfile-7.1 | 4 ++-- Dockerfiles/work/Dockerfile-7.2 | 4 ++-- Dockerfiles/work/Dockerfile-7.3 | 4 ++-- Dockerfiles/work/Dockerfile-7.4 | 4 ++-- Dockerfiles/work/Dockerfile-8.0 | 4 ++-- Dockerfiles/work/Dockerfile-8.1 | 4 ++-- Dockerfiles/work/Dockerfile-8.2 | 4 ++-- php_tools/wkhtmltopdf/install.yml | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.ansible/group_vars/all/work.yml b/.ansible/group_vars/all/work.yml index 15758be4..670ef9aa 100644 --- a/.ansible/group_vars/all/work.yml +++ b/.ansible/group_vars/all/work.yml @@ -623,12 +623,12 @@ tools_available: command: | DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ run_dep: diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index c25e34bd..3f67cb8c 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -616,12 +616,12 @@ RUN set -eux \ && OS_RELEASE="stretch" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index dfba8f3f..3473d7c7 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -616,12 +616,12 @@ RUN set -eux \ && OS_RELEASE="stretch" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 85c3f7b5..7f99afb3 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -616,12 +616,12 @@ RUN set -eux \ && OS_RELEASE="buster" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 0a4fda36..61391f9f 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -616,12 +616,12 @@ RUN set -eux \ && OS_RELEASE="buster" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 7d8618ed..0072052d 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -616,12 +616,12 @@ RUN set -eux \ && OS_RELEASE="bullseye" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ \ diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index 230e242b..8f2c0885 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -616,12 +616,12 @@ RUN set -eux \ && OS_RELEASE="bullseye" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ \ diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index 68f602f8..cf606fff 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -616,12 +616,12 @@ RUN set -eux \ && OS_RELEASE="bullseye" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ \ diff --git a/Dockerfiles/work/Dockerfile-8.1 b/Dockerfiles/work/Dockerfile-8.1 index b3fb8b81..ce0efded 100644 --- a/Dockerfiles/work/Dockerfile-8.1 +++ b/Dockerfiles/work/Dockerfile-8.1 @@ -616,12 +616,12 @@ RUN set -eux \ && OS_RELEASE="bullseye" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ \ diff --git a/Dockerfiles/work/Dockerfile-8.2 b/Dockerfiles/work/Dockerfile-8.2 index a0200a43..e308ace5 100644 --- a/Dockerfiles/work/Dockerfile-8.2 +++ b/Dockerfiles/work/Dockerfile-8.2 @@ -569,12 +569,12 @@ RUN set -eux \ && OS_RELEASE="bullseye" \ && DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ \ diff --git a/php_tools/wkhtmltopdf/install.yml b/php_tools/wkhtmltopdf/install.yml index b2f58de5..4fcadfb7 100644 --- a/php_tools/wkhtmltopdf/install.yml +++ b/php_tools/wkhtmltopdf/install.yml @@ -8,12 +8,12 @@ all: command: | DEB_HOST_ARCH="$( dpkg-architecture --query DEB_HOST_ARCH )" \ && WK_URL="$( \ - curl -sS -L --fail 'https://wkhtmltopdf.org/downloads.html' \ + curl -sS -k -L --fail 'https://wkhtmltopdf.org/downloads.html' \ | awk -F'"' "/wkhtmltopdf.*${OS_RELEASE}_${DEB_HOST_ARCH}\.deb/{print \$(NF-1)}" \ | head -1 \ )" \ && echo "URL: ${WK_URL}" \ - && curl -sS -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ + && curl -sS -k -L --fail -o /tmp/wkhtmltopdf.deb "${WK_URL}" \ && dpkg -i /tmp/wkhtmltopdf.deb \ && rm -f /tmp/wkhtmltopdf.deb \ run_dep: From 9c552b020c941bcb6fa6a3a69d35ce430eba691e Mon Sep 17 00:00:00 2001 From: dvlbot Date: Wed, 14 Dec 2022 18:51:40 +0100 Subject: [PATCH 4/4] Make README examples copy-able --- README.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index bb98eced..4211bcec 100644 --- a/README.md +++ b/README.md @@ -349,17 +349,17 @@ Apart from the provided tools, you will also be able to use the container simila #### Provide PHP-FPM port to host ```shell -$ docker run -d \ +docker run -d -it \ -p 127.0.0.1:9000:9000 \ - -t devilbox/php-fpm:7.2-prod + devilbox/php-fpm:7.2-prod ``` #### Alter PHP-FPM and system timezone ```shell -$ docker run -d \ +docker run -d -it \ -p 127.0.0.1:9000:9000 \ -e TIMEZONE=Europe/Berlin \ - -t devilbox/php-fpm:7.2-prod + devilbox/php-fpm:7.2-prod ``` #### Load custom PHP configuration @@ -367,48 +367,48 @@ $ docker run -d \ `config/` is a local directory that will hold the PHP *.ini files you want to load into the Docker container. ```shell # Create config directory to be mounted with dummy configuration -$ mkdir config +mkdir config # Xdebug 2 -$ echo "xdebug.enable = 1" > config/xdebug.ini +echo "xdebug.enable = 1" > config/xdebug.ini # Xdebug 3 -$ echo "xdebug.mode = debug" > config/xdebug.ini +echo "xdebug.mode = debug" > config/xdebug.ini # Run container and mount it -$ docker run -d \ +docker run -d -it \ -p 127.0.0.1:9000:9000 \ -v config:/etc/php-custom.d \ - -t devilbox/php-fpm:7.2-prod + devilbox/php-fpm:7.2-prod ``` #### MySQL connect via 127.0.0.1 (via port-forward) Forward MySQL Port from `172.168.0.30` (or any other IP address/hostname) and Port `3306` to the PHP docker on `127.0.0.1:3306`. By this, your PHP files inside the docker can use `127.0.0.1` to connect to a MySQL database. ```shell -$ docker run -d \ +docker run -d -it \ -p 127.0.0.1:9000:9000 \ -e FORWARD_PORTS_TO_LOCALHOST='3306:172.168.0.30:3306' \ - -t devilbox/php-fpm:7.2-prod + devilbox/php-fpm:7.2-prod ``` #### MySQL and Redis connect via 127.0.0.1 (via port-forward) Forward MySQL Port from `172.168.0.30:3306` and Redis port from `redis:6379` to the PHP docker on `127.0.0.1:3306` and `127.0.0.1:6379`. By this, your PHP files inside the docker can use `127.0.0.1` to connect to a MySQL or Redis database. ```shell -$ docker run -d \ +docker run -d -it \ -p 127.0.0.1:9000:9000 \ -e FORWARD_PORTS_TO_LOCALHOST='3306:172.168.0.30:3306, 6379:redis:6379' \ - -t devilbox/php-fpm:7.2-prod + devilbox/php-fpm:7.2-prod ``` #### Launch Postfix for mail-catching Once you set `$ENABLE_MAIL=2`, all mails sent via any of your PHP applications no matter to which domain, are catched locally into the `devilbox` account. You can also mount the mail directory locally to hook in with mutt and read those mails. ```shell -$ docker run -d \ +docker run -d -it \ -p 127.0.0.1:9000:9000 \ -v /tmp/mail:/var/mail \ -e ENABLE_MAIL=2 \ - -t devilbox/php-fpm:7.2-prod + devilbox/php-fpm:7.2-prod ``` #### Webserver and PHP-FPM @@ -416,20 +416,20 @@ $ docker run -d \ `~/my-host-www` will be the directory that serves the php files (your document root). Make sure to mount it into both, php and the webserver. ```shell # Start PHP-FPM container -$ docker run -d \ +docker run -d -it \ -v ~/my-host-www:/var/www/default/htdocs \ --name php \ - -t devilbox/php-fpm:7.2-prod + devilbox/php-fpm:7.2-prod # Start webserver and link with PHP-FPM -$ docker run -d \ +docker run -d -it \ -p 80:80 \ -v ~/my-host-www:/var/www/default/htdocs \ -e PHP_FPM_ENABLE=1 \ -e PHP_FPM_SERVER_ADDR=php \ -e PHP_FPM_SERVER_PORT=9000 \ --link php \ - -t devilbox/nginx-mainline + devilbox/nginx-mainline ``` #### Create MySQL Backups @@ -440,16 +440,16 @@ The MySQL server could be another Docker container linked to the PHP-FPM contain ``` # Start container -$ docker run -d \ +docker run -d -it \ -e MYSQL_BACKUP_USER=root \ -e MYSQL_BACKUP_PASS=somepass \ -e MYSQL_BACKUP_HOST=mysql \ -v ~/backups:/shared/backups \ --name php \ - -t devilbox/php-fpm:7.2-work + devilbox/php-fpm:7.2-work # Run database dump -$ docker exec -it php mysqldump-secure +docker exec -it php mysqldump-secure ``` #### Docker Compose reference implementation