Files
htwkalender-pwa/backend/Dockerfile
2023-10-25 12:00:59 +02:00

19 lines
410 B
Docker

FROM golang:1.21.3-alpine
# Set the Current Working Directory inside the container
WORKDIR /app
# Copy go mod and sum files
COPY go.mod go.sum ./
RUN go mod download
# Copy the source from the current directory to the Working Directory inside the container
COPY *.go ./
COPY .. .
# Build the Go app
RUN CGO_ENABLED=0 GOOS=linux go build -o /htwkalender
# Expose port 8080 to the outside world
EXPOSE 8080