From f61dd1db616b468bb8a27c2bfbeeaac2c9d2ba10 Mon Sep 17 00:00:00 2001 From: Yuvi Panda Date: Wed, 6 Dec 2017 21:18:35 -0500 Subject: [PATCH 1/2] Specify --no-cache-dir for pip install This reduces image size by not caching wheel files. Those are useful when you have a persistent $HOME, but useless (and bloaty) when done inside a Dockerfile --- components/jupyterhub/docker/Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/components/jupyterhub/docker/Dockerfile b/components/jupyterhub/docker/Dockerfile index 602c8cca9cb..d05041bad5d 100644 --- a/components/jupyterhub/docker/Dockerfile +++ b/components/jupyterhub/docker/Dockerfile @@ -21,10 +21,11 @@ RUN npm install -g configurable-http-proxy && \ pip3 install --upgrade pip && \ pip3 install --upgrade setuptools && \ pip3 install --upgrade disttools && \ - pip3 install jupyterhub-dummyauthenticator && \ - pip3 install oauthenticator && \ - pip3 install notebook && \ - pip3 install jupyterhub==0.8.1 && \ - pip3 install jupyterhub-kubespawner==0.7.1 + pip3 install --no-cache-dir \ + notebook \ + jupyterhub==0.8.1 \ + jupyterhub-kubespawner==0.7.1 \ + jupyterhub-dummyauthenticator \ + oauthenticator ENTRYPOINT jupyterhub From d51d726f4d9e768ec2f4d5d5663a48c39939d746 Mon Sep 17 00:00:00 2001 From: Yuvi Panda Date: Wed, 6 Dec 2017 21:20:24 -0500 Subject: [PATCH 2/2] Upgrade Python version to 3.6 This removes the extra pip3 upgrades --- components/jupyterhub/docker/Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/jupyterhub/docker/Dockerfile b/components/jupyterhub/docker/Dockerfile index d05041bad5d..aaa8b681561 100644 --- a/components/jupyterhub/docker/Dockerfile +++ b/components/jupyterhub/docker/Dockerfile @@ -12,15 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM python:3.5 +FROM python:3.6 RUN apt-get update && \ apt-get install -y npm nodejs-legacy RUN npm install -g configurable-http-proxy && \ - pip3 install --upgrade pip && \ - pip3 install --upgrade setuptools && \ - pip3 install --upgrade disttools && \ pip3 install --no-cache-dir \ notebook \ jupyterhub==0.8.1 \