Migrate baseimage to debian from ubuntu

This commit is contained in:
Kristóf Tóth 2018-03-28 16:27:35 +02:00
parent 43c46a7af2
commit e832059526
2 changed files with 5 additions and 23 deletions

View File

@ -1,4 +1,4 @@
FROM avatao/ubuntu:16.04
FROM avatao/debian:buster
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - &&\
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - &&\
@ -10,30 +10,12 @@ RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
supervisor \
libzmq5 \
nginx \
gettext-base \
libbz2-dev \
libreadline-dev \
libsqlite3-dev &&\
gettext-base &&\
rm -rf /var/lib/apt/lists/*
USER ${AVATAO_USER}
WORKDIR /home/${AVATAO_USER}
COPY .pyenvrc .
COPY requirements.txt /tmp
ARG PYTHON_VERSION="3.6.4"
ARG PYENV_INSTALLER_URL="https://raw.githubusercontent.com/pyenv/pyenv-installer/78cfd4d/bin/pyenv-installer"
ARG PYENV_INSTALLER_HASH=9509348b828f0564358fff456f7f693dd9ace351dc3f240854d7685ad8a8e1dd
RUN curl -fSL -o pyenv-installer ${PYENV_INSTALLER_URL} &&\
echo "${PYENV_INSTALLER_HASH} *pyenv-installer" | sha256sum -c - &&\
bash pyenv-installer &&\
rm pyenv-installer &&\
echo "source $HOME/.pyenvrc" >> .bashrc &&\
. $HOME/.pyenvrc &&\
pyenv install ${PYTHON_VERSION} &&\
pyenv global ${PYTHON_VERSION} &&\
pip install -r /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt
USER root
ENV TFW_PUBLIC_PORT=8888 \
TFW_WEB_PORT=4242 \
TFW_LOGIN_APP_PORT=6666 \
@ -87,4 +69,4 @@ ONBUILD RUN test -z "${NOFRONTEND}" && cd /data && yarn install --frozen-lockfil
ONBUILD RUN test -z "${NOFRONTEND}" && cd /data && yarn build --no-progress || :
ONBUILD RUN test -z "${NOFRONTEND}" && mv /data/dist ${TFW_FRONTEND_DIR} && rm -rf /data || :
CMD . "$HOME/.pyenvrc" && exec supervisord --nodaemon
CMD exec supervisord --nodaemon

View File

@ -20,7 +20,7 @@ autorestart=true
[program:app]
directory=%(ENV_TFW_APP_DIR)s
command=env python app.py
command=python3 app.py
[include]
files=%(ENV_TFW_SUPERVISORD_COMPONENTS)s/*.conf