2019-07-29 16:21:35 -04:00
|
|
|
FROM node:10.16.0-alpine
|
2018-07-19 14:57:07 -04:00
|
|
|
|
2018-07-19 19:20:43 -04:00
|
|
|
LABEL maintainer="Andreas Peters <support@aventer.biz>"
|
|
|
|
#Upstream URL: https://git.aventer.biz/AVENTER/docker-matrix-dimension
|
|
|
|
|
2018-09-16 04:25:05 -04:00
|
|
|
RUN apk add dos2unix --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community/ --allow-untrusted
|
|
|
|
|
2018-07-19 14:57:07 -04:00
|
|
|
RUN apk update && \
|
2018-09-16 04:25:05 -04:00
|
|
|
apk add --no-cache bash gcc python make g++ sqlite && \
|
2018-07-19 14:57:07 -04:00
|
|
|
mkdir /home/node/.npm-global && \
|
|
|
|
mkdir -p /home/node/app
|
|
|
|
|
|
|
|
COPY ./docker-entrypoint.sh /
|
|
|
|
COPY . /home/node/matrix-dimension
|
|
|
|
|
|
|
|
|
|
|
|
RUN chown -R node:node /home/node/app && \
|
|
|
|
chown -R node:node /home/node/.npm-global && \
|
|
|
|
chown -R node:node /home/node/matrix-dimension
|
|
|
|
|
|
|
|
USER node
|
|
|
|
|
|
|
|
ENV PATH=/home/node/.npm-global/bin:$PATH
|
|
|
|
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
|
|
|
|
|
|
|
|
RUN cd /home/node/matrix-dimension && \
|
2020-04-18 02:08:48 -04:00
|
|
|
npm install -D wd rimraf webpack webpack-command sqlite3 pg pg-hstore && \
|
2018-07-19 14:57:07 -04:00
|
|
|
NODE_ENV=production npm run-script build:web && npm run-script build:app
|
|
|
|
|
|
|
|
USER root
|
|
|
|
|
2018-07-19 17:21:37 -04:00
|
|
|
RUN apk del gcc make g++ && \
|
2018-07-19 14:57:07 -04:00
|
|
|
rm /home/node/matrix-dimension/Dockerfile && \
|
2018-09-16 04:25:05 -04:00
|
|
|
rm /home/node/matrix-dimension/docker-entrypoint.sh && \
|
|
|
|
dos2unix /docker-entrypoint.sh
|
2018-07-19 14:57:07 -04:00
|
|
|
|
|
|
|
USER node
|
|
|
|
|
|
|
|
VOLUME ["/data"]
|
|
|
|
|
2018-07-21 11:20:47 -04:00
|
|
|
# Ensure the database doesn't get lost to the container
|
|
|
|
ENV DIMENSION_DB_PATH=/data/dimension.db
|
|
|
|
|
2018-07-19 14:57:07 -04:00
|
|
|
EXPOSE 8184
|
|
|
|
#CMD ["/bin/sh"]
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
|