FROM golang:1.22.3-alpine as build WORKDIR /app COPY go.mod go.sum ./ RUN go mod download # Copy the rest of the application code to the working directory COPY . . RUN go build -o main . FROM alpine:latest WORKDIR /app COPY --from=build /app/main . EXPOSE 8080 CMD ["./main"]