From d317e8f6df0e0e16445db606da1d683a6b35f531 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Tue, 30 Dec 2025 19:33:39 +0300 Subject: =?UTF-8?q?=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B9?= =?UTF-8?q?=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B8=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..77d54d6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS builder + +ARG TARGETPLATFORM +ARG BUILDPLATFORM + +RUN apk add --no-cache git + +WORKDIR /app + +COPY . . + +RUN CGO_ENABLED=0 GOOS=$(echo $TARGETPLATFORM | cut -d'/' -f1) \ + GOARCH=$(echo $TARGETPLATFORM | cut -d'/' -f2) \ + GOARM=$(echo $TARGETPLATFORM | cut -d'/' -f3 | sed 's/v//' || echo "7") \ + go build \ + -trimpath \ + -ldflags="-s -w -X main.version=$(git describe --tags --always --dirty 2>/dev/null || echo 'dev')" \ + -o /app ./cmd/... + +FROM scratch + +LABEL maintainer="neonxp" \ + description="qChat - quick ssh chat" \ + version="1.0" + +COPY --from=builder /app /app + +ENV TZ=Europe/Moscow + +EXPOSE 1337 -- cgit v1.2.3