Attempt at fixing docker build /cc @kiloreux

This commit is contained in:
Kevin van Zonneveld 2018-08-16 17:30:14 +02:00
parent 835b1bed07
commit 8367cb643e
2 changed files with 9 additions and 8 deletions

View file

@ -0,0 +1 @@
node_modules

View file

@ -1,21 +1,21 @@
FROM alpine:3.6
RUN apk add --update nodejs \
nodejs-npm
FROM node:8.11.4-alpine
COPY package.json /app/package.json
WORKDIR /app
RUN apk --update add --virtual native-dep \
# Install node_modules
# * to optionally copy lock files that _might_ _not_ exist
ADD package.json package-*.json yarn.* /tmp/
RUN cd /tmp && apk --update add --virtual native-dep \
make gcc g++ python libgcc libstdc++ && \
npm install && \
apk del native-dep
RUN mkdir -p /app && cd /app && ln -nfs /tmp/node_modules
RUN apk add bash
COPY . /app
ENV PATH "${PATH}:/app/node_modules/.bin"
RUN npm run build
CMD ["node","/app/lib/standalone/start-server.js"]
# This can be overwritten later
EXPOSE 3020
# This can be overruled later
EXPOSE 3020