Commit 6d4e6383 authored by Benjamin Bouvier's avatar Benjamin Bouvier
Browse files

Update the dockerfile (don't use root);

parent c74aed73
FROM node:6
MAINTAINER Benjamin Bouvier <>
# Weboob and its dependencies.
# Globally install Weboob and its dependencies.
RUN apt-get update && \
apt-get install -y git python python-setuptools python-dev libffi-dev \
libxml2-dev libxslt-dev libyaml-dev libtiff-dev libjpeg-dev zlib1g-dev \
libfreetype6-dev libwebp-dev build-essential gcc g++;
RUN git clone git:// /tmp/weboob
WORKDIR /tmp/weboob
RUN python ./ install
RUN git clone git:// /tmp/weboob \
&& cd /tmp/weboob \
&& python ./ install \
&& rm -rf /tmp/weboob
# Setup kresus layout.
RUN mkdir -p /usr/data
VOLUME /usr/data
RUN useradd -d /home/user -m -s /bin/bash -U user
USER user
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
RUN mkdir -p /home/user/data
VOLUME /home/user/data
RUN mkdir -p /home/user/app
WORKDIR /home/user/app
# Install app dependencies.
COPY package.json package.json
RUN npm install --production
# Copy source.
COPY build /usr/src/app/build
COPY bin /usr/src/app/bin
COPY build /home/user/app/build
COPY bin /home/user/app/bin
USER root
RUN chown user:user -R /home/user
USER user
# Run server.
ENV KRESUS_DIR /usr/data
ENV KRESUS_DIR /home/user/data
CMD bin/kresus.js
# Expose the port on which Kresus is running.
......@@ -15,13 +15,20 @@ If you like the work we're doing, consider making a donation!
## With Docker
### Run a pre-built image
docker run -p 9876:9876 -v /opt/kresus/data:/home/user/data -ti -d bnjbvr/kresus
### Build the image
There is a Dockerfile from which you can build and run Kresus, using the
following commands (don't forget to change the port mapping and the volume
mapping, if necessary!):
- `git clone && cd kresus`
- `docker build -t kresus .`
- `docker run -p 9876:9876 -v /tmp/kresus-data:/usr/data -ti -d kresus`
- `docker run -p 9876:9876 -v /opt/kresus/data:/home/user/data -ti -d kresus`
## Pre-requisites
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment