local-server/Dockerfile

26 lines
697 B
Docker
Raw Normal View History

2018-11-13 03:44:15 +00:00
# ------------------------------------------------------------------------
2019-03-06 06:27:40 +00:00
from golang:1.12.0 as build
env CGO_ENABLED 0
env pkg novit.nc/direktil/local-server
2018-11-13 03:44:15 +00:00
copy vendor /go/src/${pkg}/vendor
2019-01-21 22:44:11 +00:00
copy pkg /go/src/${pkg}/pkg
2018-11-13 03:44:15 +00:00
copy cmd /go/src/${pkg}/cmd
2018-06-19 06:49:34 +00:00
workdir /go/src/${pkg}
2018-12-10 10:59:24 +00:00
run 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
2019-02-14 00:24:14 +00:00
run yes |apt-get install -y grub2 grub-pc-bin grub-efi-amd64-bin \
&& apt-get clean
2018-11-13 03:44:15 +00:00
copy --from=build /go/bin/ /bin/