2024-05-08 14:34:07 +00:00
|
|
|
FROM golang:1.22
|
|
|
|
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 go.sum ./
|
|
|
|
RUN go mod download && go mod verify
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
RUN go build
|
|
|
|
|
2024-05-08 13:57:36 +00:00
|
|
|
EXPOSE 8080:8080
|
|
|
|
|
|
|
|
# Copy the backend binary
|
|
|
|
COPY ./card-jong-be .
|
2024-05-08 14:34:07 +00:00
|
|
|
CMD ["card-jong-be"]
|