2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2024-06-28 17:39:51 +00:00
d2vm/Dockerfile
Adphi 5b8cad6176
cli: improve flags and commands
docs: add README.md and examples
centos/rhel: fix dracut initramfs

Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
2022-04-21 18:28:50 +02:00

33 lines
574 B
Docker

FROM golang as builder
WORKDIR /d2vm
COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod download
COPY . .
RUN go build -o d2vm ./cmd/d2vm
FROM ubuntu
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \
util-linux \
kpartx \
e2fsprogs \
xfsprogs \
mount \
tar \
extlinux \
uuid-runtime \
qemu-utils
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
COPY --from=builder /d2vm/d2vm /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/d2vm"]