From 4515a6e748972a0749261cf9d5db5f1246324c32 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Thu, 29 Aug 2024 14:07:30 +0200 Subject: [PATCH] adds curl-yq image: we frequently need to process response bodies --- .github/workflows/images.yaml | 34 +++++++++++++++++++++++++++++++++- curl-yq/Dockerfile | 13 +++++++++++++ test.sh | 1 + 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 curl-yq/Dockerfile diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml index 51682dd..c39a2ca 100644 --- a/.github/workflows/images.yaml +++ b/.github/workflows/images.yaml @@ -36,7 +36,7 @@ jobs: TAG_ZOOKEEPER=2.5.1-zookeeper-server-start TAG_INITUTILS=initutils-nonroot@sha256:8988aca5b34feabe8d7d4e368f74b2ede398f692c7e99a38b262a938d475812c TAG_ENVOY=v1.31.0 - TAG_CURL=8.8.0 + TAG_CURL=8.9.1 TAG_BUSYBOX=1.36.1-glibc TAG_TINYGO=0.32.0 crane cp docker.io/yolean/kafka-keyvalue:$TAG_KKV ghcr.io/yolean/kafka-keyvalue:$TAG_KKV @@ -639,3 +639,35 @@ jobs: cache-to: type=gha,mode=max build-contexts: | yolean/toil-storage:root=docker-image://ghcr.io/yolean/toil-storage:root + - + name: Build and push curl-yq root + uses: docker/build-push-action@v5 + env: + SOURCE_DATE_EPOCH: 0 + with: + context: curl-yq + tags: | + ghcr.io/yolean/curl-yq:root + ghcr.io/yolean/curl-yq:${{ github.sha }}-root + platforms: linux/amd64,linux/arm64/v8 + push: true + cache-from: type=gha + cache-to: type=gha,mode=max + build-contexts: | + yolean/builder-base=docker-image://ghcr.io/yolean/builder-base + - + name: Build and push curl-yq latest + uses: docker/build-push-action@v5 + env: + SOURCE_DATE_EPOCH: 0 + with: + context: to-nonroot/curl-yq + tags: | + ghcr.io/yolean/curl-yq:latest + ghcr.io/yolean/curl-yq:${{ github.sha }} + platforms: linux/amd64,linux/arm64/v8 + push: true + cache-from: type=gha + cache-to: type=gha,mode=max + build-contexts: | + yolean/curl-yq:root=docker-image://ghcr.io/yolean/curl-yq:root diff --git a/curl-yq/Dockerfile b/curl-yq/Dockerfile new file mode 100644 index 0000000..cebedd6 --- /dev/null +++ b/curl-yq/Dockerfile @@ -0,0 +1,13 @@ +ARG TAG_CURL=8.9.1 + +FROM --platform=$TARGETPLATFORM yolean/builder-base as ystack-runner + +FROM --platform=$TARGETPLATFORM ghcr.io/yolean/curl:${TAG_CURL} + +COPY --from=ystack-runner /usr/local/src/ystack/bin/y-yq-v* /usr/bin/yq + +# bypass entrypoint.sh +ENTRYPOINT ["/usr/bin/curl"] + +# so we get root/nonroot build +USER root diff --git a/test.sh b/test.sh index 2e5a946..c86f8d6 100755 --- a/test.sh +++ b/test.sh @@ -45,6 +45,7 @@ runtime-quarkus-ubuntu runtime-quarkus-ubuntu-jre runtime-quarkus-dev toil-storage +curl-yq " DEPRECATED="