1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-24 12:45:58 +03:00

cleaned Dockerfile

This commit is contained in:
Antoine Brossault 2019-02-12 14:57:53 +00:00
parent 90d0004884
commit 27e39a3bde
2 changed files with 13 additions and 36 deletions

View File

@ -1,46 +1,23 @@
FROM mhart/alpine-node:10
FROM node:10-alpine
WORKDIR /app
COPY . .
# Update & Install dependencies
RUN apk add --no-cache --update \
git \
bash \
libffi-dev \
openssl-dev \
bzip2-dev \
zlib-dev \
readline-dev \
sqlite-dev \
build-base
# Install system packages
RUN apk update --no-cache \
&& apk add --no-cache \
ca-certificates \
build-base \
python3 \
git
RUN apk add linux-headers
# Set Python version
ARG PYTHON_VERSION='3.6.0'
# Set pyenv home
ARG PYENV_HOME=/root/.pyenv
# Install pyenv, then install python versions
RUN git clone --depth 1 https://github.com/pyenv/pyenv.git $PYENV_HOME && \
rm -rfv $PYENV_HOME/.git
ENV PATH $PYENV_HOME/shims:$PYENV_HOME/bin:$PATH
RUN pyenv install $PYTHON_VERSION
RUN pyenv global $PYTHON_VERSION
RUN pip install --upgrade pip && pyenv rehash
# Clean
RUN rm -rf ~/.cache/pip
# Install missing dependencies
RUN pip install pipenv
RUN pipenv run pipenv install tinydb
# Upgrade pip and install Pipenv
RUN pip3 install --upgrade pip \
&& pip install pipenv
# Install Leon
RUN npm install
RUN npm run build
RUN npm run postinstall
# Let's run it
CMD ["npm", "run", "start"]

View File

@ -81,7 +81,7 @@ npm install
```sh
# build
npm run docker:builc
npm run docker:build
# run
npm run docker:run