Something went wrong. Try again.
Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client
Something went wrong. Try again.
witchsky.app Dockerfile.embedr
2.0 kB · 89 lines
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990## Stage 1: build the embed bundle with pnpm.## Uses the official pnpm image. Node is auto-downloaded by pnpm using the# `devEngines.runtime` field in package.json (onFail: "download").#FROM ghcr.io/pnpm/pnpm:11 AS web-build
WORKDIR /app/bskyembed
ENV DEBIAN_FRONTEND=noninteractive
## pnpm config#ENV CI=1# use the pnpm version specified in package.jsonENV pnpm_config_pm_on_fail=download
COPY bskyembed ./COPY bskyweb /app/bskywebCOPY scripts/post-embed-build.js /app/scripts/post-embed-build.js
## Generate the embed bundle. NOTE: this will change#RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ pnpm install --frozen-lockfile --ignore-scripts && \ pnpm build && \ pnpm build-snippet && \ node_modules/.bin/node ../scripts/post-embed-build.js
## Stage 2: build the embedr Go binary, embedding the assets from stage 1.#FROM golang:1.26.10-bookworm AS go-build
WORKDIR /usr/src/social-app
ENV GODEBUG="netdns=go"ENV GOOS="linux"ARG TARGETARCHENV GOARCH=${TARGETARCH:-amd64}ENV CGO_ENABLED=1ENV GOEXPERIMENT="loopvar"
COPY --from=web-build /app/bskyweb ./bskyweb
# hack around issue with empty directory and go:embedRUN touch \ bskyweb/static/js/empty.txt \ bskyweb/static/css/empty.txt \ bskyweb/static/media/empty.txt
RUN cd bskyweb/ && \ go mod download && \ go mod verify
RUN cd bskyweb/ && \ go build \ -v \ -trimpath \ -tags timetzdata \ -o /embedr \ ./cmd/embedr
## Stage 3: runtime image.#FROM debian:bookworm-slim
ENV GODEBUG=netdns=goENV TZ=Etc/UTCENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --yes \ dumb-init \ ca-certificates
ENTRYPOINT ["dumb-init", "--"]
WORKDIR /embedrCOPY --from=go-build /embedr /usr/bin/embedr
CMD ["/usr/bin/embedr"]
LABEL org.opencontainers.image.source=https://github.com/bluesky-social/social-appLABEL org.opencontainers.image.description="embed.bsky.app Web App"LABEL org.opencontainers.image.licenses=MIT