49 lines
1.5 KiB
Text
49 lines
1.5 KiB
Text
|
################################################################################
|
||
|
# adapted from https://github.com/bluesky-social/pds/blob/v0.4.74/Dockerfile
|
||
|
################################################################################
|
||
|
FROM node:20.11-bookworm-slim AS pds-build
|
||
|
|
||
|
RUN npm install -g pnpm && apt-get update && apt-get -y install unzip
|
||
|
|
||
|
# Download and extract the PDS archive
|
||
|
WORKDIR /app
|
||
|
ADD https://github.com/bluesky-social/pds/archive/refs/tags/v0.4.74.zip .
|
||
|
RUN unzip v0.4.74.zip && \
|
||
|
mv pds-0.4.74/service/** . && \
|
||
|
mv pds-0.4.74/pdsadmin.sh .
|
||
|
|
||
|
RUN pnpm install --prod=true --frozen-lockfile
|
||
|
|
||
|
################################################################################
|
||
|
# adapted from https://github.com/bluesky-social/pds/blob/v0.4.74/Dockerfile
|
||
|
################################################################################
|
||
|
FROM node:20.11-bookworm-slim
|
||
|
|
||
|
RUN apt-get update && apt-get install -y \
|
||
|
dumb-init \
|
||
|
ca-certificates \
|
||
|
curl \
|
||
|
gnupg \
|
||
|
jq \
|
||
|
lsb-release \
|
||
|
openssl \
|
||
|
sqlite3 \
|
||
|
bsdextrautils \
|
||
|
xxd
|
||
|
# bsdextrautils for `column` command in the accounts script
|
||
|
|
||
|
WORKDIR /app
|
||
|
COPY --from=pds-build /app /app
|
||
|
|
||
|
EXPOSE 3000
|
||
|
ENV PDS_PORT=3000
|
||
|
ENV NODE_ENV=production
|
||
|
# potential perf issues w/ io_uring on this version of node
|
||
|
ENV UV_USE_IO_URING=0
|
||
|
|
||
|
RUN userdel node
|
||
|
|
||
|
LABEL org.opencontainers.image.source="https://github.com/bluesky-social/pds"
|
||
|
LABEL org.opencontainers.image.description="AT Protocol PDS"
|
||
|
LABEL org.opencontainers.image.licenses="MIT"
|