Skip to content

Commit

Permalink
Fix docker (#110)
Browse files Browse the repository at this point in the history
* fix docker release

* add docker build to ci
  • Loading branch information
yuval-k authored Oct 17, 2021
1 parent 51445a9 commit d0d97be
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
!main.go
!go.sum
!go.mod
!packer-builder-arm-image
!packer-plugin-arm-image
8 changes: 6 additions & 2 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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}
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 \
Expand All @@ -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 && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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 && \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d0d97be

Please sign in to comment.