Add docker
This commit is contained in:
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM golang:1.23.3 as build
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the source code
|
||||
COPY . .
|
||||
|
||||
# Build the Go application
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o meeting .
|
||||
|
||||
# Stage 2: Final stage
|
||||
FROM alpine:edge
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the binary from the build stage
|
||||
COPY --from=build /app/meeting .
|
||||
COPY static static
|
||||
|
||||
# Set the timezone and install CA certificates
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
|
||||
# Set the entrypoint command
|
||||
ENTRYPOINT ["/app/meeting"]
|
||||
Reference in New Issue
Block a user