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:
parent
90d0004884
commit
27e39a3bde
47
Dockerfile
47
Dockerfile
@ -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"]
|
||||
|
Loading…
Reference in New Issue
Block a user