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