habitica/Dockerfile

46 lines
1 KiB
Text
Raw Normal View History

2014-08-05 15:58:01 +00:00
FROM ubuntu:trusty
2015-12-09 21:23:47 +00:00
MAINTAINER Sabe Jones <sabe@habitica.com>
2014-08-05 15:58:01 +00:00
2015-12-09 21:23:47 +00:00
# Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start.
RUN echo -e '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d
2014-08-05 15:58:01 +00:00
2015-12-09 21:23:47 +00:00
# Install prerequisites
2014-08-05 15:58:01 +00:00
RUN apt-get update
2015-12-09 21:23:47 +00:00
RUN apt-get install -y \
build-essential \
curl \
git \
2016-02-24 05:22:31 +00:00
libfontconfig1 \
libfreetype6 \
2015-12-09 21:23:47 +00:00
libkrb5-dev \
python
# Install NodeJS
RUN curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
2015-12-09 21:23:47 +00:00
RUN apt-get install -y nodejs
# Install npm@latest
RUN curl -sL https://www.npmjs.org/install.sh | sh
2015-12-09 21:23:47 +00:00
# Clean up package management
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*
# Install global packages
RUN npm install -g gulp grunt-cli bower mocha
2015-12-09 21:23:47 +00:00
# Clone Habitica repo and install dependencies
WORKDIR /habitrpg
RUN git clone https://github.com/HabitRPG/habitica.git /habitrpg
RUN npm install
RUN bower install --allow-root
2015-12-09 21:23:47 +00:00
# Create environment config file and build directory
RUN cp config.json.example config.json
RUN mkdir -p ./website/build
2015-12-09 21:23:47 +00:00
# Start Habitica
EXPOSE 3000
CMD ["npm", "start"]