sha256:c0673631aca6c654c9d0da647908b222be04e1af50949c8a5647b8ff5dc25d35
OS/ARCH
Compressed size
160.88 MB
Last pushed
15 days by doijanky
Type
Image
Vulnerabilities
Manifest digest
sha256:5460059c4d2bbed8d44a83c4d5fbffee8b278e1875ce9f668675554ca44d51a4
9
ENV GOSU_VERSION=1.19
0 B
10
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends ca-certificates gnupg wget; 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; apt-mark auto '.*' > /dev/null; [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; rm -rf /var/lib/apt/lists/*; chmod +x /usr/local/bin/gosu; gosu --version; gosu nobody true # buildkit
1.2 MB
11
RUN /bin/sh -c set -eux; deluser node; rm -rf /home/node; groupadd --gid 1000 ghost; useradd --uid 1000 --gid 1000 --home-dir /home/ghost --no-create-home --shell /bin/bash ghost # buildkit
1.25 KB
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; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends ca-certificates wget g++ make python3 ; 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; apt-mark auto '.*' > /dev/null; [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; apt-mark manual ca-certificates > /dev/null; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; rm -rf /var/lib/apt/lists/*; node --version; gosu ghost node -e 'require("better-sqlite3"); if (!require("@tryghost/image-transform").canTransformFiles()) throw new Error("sharp not installed");' # buildkit
87.6 MB
19
COPY --chown=ghost:ghost config.production.json /home/ghost/ # buildkit
353 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