Files
htwkalender-pwa/backend/Dockerfile

19 lines
410 B
Docker

FROM golang:1.20.5-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