Commit d61448d3 authored by Justin Tyberg's avatar Justin Tyberg

Remove singleuser builds.

Remove additional *-singleuser image builds in favor of including the
single-user startup scripts in the *-notebook images.

(c) Copyright IBM Corp. 2016
parent cf78782f
...@@ -13,9 +13,7 @@ ALL_STACKS:=minimal-kernel \ ...@@ -13,9 +13,7 @@ ALL_STACKS:=minimal-kernel \
pyspark-notebook \ pyspark-notebook \
all-spark-notebook all-spark-notebook
ALL_SINGLEUSERS:=$(shell echo $(ALL_STACKS) | sed "s/ /\n/g" | grep notebook | sed s/notebook/singleuser/g) ALL_IMAGES:=$(ALL_STACKS)
ALL_IMAGES:=$(ALL_STACKS) $(ALL_SINGLEUSERS)
GIT_MASTER_HEAD_SHA:=$(shell git rev-parse --short=12 --verify HEAD) GIT_MASTER_HEAD_SHA:=$(shell git rev-parse --short=12 --verify HEAD)
...@@ -30,9 +28,6 @@ help: ...@@ -30,9 +28,6 @@ help:
build/%: DARGS?= build/%: DARGS?=
build/%-singleuser: build/%-notebook
./internal/build-singleuser $(OWNER)/$*-notebook $(OWNER)/$*-singleuser
build/%: build/%:
docker build $(DARGS) --rm --force-rm -t $(OWNER)/$(notdir $@):latest ./$(notdir $@) docker build $(DARGS) --rm --force-rm -t $(OWNER)/$(notdir $@):latest ./$(notdir $@)
......
#!/usr/bin/env bash
# Build a singleuser image for JupyterHub from a given stack
# Usage:
# ./build-singleuser jupyter/scipy-notebook my-singleuser-image
set -e
V="0.2.0"
# get dockerspawner
if [[ ! -d dockerspawner ]]; then
tgz="dockerspawner.tar.gz"
wget -N https://github.com/jupyter/dockerspawner/archive/$V.tar.gz -O $tgz
echo "8af14608ad30df4dfcced7c7be508d336d485d9c31af965dc84c5e882e19dfe4 *$tgz" | shasum -a 256 -c - || (echo "shasum mismatch $(shasum -a 256 $tgz)" && exit -1)
tar -xzf $tgz
mv dockerspawner-$V dockerspawner
fi
base="$1"
name="$2"
if [[ -z "$base" || -z "$name" ]]; then
echo "Usage: build-singleuser [base image] [destination image]" >&2
exit 1
fi
echo "building $name from $base"
singleuser=dockerspawner/singleuser
# copy single-user stack
sed -i "s@^FROM.*\$@FROM $base@" "$singleuser/Dockerfile"
docker build -t "$name" "$singleuser"
echo "built $name"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment