sha256:6c3399d75ad194915a8b17d39f928a9754938712d1968d973ca154b4194fd4d1
OS/ARCH
Compressed size
136.87 MB
Last pushed
17 days by doijanky
Type
Image
Vulnerabilities
Manifest digest
sha256:47ed99c7eb407db8cfccd8c39e8f0da7489973b4270ad54de619d9df2b97c042
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
854.21 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
934 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.62.0
0 B
16
ENV GHOST_TARBALL=https://github.com/TryGhost/Ghost/releases/download/v6.62.0/ghost-6.62.0.tgz
0 B
17
ENV GHOST_SHA256=3f81079d07e2f6fd0365fbc0846b134c12b202dc5fe62b3252cb6ee34fa5c9e3
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
84.55 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
148 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