local-server/Dockerfile

29 lines
854 B
Docker
Raw Normal View History

2018-11-13 03:44:15 +00:00
# ------------------------------------------------------------------------
from golang:1.11.2 as build
2018-06-19 06:49:34 +00:00
env pkg novit.nc/direktil/local-server
2018-11-13 03:44:15 +00:00
run go get github.com/gobuffalo/packr/packr
copy vendor /go/src/${pkg}/vendor
copy cmd /go/src/${pkg}/cmd
copy assets /go/src/${pkg}/cmd/dkl-local-server/assets
2018-06-19 06:49:34 +00:00
workdir /go/src/${pkg}
2018-11-13 03:44:15 +00:00
run packr -i /go/src/${pkg}/cmd/dkl-local-server \
2018-06-19 06:49:34 +00:00
&& go test ./... \
2018-11-13 03:44:15 +00:00
&& go install ./cmd/...
2018-06-19 06:49:34 +00:00
2018-11-13 03:44:15 +00:00
# ------------------------------------------------------------------------
from debian:stretch
entrypoint ["/bin/dkl-local-server"]
2018-06-19 06:49:34 +00:00
run apt-get update \
2018-11-13 03:44:15 +00:00
&& apt-get install -y genisoimage gdisk dosfstools util-linux udev \
&& apt-get clean
run yes |apt-get install -y grub2 grub-pc-bin grub-efi-amd64-bin \
2018-06-19 06:49:34 +00:00
&& apt-get clean
2018-11-13 03:44:15 +00:00
add scripts /scripts
add assets /assets
add efi-shim/ /shim
copy --from=build /go/bin/ /bin/