14 lines
288 B
Docker
14 lines
288 B
Docker
# Use an official Go runtime as the base image
|
|
FROM golang:1.21
|
|
|
|
# Set the working directory inside the container
|
|
WORKDIR /app
|
|
|
|
# Copy the source code into the container
|
|
COPY . .
|
|
|
|
# Build the Go application
|
|
RUN go build -o app
|
|
|
|
# Set the entry point for the container
|
|
ENTRYPOINT ["./app"] |