From e832059526ac83f43abc0428392d86e5e1710f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 28 Mar 2018 16:27:35 +0200 Subject: [PATCH] Migrate baseimage to debian from ubuntu --- Dockerfile | 26 ++++---------------------- supervisor/supervisord.conf | 2 +- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index eead35b..80a804a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/supervisor/supervisord.conf b/supervisor/supervisord.conf index 72803d2..4a14c2b 100644 --- a/supervisor/supervisord.conf +++ b/supervisor/supervisord.conf @@ -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