Files
passport/Dockerfile
Zoe 6ebe24ee62
Some checks failed
Build and Push Docker Image to GHCR / build-and-push (amd64, linux/amd64, ) (push) Successful in 1m23s
Build and Push Docker Image to GHCR / combine-manifests (push) Has been cancelled
Build and Push Docker Image to GHCR / build-and-push (arm64, linux/arm64, -arm64) (push) Has been cancelled
arm64 docker image builds
2025-10-01 00:08:13 -05:00

43 lines
1.0 KiB
Docker

FROM golang:1.25 AS builder
# build dependencies
RUN apt update && apt install -y upx
ARG TARGETARCH
RUN set -eux; \
echo "Building for architecture: ${TARGETARCH}"; \
case "${TARGETARCH}" in \
"amd64") \
arch_suffix='x64' ;; \
"arm64") \
arch_suffix='arm64' ;; \
*) \
echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
esac; \
curl -sLO "https://github.com/tailwindlabs/tailwindcss/releases/download/v4.1.13/tailwindcss-linux-${arch_suffix}"; \
mv "tailwindcss-linux-${arch_suffix}" /usr/local/bin/tailwindcss; \
chmod +x /usr/local/bin/tailwindcss;
RUN go install github.com/juls0730/zqdgr@latest
WORKDIR /app
ARG TARGETARCH
ENV CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH}
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN zqdgr build
RUN upx passport
# ---- Runtime Stage ----
FROM gcr.io/distroless/static-debian12 AS runner
WORKDIR /data
COPY --from=builder /app/passport /usr/local/bin/passport
EXPOSE 3000
CMD ["/usr/local/bin/passport"]