simple-go-action/Dockerfile

14 lines
288 B
Docker
Raw Normal View History

2024-08-13 10:44:42 +08:00
# 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"]