mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-12 04:23:04 +02:00
add ghost-arm
This commit is contained in:
parent
872daf2a3a
commit
ddb9307873
32
ghost/arm/Dockerfile
Normal file
32
ghost/arm/Dockerfile
Normal file
@ -0,0 +1,32 @@
|
||||
#
|
||||
# Dockerfile for ghost-arm
|
||||
#
|
||||
|
||||
FROM vimagick/alpine-arm:edge
|
||||
MAINTAINER kev <noreply@datageek.info>
|
||||
|
||||
ENV GHOST_VERSION 0.7.2
|
||||
ENV GHOST_URL https://github.com/TryGhost/Ghost/archive/$GHOST_VERSION.tar.gz
|
||||
ENV GHOST_SOURCE /usr/src/ghost
|
||||
ENV GHOST_CONTENT /var/lib/ghost
|
||||
|
||||
WORKDIR $GHOST_SRC
|
||||
VOLUME $GHOST_CONTENT
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add -U bash \
|
||||
nodejs \
|
||||
&& apk add -t TMP build-base \
|
||||
curl \
|
||||
python \
|
||||
tar \
|
||||
&& curl -sSL $GHOST_URL | tar xz --strip 1 \
|
||||
&& npm install --production \
|
||||
&& apk del TMP \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
COPY docker-entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
EXPOSE 2368
|
||||
CMD ["npm", "start"]
|
5
ghost/arm/docker-compose.yml
Normal file
5
ghost/arm/docker-compose.yml
Normal file
@ -0,0 +1,5 @@
|
||||
ghost:
|
||||
image: vimagick/ghost-arm
|
||||
ports:
|
||||
- "2368:2368"
|
||||
restart: always
|
25
ghost/arm/docker-entrypoint.sh
Normal file
25
ghost/arm/docker-entrypoint.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ "$*" == npm*start* ]]; then
|
||||
for dir in "$GHOST_SOURCE/content"/*/; do
|
||||
targetDir="$GHOST_CONTENT/$(basename "$dir")"
|
||||
mkdir -p "$targetDir"
|
||||
if [ -z "$(ls -A "$targetDir")" ]; then
|
||||
tar -c --one-file-system -C "$dir" . | tar xC "$targetDir"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ! -e "$GHOST_CONTENT/config.js" ]; then
|
||||
sed -r '
|
||||
s/127\.0\.0\.1/0.0.0.0/g;
|
||||
s!path.join\(__dirname, (.)/content!path.join(process.env.GHOST_CONTENT, \1!g;
|
||||
' "$GHOST_SOURCE/config.example.js" > "$GHOST_CONTENT/config.js"
|
||||
fi
|
||||
|
||||
ln -sf "$GHOST_CONTENT/config.js" "$GHOST_SOURCE/config.js"
|
||||
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
exec "$@"
|
@ -48,6 +48,7 @@ $ docker-compose build data
|
||||
$ docker-compose up -d data
|
||||
$ docker cp ngrokd_data_1:/ngrok .
|
||||
$ docker-compose rm -v data
|
||||
$ docker rmi ngrokd_data
|
||||
|
||||
$ docker-compose up -d service
|
||||
$ docker-compose logs service
|
||||
|
Loading…
Reference in New Issue
Block a user