sha256:d98338fe513aff0e688e5cb85a34b6b14bc15853b80127dedb3b8be6a80a1933
OS/ARCH
Compressed size
136.48 MB
Last pushed
1 day by doijanky
Type
Image
Vulnerabilities
Manifest digest
sha256:a51d9562e87f74d76602118779362dc997d260f1e64e2f909fc8052fcc21845e
9
ENV GOSU_VERSION=1.19
0 B
10
RUN /bin/sh -c set -eux; apk add --no-cache --virtual .gosu-deps ca-certificates dpkg gnupg; dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; export GNUPGHOME="$(mktemp -d)"; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; gpgconf --kill all; rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; apk del --no-network .gosu-deps; chmod +x /usr/local/bin/gosu; gosu --version; gosu nobody true # buildkit
902.24 KB
11
RUN /bin/sh -c set -eux; deluser node; rm -rf /home/node; addgroup -g 1000 ghost; adduser -u 1000 -G ghost -h /home/ghost -s /bin/sh -H -D ghost # buildkit
933 B
12
ENV NODE_ENV=production
0 B
13
ENV GHOST_INSTALL=/home/ghost
0 B
14
ENV GHOST_CONTENT=/home/ghost/content
0 B
15
ENV GHOST_VERSION=6.64.0
0 B
16
ENV GHOST_TARBALL=https://github.com/TryGhost/Ghost/releases/download/v6.64.0/ghost-6.64.0.tgz
0 B
17
ENV GHOST_SHA256=7d9420128eeb2102339e326fd03fd17c581c91a26549a918fda717fe37d8fd4e
0 B
18
RUN /bin/sh -c set -eux; corepack enable; mkdir -p "$GHOST_INSTALL"; chown ghost:ghost "$GHOST_INSTALL"; cd "$GHOST_INSTALL"; export XDG_CACHE_HOME=/tmp/xdg-cache XDG_DATA_HOME=/tmp/xdg-data; gosu ghost wget -O ghost.tgz "$GHOST_TARBALL"; echo "$GHOST_SHA256 ghost.tgz" | sha256sum -c -; gosu ghost tar --extract --file ghost.tgz; rm ghost.tgz; gosu ghost pnpm install --prod --frozen-lockfile; gosu ghost rm -rf "$GHOST_INSTALL/components"; gosu ghost node scripts/prune.mts "$GHOST_INSTALL" --profile=image; gosu ghost ln -s config.production.json "$GHOST_INSTALL/config.development.json"; gosu ghost mv "$GHOST_INSTALL/content" "$GHOST_INSTALL/content.orig"; gosu ghost mkdir -p "$GHOST_INSTALL/content"; rm -rf /opt/yarn-*; rm -rf /tmp/xdg-cache /tmp/xdg-data; npm cache clean --force; node --version; gosu ghost node -e 'require("better-sqlite3"); if (!require("@tryghost/image-transform").canTransformFiles()) throw new Error("sharp not installed");' # buildkit
81.56 MB
19
COPY --chown=ghost:ghost config.production.json /home/ghost/ # buildkit
355 B
20
RUN /bin/sh -c set -eux; chmod 1777 "$GHOST_CONTENT"; cd "$GHOST_INSTALL"; node -e 'JSON.parse(require("fs").readFileSync("config.production.json"))'; [ "$(readlink -f config.development.json)" = "$GHOST_INSTALL/config.production.json" ] # buildkit
147 B
21
WORKDIR /home/ghost
32 B
22
VOLUME [/home/ghost/content]
0 B
23
COPY docker-entrypoint.sh /usr/local/bin/ # buildkit
1.83 KB
24
ENTRYPOINT ["docker-entrypoint.sh"]
0 B
25
EXPOSE map[2368/tcp:{}]
0 B
26
CMD ["node" "index.js"]
0 B