added dockerfile
This commit is contained in:
parent
9912389ea7
commit
f55717de17
|
@ -0,0 +1,13 @@
|
||||||
|
FROM golang:1.20-alpine
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change
|
||||||
|
COPY go.mod index-inlined-minified.html main.go ./
|
||||||
|
RUN go mod download && go mod verify
|
||||||
|
|
||||||
|
RUN go build -v -o /usr/local/bin/app ./...
|
||||||
|
|
||||||
|
ENV PORT=8000
|
||||||
|
ENV BIND=0.0.0.0
|
||||||
|
|
||||||
|
CMD ["app"]
|
Loading…
Reference in New Issue