Skip to content

Commit

Permalink
better docker file caching; added a note about pushed image
Browse files Browse the repository at this point in the history
  • Loading branch information
yuval-k committed Jan 30, 2020
1 parent 230f097 commit 0138f6b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ RUN go build -o packer-builder-arm-image

FROM ubuntu:eoan

COPY --from=builder /build/packer-builder-arm-image /bin/packer-builder-arm-image
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -qqy \
qemu-user-static \
Expand All @@ -37,4 +36,6 @@ RUN wget https://github.com/hashicorp/packer/releases/download/nightly/packer_li
rm /tmp/packer.zip
WORKDIR /build
COPY entrypoint.sh /entrypoint.sh

COPY --from=builder /build/packer-builder-arm-image /bin/packer-builder-arm-image
ENTRYPOINT ["/entrypoint.sh"]
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,23 @@ docker build -t packer-builder-arm .
docker run \
--rm \
--privileged \
-v ${PWD}:/build \
-v ${PWD}:/build:ro \
-v ${PWD}/packer_cache:/build/packer_cache \
-v ${PWD}/output:/build/output \
-v ${PWD}/output-arm-image:/build/output-arm-image \
packer-builder-arm build samples/raspbian_golang.json
```

Alternativly, you can use the `docker.pkg.github.com/solo-io/packer-builder-arm-image/packer-builder-arm` that's built off latest master:
```
docker run \
--rm \
--privileged \
-v ${PWD}:/build:ro \
-v ${PWD}/packer_cache:/build/packer_cache \
-v ${PWD}/output-arm-image:/build/output-arm-image \
docker.pkg.github.com/solo-io/packer-builder-arm-image/packer-builder-arm build samples/raspbian_golang.json
```

- Flashing your image

Follow the examples in the **Flashing** section of this document.
Expand Down

0 comments on commit 0138f6b

Please sign in to comment.