2024-06-17 15:53:53 +10:00
|
|
|
# syntax=docker/dockerfile:1
|
2024-06-20 21:18:56 +10:00
|
|
|
FROM golang:1.21
|
2024-06-17 15:53:53 +10:00
|
|
|
|
|
|
|
# Set destination for COPY
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY main.go ./
|
2024-06-20 21:03:47 +10:00
|
|
|
COPY go.mod ./
|
|
|
|
COPY go.sum ./
|
2024-06-17 15:53:53 +10:00
|
|
|
COPY templates ./templates/
|
2024-06-20 20:48:52 +10:00
|
|
|
RUN go get
|
2024-06-17 15:53:53 +10:00
|
|
|
RUN go build main.go
|
|
|
|
EXPOSE 3000
|
|
|
|
|
|
|
|
# Run
|
2024-06-20 20:48:52 +10:00
|
|
|
CMD ["./main"]
|