:shale: Added Dockerfile
This commit is contained in:
parent
7f3019ed12
commit
ad79d0a724
|
@ -0,0 +1,28 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
# docker build --rm -f build/Dockerfile -t source.toby3d.me/toby3d/hub .
|
||||
|
||||
# Build
|
||||
FROM golang:alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOFLAGS=-mod=vendor
|
||||
|
||||
COPY go.mod go.sum *.go ./
|
||||
COPY internal ./internal/
|
||||
COPY vendor ./vendor/
|
||||
COPY web ./web/
|
||||
|
||||
RUN go build -o ./hub
|
||||
|
||||
# Run
|
||||
FROM scratch
|
||||
|
||||
WORKDIR /
|
||||
|
||||
COPY --from=builder /app/hub /hub
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["/hub"]
|
Loading…
Reference in New Issue