This repository has been archived by the owner on Dec 3, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Docker file for building Cyphesis.
This uses Hammer to build and run Cyphesis.
- Loading branch information
1 parent
21bf3b9
commit 896e4e0
Showing
1 changed file
with
31 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |