1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-11-28 12:43:35 +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 WORKDIR /app
COPY . . COPY . .
# Update & Install dependencies # Install system packages
RUN apk add --no-cache --update \ RUN apk update --no-cache \
git \ && apk add --no-cache \
bash \ ca-certificates \
libffi-dev \ build-base \
openssl-dev \ python3 \
bzip2-dev \ git
zlib-dev \
readline-dev \
sqlite-dev \
build-base
RUN apk add linux-headers # Upgrade pip and install Pipenv
RUN pip3 install --upgrade pip \
# Set Python version && pip install pipenv
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
# Install Leon # Install Leon
RUN npm install RUN npm install
RUN npm run build RUN npm run build
RUN npm run postinstall
# Let's run it # Let's run it
CMD ["npm", "run", "start"] CMD ["npm", "run", "start"]

View File

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