# Use the official Golang image with Alpine Linux FROM golang:1.20 # Set the current working directory inside the container WORKDIR /app # Copy go.mod and go.sum files to the container COPY go.mod ./ # Download Go modules RUN go mod download # Copy the rest of the application code to the container COPY . . # Build the Go application RUN go build -o main . # Expose port 8080 to the outside world EXPOSE 7860 # Run the Go application CMD ["./main"]