Skip to content

Instantly share code, notes, and snippets.

@ecin
Created February 12, 2014 10:21
Show Gist options
  • Save ecin/8952987 to your computer and use it in GitHub Desktop.
Save ecin/8952987 to your computer and use it in GitHub Desktop.
Dockerfile for Ghost
FROM centos
MAINTAINER ecin <ecin@copypastel.com>
RUN yum -y update
RUN yum -y groupinstall "Development Tools"
# Install Node
RUN curl -LO https://github.com/joyent/node/archive/v0.10.25.zip
RUN unzip v0.10.25.zip
RUN cd node-0.10.25 && ./configure && make install
# Install Ghost
RUN curl -LO https://ghost.org/zip/ghost-0.4.1.zip
RUN unzip ghost-0.4.1.zip -d ghost
RUN cd ghost && npm install --production
# Install supervisor
RUN npm install -g forever
# Run Ghost
EXPOSE 2368
ENV NODE_ENV production
ENV GHOST_CONFIG /tmp/config/ghost.js
CMD ["/usr/local/bin/forever", "-f", "start", "ghost/index.js"]
@ecin
Copy link
Author

ecin commented Feb 12, 2014

Runs with:

docker run -p 80:2368 -v /home/core/config:/tmp/config <container_id>

Expects a Ghost config file to be mounted on /tmp/config/ghost.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment