generated from nathanwoodburn/go-webserver-template
Initial commit
This commit is contained in:
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM golang:1.21
|
||||
|
||||
# Set destination for COPY
|
||||
WORKDIR /app
|
||||
|
||||
COPY main.go ./
|
||||
COPY go.mod ./
|
||||
COPY go.sum ./
|
||||
COPY templates ./templates/
|
||||
RUN go get
|
||||
RUN go build main.go
|
||||
EXPOSE 3000
|
||||
|
||||
# Run
|
||||
CMD ["./main"]
|
||||
Reference in New Issue
Block a user