From c400d2fbb00bced5a88b12947f7f765d43844a68 Mon Sep 17 00:00:00 2001 From: kreuzer <t.kreuzer@fz-juelich.de> Date: Tue, 29 Mar 2022 11:30:27 +0200 Subject: [PATCH] use ubuntu instead of jhub base image --- venv/Dockerfile | 29 ++++++++++++++++++++++++++--- venv/requirements_apt.txt | 12 ++++++++++++ venv/requirements_pip.txt | 3 +++ 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 venv/requirements_apt.txt create mode 100644 venv/requirements_pip.txt diff --git a/venv/Dockerfile b/venv/Dockerfile index ea84c16..2ceb1a0 100644 --- a/venv/Dockerfile +++ b/venv/Dockerfile @@ -1,4 +1,27 @@ -FROM jupyter/base-notebook:hub-2.1.1 -USER root +FROM ubuntu:focal-20220316 + ENV DEBIAN_FRONTEND noninteractive -RUN apt update && apt remove -y curl libcurl4 librtmp1 && apt autoremove -y && apt install -y curl + +ENV USERNAME=jovyan + +# create the app user +RUN adduser --uid 1000 --ingroup users --gecos "" --disabled-password ${USERNAME} + +RUN apt update && \ + apt -y upgrade && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* + +COPY requirements_apt.txt /tmp/requirements_apt.txt +COPY requirements_pip.txt /tmp/requirements_pip.txt + +RUN apt update && \ + cat /tmp/requirements_apt.txt | xargs apt install -yq && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* && \ + pip install -r /tmp/requirements_pip.txt && \ + chown -R ${USERNAME}:users ${HOME} && \ + rm /tmp/requirements_pip.txt && \ + rm /tmp/requirements_apt.txt + +USER jovyan diff --git a/venv/requirements_apt.txt b/venv/requirements_apt.txt new file mode 100644 index 0000000..cf9dd0c --- /dev/null +++ b/venv/requirements_apt.txt @@ -0,0 +1,12 @@ +bash +ca-certificates +curl +python3 +python3-pip +libc6 +libstdc++6 +rsync +tar +uuid-runtime +vim +wget diff --git a/venv/requirements_pip.txt b/venv/requirements_pip.txt new file mode 100644 index 0000000..e59ce0d --- /dev/null +++ b/venv/requirements_pip.txt @@ -0,0 +1,3 @@ +jupyterhub==2.1.1 + +jupyterlab -- GitLab