gohttpserver/docker/Dockerfile.armhf

17 lines
553 B
Text
Raw Permalink Normal View History

2018-09-17 14:34:55 +02:00
FROM golang:1.10
2017-12-21 07:22:56 +01:00
WORKDIR /go/src/github.com/codeskyblue/gohttpserver
ADD . /go/src/github.com/codeskyblue/gohttpserver/
2018-09-17 14:34:55 +02:00
RUN go get -v
2018-09-26 10:10:27 +02:00
RUN GOOS=linux GOARCH=arm go build -ldflags '-X main.VERSION=docker' -o gohttpserver .
2017-12-21 07:22:56 +01:00
2018-09-26 07:52:24 +02:00
FROM multiarch/debian-debootstrap:armhf-stretch
2017-12-21 07:22:56 +01:00
WORKDIR /app
RUN mkdir -p /app/public
2018-09-17 15:44:45 +02:00
RUN apt-get update && apt-get install -y ca-certificates
2017-12-21 07:22:56 +01:00
VOLUME /app/public
2018-09-17 14:34:55 +02:00
ADD assets ./assets
2018-09-17 14:35:25 +02:00
COPY --from=0 /go/src/github.com/codeskyblue/gohttpserver/gohttpserver .
2017-12-21 07:22:56 +01:00
EXPOSE 8000
2018-09-26 07:52:24 +02:00
ENTRYPOINT [ "/app/gohttpserver", "--root=/app/public" ]
CMD []