FROM golang:latest # Set the current working directory inside the container WORKDIR /app # Copy go.mod and go.sum files to the workspace COPY go.mod go.sum ./ # Download all dependencies RUN go mod download # Copy the source from the current directory to the workspace COPY . . # Build the Go app RUN go build -o main server/main.go # Expose port 4000 to the outside world EXPOSE 4000 # Run the app ENTRYPOINT ["./main"]