Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download default-vmlinux.bin before COPY #234

Merged
merged 1 commit into from
Jul 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,19 @@ RUN apt-get update && apt-get install --yes --no-install-recommends \
libdevmapper-dev \
libseccomp-dev

RUN mkdir -p /var/lib/firecracker-containerd/runtime \
&& curl --silent --show-error --retry 3 --max-time 30 --output default-vmlinux.bin \
"https://s3.amazonaws.com/spec.ccfc.min/img/hello/kernel/hello-vmlinux.bin" \
&& echo "882fa465c43ab7d92e31bd4167da3ad6a82cb9230f9b0016176df597c6014cef default-vmlinux.bin" | sha256sum -c - \
&& mv default-vmlinux.bin /var/lib/firecracker-containerd/runtime/default-vmlinux.bin

COPY --from=firecracker-containerd-build /home/builder/firecracker-containerd /firecracker-containerd
COPY --from=firecracker-build /output/* /usr/local/bin/
COPY --from=firecracker-vm-root-builder /output/vm.ext4 /var/lib/firecracker-containerd/runtime/default-rootfs.img
COPY --from=firecracker-containerd-build /output/* /usr/local/bin/
COPY _submodules/runc/runc /usr/local/bin
COPY tools/docker/firecracker-runtime.json /etc/containerd/firecracker-runtime.json

RUN curl --silent --show-error --retry 3 --max-time 30 --output default-vmlinux.bin \
"https://s3.amazonaws.com/spec.ccfc.min/img/hello/kernel/hello-vmlinux.bin" \
&& echo "882fa465c43ab7d92e31bd4167da3ad6a82cb9230f9b0016176df597c6014cef default-vmlinux.bin" | sha256sum -c - \
&& mv default-vmlinux.bin /var/lib/firecracker-containerd/runtime/default-vmlinux.bin

RUN --mount=type=cache,from=build-base,source=/home/builder/go/pkg/mod,target=/tmp/go/pkg/mod,readonly \
mkdir -p ${GOPATH}/pkg/mod \
&& cp -R /tmp/go/pkg/mod/* ${GOPATH}/pkg/mod \
Expand Down