From e3ec4f6f6fff6d577d25d31d741985c6138f3ff1 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Fri, 13 May 2022 15:12:26 +0200 Subject: [PATCH 1/2] feat(debugging) docker output plain when --debug is used This makes it easier to debug the build of the docker image --- README.md | 4 ++++ pongo.sh | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 291afbb6..ddac7f65 100644 --- a/README.md +++ b/README.md @@ -779,6 +779,10 @@ The result should be a new PR on the Pongo repo. ### unreleased + * the `--debug` flag now also sets docker build command to `--progress plain` + for easier debugging of the build. It also does `set -x` so be careful not + to copy-paste secrets somewhere!! + * Enable SSL for Redis on port `6380` * Upgrade image `redis:5.0.4-alpine` to `redis:6.2.6-alpine` diff --git a/pongo.sh b/pongo.sh index b96261ac..3e04d8fe 100755 --- a/pongo.sh +++ b/pongo.sh @@ -376,6 +376,7 @@ function parse_args { args_done=1 ;; --debug) + PONGO_DEBUG=true set -x ;; *) @@ -724,8 +725,15 @@ function build_image { fi msg "starting build of image '$KONG_TEST_IMAGE'" + local progress_type + if [[ "$PONGO_DEBUG" == "true" ]] ; then + progress_type=plain + else + progress_type=auto + fi $WINPTY_PREFIX docker build \ -f "$DOCKER_FILE" \ + --progress $progress_type \ --build-arg http_proxy \ --build-arg https_proxy \ --build-arg ftp_proxy \ From d3096a50a3ba86052b4e56577d9bb1c1cf75618d Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Fri, 13 May 2022 15:19:12 +0200 Subject: [PATCH 2/2] fix(httpie) python3-dev package required to build httpie --- README.md | 2 ++ assets/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ddac7f65..10c7dc96 100644 --- a/README.md +++ b/README.md @@ -779,6 +779,8 @@ The result should be a new PR on the Pongo repo. ### unreleased + * add `python3-dev` package to fix the `httpie` installation + * the `--debug` flag now also sets docker build command to `--progress plain` for easier debugging of the build. It also does `set -x` so be careful not to copy-paste secrets somewhere!! diff --git a/assets/Dockerfile b/assets/Dockerfile index 38597ea7..dbb49f4e 100644 --- a/assets/Dockerfile +++ b/assets/Dockerfile @@ -28,7 +28,7 @@ USER root # But that means hardcoding and that doesn't play well with the nature of Pongo # that should be independent of Kong versions. RUN apk update \ - && apk add zip unzip make g++ py-pip jq git bsd-compat-headers m4 openssl-dev curl \ + && apk add zip unzip make g++ py-pip jq git bsd-compat-headers m4 openssl-dev curl python3-dev \ && curl -k -s -S -L https://github.com/fullstorydev/grpcurl/releases/download/v1.7.0/grpcurl_1.7.0_linux_x86_64.tar.gz | tar xz -C /kong/bin \ && pip install httpie \ ; cd /kong \