Files
htwkalender/backend/Dockerfile
2024-01-16 01:18:27 +01:00

19 lines
402 B
Docker

FROM golang:1.21.6
# 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=1 GOOS=linux go build -o /htwkalender
# Expose port 8080 to the outside world
EXPOSE 8080