Created
October 15, 2013 07:51
-
-
Save samof76/6988034 to your computer and use it in GitHub Desktop.
Dockerfile for creating ghost containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Which base image to build FROM? | |
FROM ubuntu | |
#What to RUN for the new build? | |
#Adding apt tools | |
RUN apt-get install -y python-software-properties | |
#Adding the nodejs ppa's | |
RUN add-apt-repository -y ppa:chris-lea/node.js | |
#001: Fixing broken dependencies. | |
#nodejs : Depends: rlwrap but it is not installable | |
#E: Unable to correct problems, you have held broken packages. | |
#Error build: The command [/bin/sh -c apt-get install -y nodejs unzip] returned a non-zero code: 100 | |
#The command [/bin/sh -c apt-get install -y nodejs unzip] returned a non-zero code: 100 | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list | |
#Update apt source repositories | |
RUN apt-get update -y | |
#Install nodejs and unzip | |
RUN apt-get install -y nodejs unzip | |
#Download ghost platform, extract and install | |
ADD https://en.ghost.org/zip/ghost-0.3.2.zip /opt/ghost-0.3.2.zip | |
RUN unzip /opt/ghost-0.3.2.zip -d /opt/ghost | |
RUN cd /opt/ghost && npm install --production | |
#Configure ghost to listen on all ports. | |
ADD https://gist.github.com/samof76/6987383/raw/3944ffae51de720e3ad5ef8f3a3e74d05bb9cdf5/config.js /opt/ghost/config.js | |
#Chage the working directory to ghost | |
WORKDIR /opt/ghost | |
#EXPOSE ghost to the outside world | |
EXPOSE 2368 | |
#Set ENTRYPONT to the container | |
ENTRYPOINT ["/usr/bin/npm","start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment