1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-18 22:31:32 +03:00
leon/Dockerfile
Sandro Jäckel 0b812777f7
Don't upgrade pip, optimize pip3 install, remove build-base
Don't cache packages for smaller final image
Don't show progress bar for better CI integration
Move COPY to better utilize cache
2019-05-11 16:24:27 +02:00

26 lines
547 B
Docker

FROM node:10-alpine
WORKDIR /app
# Install system packages
RUN apk add --no-cache --no-progress \
ca-certificates \
python3 \
git \
tzdata
# Upgrade pip and install Pipenv
RUN pip3 install --no-cache-dir --progress-bar off pipenv
COPY . .
# Install Leon
# 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
RUN npm install
RUN npm run postinstall
RUN npm run build
# Let's run it
CMD ["npm", "start"]