2019-02-12 17:57:53 +03:00
|
|
|
FROM node:10-alpine
|
2019-02-12 16:25:02 +03:00
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
|
2019-02-12 17:57:53 +03:00
|
|
|
# Install system packages
|
2019-03-09 12:46:39 +03:00
|
|
|
RUN apk add --no-cache \
|
2019-02-12 17:57:53 +03:00
|
|
|
ca-certificates \
|
|
|
|
build-base \
|
|
|
|
python3 \
|
2019-02-23 16:27:28 +03:00
|
|
|
git \
|
|
|
|
tzdata
|
2019-02-12 16:25:02 +03:00
|
|
|
|
2019-02-12 17:57:53 +03:00
|
|
|
# Upgrade pip and install Pipenv
|
|
|
|
RUN pip3 install --upgrade pip \
|
|
|
|
&& pip install pipenv
|
2019-02-12 16:25:02 +03:00
|
|
|
|
|
|
|
# Install Leon
|
2019-02-23 16:27:28 +03:00
|
|
|
# Need to explicitly run the npm preinstall and npm posinstall scripts
|
|
|
|
# because npm tries to downgrade its privileges, and these scripts are not executed
|
|
|
|
RUN npm run preinstall
|
2019-02-12 16:25:02 +03:00
|
|
|
RUN npm install
|
2019-02-23 16:27:28 +03:00
|
|
|
RUN npm run postinstall
|
2019-02-12 16:25:02 +03:00
|
|
|
RUN npm run build
|
2019-02-19 11:19:37 +03:00
|
|
|
|
2019-02-23 16:27:28 +03:00
|
|
|
# Let's run it
|
|
|
|
CMD ["npm", "start"]
|