mirror of
https://github.com/hamburghammer/gohttpserver.git
synced 2024-12-22 06:47:39 +01:00
14 lines
408 B
Docker
14 lines
408 B
Docker
FROM docker.io/golang:1.16 AS build
|
|
WORKDIR /app/gohttpserver
|
|
ADD . /app/gohttpserver
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-X main.VERSION=docker' -o gohttpserver
|
|
|
|
FROM docker.io/alpine:latest
|
|
RUN mkdir -p /app/public
|
|
VOLUME /app/public
|
|
WORKDIR /app
|
|
ADD assets ./assets
|
|
COPY --from=build /app/gohttpserver/gohttpserver .
|
|
EXPOSE 8000
|
|
ENTRYPOINT [ "/app/gohttpserver", "--root=/app/public" ]
|
|
CMD []
|