-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (32 loc) · 1 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Pull base image.
FROM node:16
ARG GHOST_VERSION=5.23.0
# Install sudo
RUN apt update && \
apt install sudo -y
# Set ghost install user.
RUN useradd ghost-user --home /ghost --password '' && \
usermod -aG sudo ghost-user
USER ghost-user
# Define working directory.
WORKDIR /ghost
# Install Ghost
RUN echo '' | sudo -S npm install ghost-cli@latest -g && \
ghost install "$GHOST_VERSION" --db=sqlite3 --no-prompt --no-stack --no-setup --no-start
# Install Google Drive Integration
RUN mkdir /ghost/versions/"$GHOST_VERSION"/content/adapters/storage && \
cd /ghost/versions/"$GHOST_VERSION"/content/adapters/storage && \
git clone https://github.com/robincsamuel/ghost-google-drive.git && \
cd ghost-google-drive && \
npm install
# Add files.
ADD start.bash /ghost-start
# Set environment variables.
ENV NODE_ENV development
ENV GHOST_VERSION $GHOST_VERSION
# Copy to override.
COPY ./data /ghost-override
#Set ghost-start user
USER root
# Define default command.
CMD ["bash", "/ghost-start"]