2018-12-25 13:39:28 +00:00
|
|
|
FROM node:10.14-jessie
|
2017-06-15 15:56:30 +00:00
|
|
|
|
2018-12-25 17:07:03 +00:00
|
|
|
RUN apt-get update && apt-get install -y pwgen netcat
|
|
|
|
|
2017-06-24 23:17:00 +00:00
|
|
|
# First install dependencies
|
2018-12-25 17:07:03 +00:00
|
|
|
COPY server/package.json /app/server/package.json
|
|
|
|
COPY client/package.json /app/client/package.json
|
|
|
|
COPY shared/package.json /app/shared/package.json
|
|
|
|
COPY zone-mta/package.json /app/zone-mta/package.json
|
2018-12-25 13:39:28 +00:00
|
|
|
|
2017-03-17 14:48:50 +00:00
|
|
|
WORKDIR /app/
|
2018-12-25 13:39:28 +00:00
|
|
|
|
|
|
|
RUN for idx in client shared server zone-mta; do (cd $idx && npm install); done
|
|
|
|
|
|
|
|
# Later, copy the app files. That improves development speed as buiding the Docker image will not have
|
2017-06-24 23:17:00 +00:00
|
|
|
# to download and install all the NPM dependencies every time there's a change in the source code
|
2018-12-25 17:07:03 +00:00
|
|
|
COPY . /app
|
2018-12-25 13:39:28 +00:00
|
|
|
|
|
|
|
RUN cd client && npm run build
|
|
|
|
|
2018-12-25 17:07:03 +00:00
|
|
|
EXPOSE 3000 3003 3004
|
|
|
|
ENTRYPOINT ["bash", "/app/docker-entrypoint.sh"]
|