Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
Added Docker file for building Cyphesis.
Browse files Browse the repository at this point in the history
This uses Hammer to build and run Cyphesis.
  • Loading branch information
erikogenvik committed Apr 15, 2015
1 parent 21bf3b9 commit 896e4e0
Showing 1 changed file with 31 additions and 13 deletions.
44 changes: 31 additions & 13 deletions Dockerfile
@@ -1,30 +1,48 @@
# Start with ubuntu 14.04 image
FROM ubuntu:14.04
MAINTAINER Erik Ogenvik <erik@ogenvik.org>

# Bring the image up to date and install software
RUN sudo apt-get update -y
RUN sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
RUN sudo DEBIAN_FRONTEND=noninteractive apt-get install -y automake \
autoconf g++ libboost-all-dev libgcrypt20-dev pkg-config git \
RUN apt-get update -y
RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y automake \
autoconf g++ libboost-all-dev libgcrypt-dev pkg-config git \
libtool make libsigc++-2.0-dev libbullet-dev libavahi-core-dev \
libavahi-compat-libdnssd-dev libpq-dev libreadline-dev \
libncurses5-dev postgresql bash
libncurses5-dev postgresql bash libcurl4-openssl-dev \
curl rsync

#Setup user for building; we don't want to use root for that
RUN groupadd -r worldforge && useradd -m -g worldforge worldforge

#Setup Postgres
RUN service postgresql start && \
sudo -u postgres createuser -D -A worldforge && \
sudo -u postgres createdb -O worldforge cyphesis && \
service postgresql stop


#Use hammer to install cyphesis
RUN git clone https://github.com/worldforge/hammer
RUN cd hammer
USER worldforge

RUN mkdir -p /home/worldforge/hammer
WORKDIR /home/worldforge/hammer

RUN git clone https://github.com/worldforge/hammer .
RUN bash hammer.sh checkout libs
RUN bash hammer.sh build libs
RUN bash hammer.sh checkout cyphesis
RUN bash hammer.sh build libs
RUN bash hammer.sh build cyphesis
RUN bash hammer.sh checkout worlds
RUN bash hammer.sh build worlds


#Setup Postgres
RUN sudo -u postgres createuser -D -A ubuntu
RUN sudo -u postgres createdb -O ubuntu cyphesis
VOLUME /home/worldforge/hammer/work

#Run cyphesis
CMD cyphesis
USER root
CMD service postgresql start && sudo -u worldforge ./work/local/bin/cyphesis

#Open port 6767 for cyphesis
EXPOSE 6767
#Open port 6780 for cyphesis http server
EXPOSE 6780

0 comments on commit 896e4e0

Please sign in to comment.