# Use an official Golang runtime as a base image FROM golang:1.17 # Set the working directory inside the container WORKDIR /go/src/app # Copy the local package files to the container's workspace COPY . . # Build the Go application RUN go build -o main . # Expose port 7860 to the outside world EXPOSE 7860 # Command to run the executable CMD ["./main"]