Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jan
kresus
Commits
6d4e6383
Commit
6d4e6383
authored
Sep 11, 2016
by
Benjamin Bouvier
Browse files
Update the dockerfile (don't use root);
parent
c74aed73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
6d4e6383
FROM
node:6
MAINTAINER
Benjamin Bouvier <public@benj.me>
# 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://git.symlink.me/pub/weboob/devel.git /tmp/weboob
WORKDIR
/tmp/weboob
RUN
python ./setup.py
install
RUN
git clone git://git.symlink.me/pub/weboob/devel.git /tmp/weboob
\
&&
cd
/tmp/weboob
\
&&
python ./setup.py
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
HOST 0.0.0.0
ENV
KRESUS_DIR /usr/data
ENV
KRESUS_DIR
/home
/us
e
r/data
CMD
bin/kresus.js
# Expose the port on which Kresus is running.
...
...
README.md
View file @
6d4e6383
...
...
@@ -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 https://framagit.org/bnjbvr/kresus && 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/
us
e
r/data -ti -d kresus`
## Pre-requisites
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment