local-server/Dockerfile

31 lines
697 B
Docker
Raw Normal View History

2018-11-13 03:44:15 +00:00
# ------------------------------------------------------------------------
from golang:1.12.4-alpine as build
2019-03-19 03:57:41 +00:00
run apk add --update git
2019-03-06 06:27:40 +00:00
env CGO_ENABLED 0
2019-03-19 03:57:41 +00:00
arg GOPROXY
2018-11-13 03:44:15 +00:00
2019-03-19 03:57:41 +00:00
workdir /src
add go.sum go.mod ./
run go mod download
add . ./
run go test ./...
run 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
2019-04-12 16:17:49 +00:00
run apt-get install -y ca-certificates \
&& apt-get clean
2018-11-13 03:44:15 +00:00
copy --from=build /go/bin/ /bin/