Added Dockerfile
This commit is contained in:
parent
50f7e9632e
commit
1b67fe284d
4 changed files with 33 additions and 10 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
FROM golang:1.23.3 AS builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download && go mod verify
|
||||
|
||||
COPY . .
|
||||
RUN make compile
|
||||
|
||||
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /usr/src/app/build/ /.
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
|
||||
WORKDIR /
|
||||
|
||||
ENV PORT=3000
|
||||
|
||||
CMD ["/hugo-cms"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue