1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-18 14:21:32 +03:00
leon/Dockerfile

26 lines
606 B
Docker
Raw Normal View History

FROM node:14-alpine
ENV IS_DOCKER true
2019-02-12 16:25:02 +03:00
WORKDIR /app
2019-02-12 17:57:53 +03:00
# Install system packages
RUN apk add --no-cache --no-progress \
2019-02-12 17:57:53 +03:00
ca-certificates \
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 --no-cache-dir --progress-bar off pipenv
2019-02-12 16:25:02 +03:00
# Install Leon
# Need to explicitly run the npm preinstall and npm posinstall scripts (not needed with npm@7)
2019-02-23 16:27:28 +03:00
# because npm tries to downgrade its privileges, and these scripts are not executed
COPY ./package*.json ./
RUN npm clean-install
COPY ./ ./
2019-02-23 16:27:28 +03:00
RUN npm run preinstall
RUN npm run postinstall
2019-02-12 16:25:02 +03:00
RUN npm run build
2019-02-23 16:27:28 +03:00
CMD ["npm", "start"]