update Dockerfile to use hack/build
This commit is contained in:
parent
f7b708ce4b
commit
81d8065421
@ -1,4 +1,3 @@
|
|||||||
Dockerfile
|
Dockerfile
|
||||||
.git
|
|
||||||
tmp
|
tmp
|
||||||
dist
|
dist
|
||||||
|
20
Dockerfile
20
Dockerfile
@ -1,5 +1,12 @@
|
|||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
from mcluseau/golang-builder:1.20.4 as build
|
from golang:1.21.3-bullseye as build
|
||||||
|
run apt-get update && apt-get install -y git
|
||||||
|
workdir /src
|
||||||
|
copy go.mod go.sum ./
|
||||||
|
run go mod download
|
||||||
|
copy . ./
|
||||||
|
run go test ./...
|
||||||
|
run hack/build ./...
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
from debian:bullseye
|
from debian:bullseye
|
||||||
@ -7,13 +14,8 @@ entrypoint ["/bin/dkl-local-server"]
|
|||||||
|
|
||||||
env _uncache 1
|
env _uncache 1
|
||||||
run apt-get update \
|
run apt-get update \
|
||||||
&& apt-get install -y genisoimage gdisk dosfstools util-linux udev binutils systemd \
|
&& 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
|
&& apt-get clean
|
||||||
|
|
||||||
run yes |apt-get install -y grub2 grub-pc-bin grub-efi-amd64-bin \
|
copy --from=build /src/dist/ /bin/
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
run apt-get install -y ca-certificates curl openssh-client \
|
|
||||||
&& apt-get clean
|
|
||||||
|
|
||||||
copy --from=build /go/bin/ /bin/
|
|
||||||
|
Loading…
Reference in New Issue
Block a user