-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM mhart/alpine-node:latest
MAINTAINER Achim Weßling <[email protected]>
LABEL version = 1.0.1 \
description = "JINGO Wiki running on an Alpine based Docker image"
ENV NODE_ENV production
ENV GIT_USER user.name
ENV GIT_MAIL [email protected]
RUN apk update && apk upgrade && \
apk add --no-cache git && \
git config --global user.name ${GIT_USER} && git config --global user.email ${GIT_MAIL} && \
git clone https://github.com/claudioc/jingo.git /app && \
mkdir /app/data && cd /app/data && git init && \
cd .. && npm install && \
mkdir /app/data/conf && ./jingo -s > data/conf/config.yaml && \
sed -i -e "s|repository: ''|repository: '/app/data'|g" data/conf/config.yaml && \
rm -rf /usr/share/man /tmp/* /var/cache/apk/* \
/root/.npm /root/.node-gyp /root/.gnupg /usr/lib/node_modules/npm/man \
/usr/lib/node_modules/npm/doc /usr/lib/node_modules/npm/html /usr/lib/node_modules/npm/scripts \
/app/test && \
npm cache clean --force
WORKDIR /app
VOLUME /app/data
ENTRYPOINT ["./jingo", "-c", "data/conf/config.yaml"]