From d0d97be7113feb4b2cb671f396a439eb25dd72d9 Mon Sep 17 00:00:00 2001 From: Yuval Kohavi Date: Sun, 17 Oct 2021 18:04:08 -0400 Subject: [PATCH] Fix docker (#110) * fix docker release * add docker build to ci --- .dockerignore | 2 +- .github/workflows/pull_request.yaml | 8 ++++++-- Dockerfile | 6 +++--- Dockerfile.release | 4 ++-- README.md | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.dockerignore b/.dockerignore index 9923e4fb..0c703559 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,4 +7,4 @@ !main.go !go.sum !go.mod -!packer-builder-arm-image \ No newline at end of file +!packer-plugin-arm-image \ No newline at end of file diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 6a6c24c62..b50ad5c8 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -43,6 +43,10 @@ jobs: - name: Test run: | go test ./... + - name: docker + run: | + docker build . + docker build -f Dockerfile.release . - name: Artifact packer-plugin-arm-image uses: actions/upload-artifact@v1 with: @@ -97,5 +101,5 @@ jobs: run: | docker login quay.io --username "solo-io+solobot" --password $QUAY_IO_PASSWORD chmod +x packer-plugin-arm-image - docker build -t quay.io/solo-io/packer-plugin-arm-image:${TAGGED_VERSION} -f Dockerfile.release . - docker push quay.io/solo-io/packer-plugin-arm-image:${TAGGED_VERSION} + docker build -t quay.io/solo-io/packer-builder-arm-image:${TAGGED_VERSION} -f Dockerfile.release . + docker push quay.io/solo-io/packer-builder-arm-image:${TAGGED_VERSION} diff --git a/Dockerfile b/Dockerfile index 52063b4f..0eb78e1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:buster AS builder +FROM docker.io/library/golang:buster AS builder RUN apt-get update -qq \ && apt-get install -qqy git && \ mkdir /build @@ -16,7 +16,7 @@ COPY . . RUN go build -o packer-plugin-arm-image -FROM ubuntu:focal +FROM docker.io/library/ubuntu:focal RUN apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qqy \ @@ -28,7 +28,7 @@ RUN apt-get update -qq \ sudo \ && rm -rf /var/lib/apt/lists/* -ENV PACKER_VERSION 1.6.0 +ENV PACKER_VERSION 1.7.6 RUN wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip -O /tmp/packer.zip && \ unzip /tmp/packer.zip -d /bin && \ diff --git a/Dockerfile.release b/Dockerfile.release index 7ca851b5..907e911e 100644 --- a/Dockerfile.release +++ b/Dockerfile.release @@ -1,4 +1,4 @@ -FROM ubuntu:focal +FROM docker.io/library/ubuntu:focal RUN apt-get update -qq \ && DEBIAN_FRONTEND=noninteractive apt-get install -qqy \ @@ -10,7 +10,7 @@ RUN apt-get update -qq \ sudo \ && rm -rf /var/lib/apt/lists/* -ENV PACKER_VERSION 1.6.0 +ENV PACKER_VERSION 1.7.6 RUN wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip -O /tmp/packer.zip && \ unzip /tmp/packer.zip -d /bin && \ diff --git a/README.md b/README.md index 2e7e3e36..c275f2bb 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The plugin runs the provisioners in a chroot environment. Binary execution is d ## Dependencies: This builder uses the following shell commands: -- `kpartx` - mapping the partitons to mountable devices +- `kpartx` - mapping the partitions to mountable devices - `qemu-user-static` - Executing arm binaries To install the needed binaries on derivatives of the Debian Linux variant: