FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS builder ARG TARGETPLATFORM ARG BUILDPLATFORM RUN apk add --no-cache tzdata 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 /usr/share/zoneinfo /usr/share/zoneinfo COPY --from=builder /app /app ENV TZ=Europe/Moscow EXPOSE 1337