21 lines
609 B
Docker
21 lines
609 B
Docker
# ------------------------------------------------------------------------
|
|
from golang:1.21.3-bullseye as build
|
|
workdir /src
|
|
copy go.mod go.sum ./
|
|
run go mod download
|
|
copy . ./
|
|
run go test ./...
|
|
run hack/build ./...
|
|
|
|
# ------------------------------------------------------------------------
|
|
from debian:bullseye
|
|
entrypoint ["/bin/dkl-local-server"]
|
|
|
|
env _uncache 1
|
|
run apt-get update \
|
|
&& yes |apt-get install -y genisoimage gdisk dosfstools util-linux udev binutils systemd \
|
|
grub2 grub-pc-bin grub-efi-amd64-bin ca-certificates curl openssh-client \
|
|
&& apt-get clean
|
|
|
|
copy --from=build /src/dist/ /bin/
|