diff --git a/xy_sh/Dockerfile.go b/xy_sh/Dockerfile.go new file mode 100644 index 0000000..57524ee --- /dev/null +++ b/xy_sh/Dockerfile.go @@ -0,0 +1,15 @@ +dockerfile +FROM golang:1.23-alpine AS builder + +WORKDIR /app +COPY go.mod go.sum ./ +RUN go mod download +COPY . . +RUN CGO_ENABLED=0 GOOS=linux go build -o /server ./cmd/server + +FROM alpine:3.19 +RUN apk --no-cache add ca-certificates tzdata +WORKDIR /app +COPY --from=builder /server . +EXPOSE 8080 +CMD ["./server"] \ No newline at end of file