2022-04-19 12:01:08 +00:00
|
|
|
FROM golang as builder
|
|
|
|
|
|
|
|
WORKDIR /d2vm
|
|
|
|
|
|
|
|
COPY go.mod go.mod
|
|
|
|
COPY go.sum go.sum
|
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2022-04-21 19:15:39 +00:00
|
|
|
RUN make build
|
2022-04-19 12:01:08 +00:00
|
|
|
|
|
|
|
FROM ubuntu
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
|
|
|
|
util-linux \
|
2022-04-24 14:57:11 +00:00
|
|
|
udev \
|
2022-04-24 14:48:21 +00:00
|
|
|
parted \
|
2022-04-19 12:01:08 +00:00
|
|
|
e2fsprogs \
|
|
|
|
mount \
|
|
|
|
tar \
|
|
|
|
extlinux \
|
|
|
|
qemu-utils
|
|
|
|
|
|
|
|
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
|
|
|
|
|
|
|
|
COPY --from=builder /d2vm/d2vm /usr/local/bin/
|
2022-04-21 16:28:50 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/d2vm"]
|