facilmap/Dockerfile

30 wiersze
1.4 KiB
Docker
Czysty Zwykły widok Historia

2016-12-27 15:13:32 +00:00
FROM node:7.3-alpine
2016-10-18 13:24:02 +00:00
MAINTAINER Candid Dauth <cdauth@cdauth.eu>
CMD yarn run server
2016-10-18 13:24:02 +00:00
EXPOSE 8080
2016-12-27 15:13:32 +00:00
RUN apk update && apk add git
2017-02-26 21:00:13 +00:00
RUN npm install -g yarn@0.18.1
2017-02-26 21:00:13 +00:00
RUN adduser -D -h /opt/facilmap -s /bin/bash facilmap
2016-12-27 15:13:32 +00:00
2017-02-26 21:00:13 +00:00
WORKDIR /opt/facilmap/server
2016-10-18 13:24:02 +00:00
2017-02-26 21:00:13 +00:00
COPY ./ ../
2016-10-18 13:24:02 +00:00
2017-02-26 21:00:13 +00:00
RUN mkdir -p node_modules ../client/node_modules ../frontend/node_modules ../client/build ../frontend/build ../.cache ../.config ../.yarn && \
touch yarn-error.log ../client/yarn-error.log ../frontend/yarn-error.log && \
chown facilmap:facilmap node_modules ../client/node_modules ../frontend/node_modules ../client/build ../frontend/build ../.cache ../.config ../.yarn yarn-error.log ../client/yarn-error.log ../frontend/yarn-error.log yarn.lock ../frontend/yarn.lock ../client/yarn.lock package.json ../frontend/package.json ../client/package.json
USER facilmap
RUN cd ../client && yarn run deps && yarn build && yarn link && \
cd ../frontend && yarn run deps && yarn link facilmap-client && yarn run build && yarn link && \
cd ../server && yarn run deps && yarn link facilmap-client facilmap-frontend && yarn add mysql pg sqlite3 tedious
2016-10-18 13:24:02 +00:00
USER root
2017-02-26 21:00:13 +00:00
RUN chown -R root:root node_modules ../client/node_modules ../frontend/node_modules ../client/build ../frontend/build ../.cache ../.config ../.yarn yarn-error.log ../client/yarn-error.log ../frontend/yarn-error.log yarn.lock ../frontend/yarn.lock ../client/yarn.lock package.json ../frontend/package.json ../client/package.json
2016-10-18 13:24:02 +00:00
2016-12-27 15:13:32 +00:00
USER facilmap