From 0230b027743c84daa0387f06ddc39daeff019028 Mon Sep 17 00:00:00 2001 From: Masaru Hoshi Date: Wed, 31 May 2023 11:37:34 -0400 Subject: [PATCH 1/8] Go 1.19 Signed-off-by: Masaru Hoshi --- go-build/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go-build/Dockerfile b/go-build/Dockerfile index bb4d5fc8..c2be7409 100644 --- a/go-build/Dockerfile +++ b/go-build/Dockerfile @@ -12,12 +12,12 @@ FROM lachlanevenson/k8s-helm:v3.10.2 AS helm2 FROM lachlanevenson/k8s-helm:v3.8.0 AS helm FROM golangci/golangci-lint:v1.44.0-alpine AS golangci-lint -FROM alpine:3.15 AS cc-test-reporter +FROM alpine:3.18 AS cc-test-reporter RUN wget -q -O /bin/cc-test-reporter https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 RUN chmod +x /bin/cc-test-reporter -FROM alpine:3.15 AS packages +FROM alpine:3.18 AS packages RUN apk add --no-cache \ zip \ @@ -52,7 +52,7 @@ RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC/g && ln -s /lib/libc.musl-x86_64.so.1 /usr/glibc-compat/lib \ && ln -s /usr/lib/libgcc_s.so.1 /usr/glibc-compat/lib -FROM golang:1.18.1-alpine AS build +FROM golang:1.19.9-alpine AS build COPY --from=gomplate /gomplate /bin/gomplate COPY --from=docker /usr/local/bin/docker /bin/docker From c6c4939f4800ff24776134edd1c01d6487949a38 Mon Sep 17 00:00:00 2001 From: Masaru Hoshi Date: Wed, 31 May 2023 11:46:40 -0400 Subject: [PATCH 2/8] bump glibc Signed-off-by: Masaru Hoshi --- go-build/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-build/Dockerfile b/go-build/Dockerfile index c2be7409..3f541faf 100644 --- a/go-build/Dockerfile +++ b/go-build/Dockerfile @@ -37,7 +37,7 @@ RUN apk add --no-cache \ libgcc \ build-base -ENV GLIBC=2.31-r0 +ENV GLIBC=2.35-r1 RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub From d75107b5c832a53746b287b7e22d40237e30180f Mon Sep 17 00:00:00 2001 From: Masaru Hoshi Date: Wed, 31 May 2023 20:52:48 -0400 Subject: [PATCH 3/8] add go-1.18 fork Signed-off-by: Masaru Hoshi --- go-build-1.18/Dockerfile | 72 +++++++++++++++++++++++++++ go-build-1.18/README.md | 19 +++++++ go-build-1.18/awscli-requirements.txt | 12 +++++ go-build-1.18/readme.yaml | 5 ++ 4 files changed, 108 insertions(+) create mode 100644 go-build-1.18/Dockerfile create mode 100644 go-build-1.18/README.md create mode 100644 go-build-1.18/awscli-requirements.txt create mode 100644 go-build-1.18/readme.yaml diff --git a/go-build-1.18/Dockerfile b/go-build-1.18/Dockerfile new file mode 100644 index 00000000..ba6b3abd --- /dev/null +++ b/go-build-1.18/Dockerfile @@ -0,0 +1,72 @@ +FROM hairyhenderson/gomplate:v3.10.0-slim AS gomplate +FROM docker:23.0.1 AS docker +FROM docker/compose:1.29.2 AS compose +FROM vault:1.9.3 AS vault +FROM hashicorp/terraform:1.1.5 AS terraform +FROM hashicorp/packer:1.7.10 AS packer +FROM prom/prometheus:v2.33.1 AS prometheus +FROM prom/alertmanager:v0.23.0 AS alertmanager +FROM mikefarah/yq:4.18.1 AS yq +FROM lachlanevenson/k8s-kubectl:v1.21.9 AS kubectl +FROM lachlanevenson/k8s-helm:v3.10.2 AS helm2 +FROM lachlanevenson/k8s-helm:v3.8.0 AS helm +FROM golangci/golangci-lint:v1.44.0-alpine AS golangci-lint + +FROM alpine:3.18 AS cc-test-reporter + +RUN wget -q -O /bin/cc-test-reporter https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 +RUN chmod +x /bin/cc-test-reporter + +FROM alpine:3.18 AS packages + +RUN apk add --no-cache \ + zip \ + unzip \ + bats \ + bash \ + grep \ + sed \ + make \ + jq \ + curl \ + git \ + python3 \ + py3-pip \ + openssh-client \ + openssl \ + libgcc \ + build-base + +ENV GLIBC=2.31-r0 + +RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub + +COPY awscli-requirements.txt requirements.txt +RUN pip install -r requirements.txt +RUN rm -rf requirements.txt ~/.cache + +RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC/glibc-$GLIBC.apk \ + && apk add --no-cache glibc-$GLIBC.apk \ + && rm glibc-$GLIBC.apk \ + && ln -s /lib/libz.so.1 /usr/glibc-compat/lib \ + && ln -s /lib/libc.musl-x86_64.so.1 /usr/glibc-compat/lib \ + && ln -s /usr/lib/libgcc_s.so.1 /usr/glibc-compat/lib + +FROM golang:1.18.1-alpine AS build + +COPY --from=gomplate /gomplate /bin/gomplate +COPY --from=docker /usr/local/bin/docker /bin/docker +COPY --from=vault /bin/vault /bin/vault +COPY --from=terraform /bin/terraform /bin/terraform +COPY --from=packer /bin/packer /bin/packer +COPY --from=prometheus /bin/promtool /bin/promtool +COPY --from=alertmanager /bin/amtool /bin/amtool +COPY --from=yq /usr/bin/yq /usr/bin/yq +COPY --from=compose /usr/local/bin/docker-compose /bin/docker-compose +COPY --from=kubectl /usr/local/bin/kubectl /usr/local/bin/kubectl +COPY --from=helm2 /usr/local/bin/helm /usr/local/bin/helm2 +COPY --from=helm /usr/local/bin/helm /usr/local/bin/helm +COPY --from=cc-test-reporter /bin/cc-test-reporter /bin/cc-test-reporter +COPY --from=golangci-lint /usr/bin/golangci-lint /bin/ + +COPY --from=packages / / diff --git a/go-build-1.18/README.md b/go-build-1.18/README.md new file mode 100644 index 00000000..bc81a50b --- /dev/null +++ b/go-build-1.18/README.md @@ -0,0 +1,19 @@ +# qlik/go-build + +This image is built to support building Go-based projects in CircleCI. It comes +populated with software generally useful for building and deploying. See the +`Dockerfile` in this folder for details. + +## Third-Party Licenses + +See the git repository for the source code information: https://github.com/qlik-oss/dockerfiles/blob/master/LICENSE + +As with all Docker images, these also contain other software which may be under other licenses, along with any direct or indirect dependencies of the primary software being contained. + +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. + +The licenses of the contained software can be determined by inspecting the [Dockerfile](https://github.com/qlik-oss/dockerfiles/blob/master/go-build/Dockerfile) + +## Unsupported + +The source code (Dockerfiles) and binaries (container images) that result are provided for convenience, and not supported in any way. diff --git a/go-build-1.18/awscli-requirements.txt b/go-build-1.18/awscli-requirements.txt new file mode 100644 index 00000000..cb2262ca --- /dev/null +++ b/go-build-1.18/awscli-requirements.txt @@ -0,0 +1,12 @@ +awscli==1.22.47 +botocore==1.23.47 +colorama==0.4.3 +docutils==0.15.2 +jmespath==0.10.0 +pyasn1==0.4.8 +python-dateutil==2.8.2 +PyYAML==5.4.1 +rsa==4.7.2 +s3transfer==0.5.1 +six==1.16.0 +urllib3==1.26.8 diff --git a/go-build-1.18/readme.yaml b/go-build-1.18/readme.yaml new file mode 100644 index 00000000..069f3b5c --- /dev/null +++ b/go-build-1.18/readme.yaml @@ -0,0 +1,5 @@ +name: go-build +description: | + This image is built to support building Go-based projects in CircleCI. It comes + populated with software generally useful for building and deploying. See the + `Dockerfile` in this folder for details. From 1d282d5e70126aca30c0ae408abd0f52f71c2efb Mon Sep 17 00:00:00 2001 From: Masaru Hoshi Date: Thu, 1 Jun 2023 08:39:25 -0400 Subject: [PATCH 4/8] update documentations for 1.18 Signed-off-by: Masaru Hoshi --- go-build-1.18/README.md | 6 ++++-- go-build-1.18/readme.yaml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go-build-1.18/README.md b/go-build-1.18/README.md index bc81a50b..a27f2a9c 100644 --- a/go-build-1.18/README.md +++ b/go-build-1.18/README.md @@ -1,9 +1,11 @@ -# qlik/go-build +# qlik/go-build-1.18 This image is built to support building Go-based projects in CircleCI. It comes populated with software generally useful for building and deploying. See the `Dockerfile` in this folder for details. +**This image is a backward compatibility image avaiable for Go 1.18 only.** + ## Third-Party Licenses See the git repository for the source code information: https://github.com/qlik-oss/dockerfiles/blob/master/LICENSE @@ -12,7 +14,7 @@ As with all Docker images, these also contain other software which may be under As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. -The licenses of the contained software can be determined by inspecting the [Dockerfile](https://github.com/qlik-oss/dockerfiles/blob/master/go-build/Dockerfile) +The licenses of the contained software can be determined by inspecting the [Dockerfile](https://github.com/qlik-oss/dockerfiles/blob/master/go-build-1.18/Dockerfile) ## Unsupported diff --git a/go-build-1.18/readme.yaml b/go-build-1.18/readme.yaml index 069f3b5c..bd1e7e97 100644 --- a/go-build-1.18/readme.yaml +++ b/go-build-1.18/readme.yaml @@ -1,4 +1,4 @@ -name: go-build +name: go-build-1.18 description: | This image is built to support building Go-based projects in CircleCI. It comes populated with software generally useful for building and deploying. See the From eb79892eb9db41a610e12b653509a6ec71eaf5fb Mon Sep 17 00:00:00 2001 From: Masaru Hoshi Date: Thu, 1 Jun 2023 08:48:43 -0400 Subject: [PATCH 5/8] build for go-1.18 Signed-off-by: Masaru Hoshi --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb343517..8cc0e575 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,6 +37,40 @@ jobs: docker push qlik/go-build docker push qlik/go-build:$(date +'%Y-%m-%d') if: github.ref == 'refs/heads/master' && github.repository == 'qlik-oss/dockerfiles' + docker-build-go-build-1.18: name: docker build go-build-1.18 + runs-on: ubuntu-latest + env: + DOCKER_BUILDKIT: "1" + steps: + - name: docker version + run: docker version + - uses: actions/checkout@master + - name: build + run: docker build --progress plain --iidfile go-build-1.18/image.iid -f go-build-1.18/Dockerfile go-build-1.18/ + - name: tag + run: | + docker tag $(< go-build-1.18/image.iid) ghcr.io/qlik-oss/go-build:1.18 + docker tag $(< go-build-1.18/image.iid) ghcr.io/qlik-oss/go-build:1.18-$(date +'%Y-%m-%d') + docker tag $(< go-build-1.18/image.iid) qlik/go-build:1.18 + docker tag $(< go-build-1.18/image.iid) qlik/go-build:1.18-$(date +'%Y-%m-%d') + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GHCR_TOKEN }} + if: github.ref == 'refs/heads/master' && github.repository == 'qlik-oss/dockerfiles' + - name: login to DockerHub + run: | + echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin + if: github.ref == 'refs/heads/master' && github.repository == 'qlik-oss/dockerfiles' + - name: docker push + run: | + docker push ghcr.io/qlik-oss/go-build:1.18 + docker push ghcr.io/qlik-oss/go-build:1.18-$(date +'%Y-%m-%d') + docker push qlik/go-build:1.18 + docker push qlik/go-build:1.18-$(date +'%Y-%m-%d') + if: github.ref == 'refs/heads/master' && github.repository == 'qlik-oss/dockerfiles' docker-build-node-build: name: docker build node-build runs-on: ubuntu-latest From 0c1e2c16d6d98734a6f5d83a00f529b5c3880dd5 Mon Sep 17 00:00:00 2001 From: Masaru Hoshi Date: Thu, 1 Jun 2023 13:43:24 -0400 Subject: [PATCH 6/8] fix bad yaml Signed-off-by: Masaru Hoshi --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8cc0e575..a697f546 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,8 @@ jobs: docker push qlik/go-build docker push qlik/go-build:$(date +'%Y-%m-%d') if: github.ref == 'refs/heads/master' && github.repository == 'qlik-oss/dockerfiles' - docker-build-go-build-1.18: name: docker build go-build-1.18 + docker-build-go-build-1.18: + name: docker build go-build-1.18 runs-on: ubuntu-latest env: DOCKER_BUILDKIT: "1" From 05fce1995a35be799782f3badf8d50477d50020b Mon Sep 17 00:00:00 2001 From: Masaru Hoshi Date: Thu, 1 Jun 2023 13:44:34 -0400 Subject: [PATCH 7/8] fix action name Signed-off-by: Masaru Hoshi --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a697f546..018d434d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: docker push qlik/go-build docker push qlik/go-build:$(date +'%Y-%m-%d') if: github.ref == 'refs/heads/master' && github.repository == 'qlik-oss/dockerfiles' - docker-build-go-build-1.18: + docker-build-go-build-1-18: name: docker build go-build-1.18 runs-on: ubuntu-latest env: From 2de1f43016d894fb461a7db3be7d165d22a0d3f7 Mon Sep 17 00:00:00 2001 From: Masaru Hoshi Date: Thu, 1 Jun 2023 14:46:39 -0400 Subject: [PATCH 8/8] bump glibc version Signed-off-by: Masaru Hoshi --- go-build-1.18/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-build-1.18/Dockerfile b/go-build-1.18/Dockerfile index ba6b3abd..d0e8942b 100644 --- a/go-build-1.18/Dockerfile +++ b/go-build-1.18/Dockerfile @@ -37,7 +37,7 @@ RUN apk add --no-cache \ libgcc \ build-base -ENV GLIBC=2.31-r0 +ENV GLIBC=2.35-r1 RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub