mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-07-16 09:38:49 +02:00
19 lines
410 B
Docker
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
|