Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
Jupyter Docker Stacks
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Jupyter Docker Stacks
Commits
3923ac62
Commit
3923ac62
authored
Jun 17, 2020
by
Peter Parente
Committed by
GitHub
Jun 17, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into asalikhov/ubuntu_focal
parents
d16063e6
dd2087c7
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
89 additions
and
83 deletions
+89
-83
.hadolint.yaml
.hadolint.yaml
+1
-0
.readthedocs.yml
.readthedocs.yml
+1
-0
.travis.yml
.travis.yml
+27
-25
base-notebook/start-notebook.sh
base-notebook/start-notebook.sh
+5
-5
base-notebook/start-singleuser.sh
base-notebook/start-singleuser.sh
+8
-8
examples/docker-compose/bin/letsencrypt.sh
examples/docker-compose/bin/letsencrypt.sh
+20
-20
examples/docker-compose/bin/sl-dns.sh
examples/docker-compose/bin/sl-dns.sh
+2
-2
examples/docker-compose/notebook/letsencrypt-notebook.yml
examples/docker-compose/notebook/letsencrypt-notebook.yml
+3
-2
examples/docker-compose/notebook/notebook.yml
examples/docker-compose/notebook/notebook.yml
+2
-1
examples/docker-compose/notebook/secure-notebook.yml
examples/docker-compose/notebook/secure-notebook.yml
+2
-1
examples/docker-compose/notebook/up.sh
examples/docker-compose/notebook/up.sh
+18
-19
No files found.
.hadolint.yaml
View file @
3923ac62
---
ignored
:
ignored
:
-
DL3006
-
DL3006
-
DL3008
-
DL3008
.readthedocs.yml
View file @
3923ac62
---
# .readthedocs.yml
# .readthedocs.yml
# Read the Docs configuration file
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
...
...
.travis.yml
View file @
3923ac62
---
dist
:
bionic
dist
:
bionic
language
:
python
language
:
python
python
:
python
:
-
3.7
-
3.7
sudo
:
required
sudo
:
required
services
:
services
:
-
docker
-
docker
jobs
:
jobs
:
include
:
include
:
-
stage
:
diff-test
-
stage
:
diff-test
install
:
install
:
-
pip install --upgrade pip
-
pip install --upgrade pip
-
make dev-env
-
make dev-env
-
make lint-install
-
make lint-install
script
:
script
:
-
set -e
-
set -e
-
if [ $(make n-docs-diff) -ne 0 ]; then make docs; fi;
-
if [ $(make n-docs-diff) -ne 0 ]; then make docs; fi;
-
if [ $(make n-other-diff) -ne 0 ]; then make lint-build-test-all DARGS="--build-arg TEST_ONLY_BUILD=1"; fi;
-
if [ $(make n-other-diff) -ne 0 ]; then make lint-build-test-all DARGS="--build-arg TEST_ONLY_BUILD=1"; fi;
-
stage
:
push-tx
-
stage
:
push-tx
install
:
install
:
-
pip install --upgrade pip
-
pip install --upgrade pip
-
make dev-env
-
make dev-env
script
:
script
:
-
if [ $(make n-docs-diff DIFF_RANGE=$TRAVIS_COMMIT_RANGE) -ne 0 ]; then make tx-en; fi;
-
if [ $(make n-docs-diff DIFF_RANGE=$TRAVIS_COMMIT_RANGE) -ne 0 ]; then make tx-en; fi;
-
stage
:
full-test
-
stage
:
full-test
install
:
install
:
-
pip install --upgrade pip
-
pip install --upgrade pip
-
make dev-env
-
make dev-env
-
make lint-install
-
make lint-install
script
:
script
:
-
set -e
-
set -e
-
make docs
-
make docs
-
make lint-build-test-all DARGS="--build-arg TEST_ONLY_BUILD=1"
-
make lint-build-test-all DARGS="--build-arg TEST_ONLY_BUILD=1"
stages
:
stages
:
-
name
:
diff-test
-
name
:
diff-test
if
:
type = pull_request
if
:
type = pull_request
-
name
:
push-tx
-
name
:
push-tx
if
:
type = push AND branch = master
if
:
type = push AND branch = master
-
name
:
full-test
-
name
:
full-test
if
:
type = cron AND branch = master
if
:
type = cron AND branch = master
env
:
env
:
global
:
global
:
# yamllint disable-line
secure
:
JDQKgB1laaenzmEGI9gduwK/iS0030qsl62njJg3jib0R8wxBi2OeetEdoGl9m4NFsqqnp0OO7nm4rzGfuwjL1A38flSlXOTxhjm/hvo3vmnqVu5lDcdk9+IRkafnfd3Dyd86tLxRVETOqZwCLmdNkB2fmQII8du5IIqbJuUGp8DrG7kVMf3NBr9rjkZRfByQrgG4s1NXuT61VvpWMPJAOhcrImuHBheVJDEV0U3n6Xavd7Wo+pAHrHU8exvYTZ1IzZMbHc6K0iC/NpCHcH9+9DAeLDk/q1aDNqbTExnQevOHZzNqgHC2qFOlN4jfy/TLYLpLXtUismneBBqVSK3iZso3Vqy2BRXWgouI+Tt+08ffocy9XPwEzSwkgPgDlFVUikPOy5imwjpDb13RMIyMY4CKlSOdQx2rH2kPkZ0MJJPcki3KGuGl3qRvqyblMn+lZvjAu6WVLZfo7EtcxsQ0ZZxbAbGoUVl27FHg+UvIfC0I3wEcZIp7oED47Q8s0MdCijD3AwkRPvx/iyp3J0A42su7kkOooFcmUItEIqegQJ4Aki1FBv2i5vHmBobClktytZceLsKvzCeLjMpL9HcUVfUaJDKRwtUYIozpYeBnac+E6J1s6glcqLrXIHWez8N6SzokBa6SPqdtODdzzk5OJupByub6CYWsRXvxIQ7/wI=
secure
:
JDQKgB1laaenzmEGI9gduwK/iS0030qsl62njJg3jib0R8wxBi2OeetEdoGl9m4NFsqqnp0OO7nm4rzGfuwjL1A38flSlXOTxhjm/hvo3vmnqVu5lDcdk9+IRkafnfd3Dyd86tLxRVETOqZwCLmdNkB2fmQII8du5IIqbJuUGp8DrG7kVMf3NBr9rjkZRfByQrgG4s1NXuT61VvpWMPJAOhcrImuHBheVJDEV0U3n6Xavd7Wo+pAHrHU8exvYTZ1IzZMbHc6K0iC/NpCHcH9+9DAeLDk/q1aDNqbTExnQevOHZzNqgHC2qFOlN4jfy/TLYLpLXtUismneBBqVSK3iZso3Vqy2BRXWgouI+Tt+08ffocy9XPwEzSwkgPgDlFVUikPOy5imwjpDb13RMIyMY4CKlSOdQx2rH2kPkZ0MJJPcki3KGuGl3qRvqyblMn+lZvjAu6WVLZfo7EtcxsQ0ZZxbAbGoUVl27FHg+UvIfC0I3wEcZIp7oED47Q8s0MdCijD3AwkRPvx/iyp3J0A42su7kkOooFcmUItEIqegQJ4Aki1FBv2i5vHmBobClktytZceLsKvzCeLjMpL9HcUVfUaJDKRwtUYIozpYeBnac+E6J1s6glcqLrXIHWez8N6SzokBa6SPqdtODdzzk5OJupByub6CYWsRXvxIQ7/wI=
base-notebook/start-notebook.sh
View file @
3923ac62
...
@@ -6,14 +6,14 @@ set -e
...
@@ -6,14 +6,14 @@ set -e
wrapper
=
""
wrapper
=
""
if
[[
"
${
RESTARTABLE
}
"
==
"yes"
]]
;
then
if
[[
"
${
RESTARTABLE
}
"
==
"yes"
]]
;
then
wrapper
=
"run-one-constantly"
wrapper
=
"run-one-constantly"
fi
fi
if
[[
!
-z
"
${
JUPYTERHUB_API_TOKEN
}
"
]]
;
then
if
[[
!
-z
"
${
JUPYTERHUB_API_TOKEN
}
"
]]
;
then
# launched by JupyterHub, use single-user entrypoint
# launched by JupyterHub, use single-user entrypoint
exec
/usr/local/bin/start-singleuser.sh
"
$@
"
exec
/usr/local/bin/start-singleuser.sh
"
$@
"
elif
[[
!
-z
"
${
JUPYTER_ENABLE_LAB
}
"
]]
;
then
elif
[[
!
-z
"
${
JUPYTER_ENABLE_LAB
}
"
]]
;
then
.
/usr/local/bin/start.sh
$wrapper
jupyter lab
"
$@
"
.
/usr/local/bin/start.sh
$wrapper
jupyter lab
"
$@
"
else
else
.
/usr/local/bin/start.sh
$wrapper
jupyter notebook
"
$@
"
.
/usr/local/bin/start.sh
$wrapper
jupyter notebook
"
$@
"
fi
fi
base-notebook/start-singleuser.sh
View file @
3923ac62
...
@@ -6,7 +6,7 @@ set -e
...
@@ -6,7 +6,7 @@ set -e
# set default ip to 0.0.0.0
# set default ip to 0.0.0.0
if
[[
"
$NOTEBOOK_ARGS
$@
"
!=
*
"--ip="
*
]]
;
then
if
[[
"
$NOTEBOOK_ARGS
$@
"
!=
*
"--ip="
*
]]
;
then
NOTEBOOK_ARGS
=
"--ip=0.0.0.0
$NOTEBOOK_ARGS
"
NOTEBOOK_ARGS
=
"--ip=0.0.0.0
$NOTEBOOK_ARGS
"
fi
fi
# handle some deprecated environment variables
# handle some deprecated environment variables
...
@@ -14,25 +14,25 @@ fi
...
@@ -14,25 +14,25 @@ fi
# These won't be passed from DockerSpawner 0.9,
# These won't be passed from DockerSpawner 0.9,
# so avoid specifying --arg=empty-string
# so avoid specifying --arg=empty-string
if
[
!
-z
"
$NOTEBOOK_DIR
"
]
;
then
if
[
!
-z
"
$NOTEBOOK_DIR
"
]
;
then
NOTEBOOK_ARGS
=
"--notebook-dir='
$NOTEBOOK_DIR
'
$NOTEBOOK_ARGS
"
NOTEBOOK_ARGS
=
"--notebook-dir='
$NOTEBOOK_DIR
'
$NOTEBOOK_ARGS
"
fi
fi
if
[
!
-z
"
$JPY_PORT
"
]
;
then
if
[
!
-z
"
$JPY_PORT
"
]
;
then
NOTEBOOK_ARGS
=
"--port=
$JPY_PORT
$NOTEBOOK_ARGS
"
NOTEBOOK_ARGS
=
"--port=
$JPY_PORT
$NOTEBOOK_ARGS
"
fi
fi
if
[
!
-z
"
$JPY_USER
"
]
;
then
if
[
!
-z
"
$JPY_USER
"
]
;
then
NOTEBOOK_ARGS
=
"--user=
$JPY_USER
$NOTEBOOK_ARGS
"
NOTEBOOK_ARGS
=
"--user=
$JPY_USER
$NOTEBOOK_ARGS
"
fi
fi
if
[
!
-z
"
$JPY_COOKIE_NAME
"
]
;
then
if
[
!
-z
"
$JPY_COOKIE_NAME
"
]
;
then
NOTEBOOK_ARGS
=
"--cookie-name=
$JPY_COOKIE_NAME
$NOTEBOOK_ARGS
"
NOTEBOOK_ARGS
=
"--cookie-name=
$JPY_COOKIE_NAME
$NOTEBOOK_ARGS
"
fi
fi
if
[
!
-z
"
$JPY_BASE_URL
"
]
;
then
if
[
!
-z
"
$JPY_BASE_URL
"
]
;
then
NOTEBOOK_ARGS
=
"--base-url=
$JPY_BASE_URL
$NOTEBOOK_ARGS
"
NOTEBOOK_ARGS
=
"--base-url=
$JPY_BASE_URL
$NOTEBOOK_ARGS
"
fi
fi
if
[
!
-z
"
$JPY_HUB_PREFIX
"
]
;
then
if
[
!
-z
"
$JPY_HUB_PREFIX
"
]
;
then
NOTEBOOK_ARGS
=
"--hub-prefix=
$JPY_HUB_PREFIX
$NOTEBOOK_ARGS
"
NOTEBOOK_ARGS
=
"--hub-prefix=
$JPY_HUB_PREFIX
$NOTEBOOK_ARGS
"
fi
fi
if
[
!
-z
"
$JPY_HUB_API_URL
"
]
;
then
if
[
!
-z
"
$JPY_HUB_API_URL
"
]
;
then
NOTEBOOK_ARGS
=
"--hub-api-url=
$JPY_HUB_API_URL
$NOTEBOOK_ARGS
"
NOTEBOOK_ARGS
=
"--hub-api-url=
$JPY_HUB_API_URL
$NOTEBOOK_ARGS
"
fi
fi
NOTEBOOK_BIN
=
"jupyterhub-singleuser"
NOTEBOOK_BIN
=
"jupyterhub-singleuser"
...
...
examples/docker-compose/bin/letsencrypt.sh
View file @
3923ac62
...
@@ -9,12 +9,12 @@ set -e
...
@@ -9,12 +9,12 @@ set -e
# Get domain and email from environment
# Get domain and email from environment
[
-z
"
$FQDN
"
]
&&
\
[
-z
"
$FQDN
"
]
&&
\
echo
"ERROR: Must set FQDN environment varable"
&&
\
echo
"ERROR: Must set FQDN environment varable"
&&
\
exit
1
exit
1
[
-z
"
$EMAIL
"
]
&&
\
[
-z
"
$EMAIL
"
]
&&
\
echo
"ERROR: Must set EMAIL environment varable"
&&
\
echo
"ERROR: Must set EMAIL environment varable"
&&
\
exit
1
exit
1
# letsencrypt certificate server type (default is production).
# letsencrypt certificate server type (default is production).
# Set `CERT_SERVER=--staging` for staging.
# Set `CERT_SERVER=--staging` for staging.
...
@@ -25,24 +25,24 @@ set -e
...
@@ -25,24 +25,24 @@ set -e
docker volume create
--name
$SECRETS_VOLUME
1>/dev/null
docker volume create
--name
$SECRETS_VOLUME
1>/dev/null
# Generate the cert and save it to the Docker volume
# Generate the cert and save it to the Docker volume
docker run
--rm
-it
\
docker run
--rm
-it
\
-p
80:80
\
-p
80:80
\
-v
$SECRETS_VOLUME
:/etc/letsencrypt
\
-v
$SECRETS_VOLUME
:/etc/letsencrypt
\
quay.io/letsencrypt/letsencrypt:latest
\
quay.io/letsencrypt/letsencrypt:latest
\
certonly
\
certonly
\
--non-interactive
\
--non-interactive
\
--keep-until-expiring
\
--keep-until-expiring
\
--standalone
\
--standalone
\
--standalone-supported-challenges
http-01
\
--standalone-supported-challenges
http-01
\
--agree-tos
\
--agree-tos
\
--domain
"
$FQDN
"
\
--domain
"
$FQDN
"
\
--email
"
$EMAIL
"
\
--email
"
$EMAIL
"
\
$CERT_SERVER
$CERT_SERVER
# Set permissions so nobody can read the cert and key.
# Set permissions so nobody can read the cert and key.
# Also symlink the certs into the root of the /etc/letsencrypt
# Also symlink the certs into the root of the /etc/letsencrypt
# directory so that the FQDN doesn't have to be known later.
# directory so that the FQDN doesn't have to be known later.
docker run
--rm
-it
\
docker run
--rm
-it
\
-v
$SECRETS_VOLUME
:/etc/letsencrypt
\
-v
$SECRETS_VOLUME
:/etc/letsencrypt
\
ubuntu:20.04
\
ubuntu:20.04
\
bash
-c
"ln -s /etc/letsencrypt/live/
$FQDN
/* /etc/letsencrypt/ &&
\
bash
-c
"ln -s /etc/letsencrypt/live/
$FQDN
/* /etc/letsencrypt/ &&
\
find /etc/letsencrypt -type d -exec chmod 755 {} +"
find /etc/letsencrypt -type d -exec chmod 755 {} +"
examples/docker-compose/bin/sl-dns.sh
View file @
3923ac62
...
@@ -15,8 +15,8 @@ MACHINE_NAME=$1 && [ -z "$MACHINE_NAME" ] && echo "$USAGE" && exit $E_BADARGS
...
@@ -15,8 +15,8 @@ MACHINE_NAME=$1 && [ -z "$MACHINE_NAME" ] && echo "$USAGE" && exit $E_BADARGS
# Use SOFTLAYER_DOMAIN env var if domain name not set as second arg
# Use SOFTLAYER_DOMAIN env var if domain name not set as second arg
DOMAIN
=
"
${
2
:-
$SOFTLAYER_DOMAIN
}
"
&&
[
-z
"
$DOMAIN
"
]
&&
\
DOMAIN
=
"
${
2
:-
$SOFTLAYER_DOMAIN
}
"
&&
[
-z
"
$DOMAIN
"
]
&&
\
echo
"Must specify domain or set SOFTLAYER_DOMAIN environment varable"
&&
\
echo
"Must specify domain or set SOFTLAYER_DOMAIN environment varable"
&&
\
echo
"
$USAGE
"
&&
exit
$E_BADARGS
echo
"
$USAGE
"
&&
exit
$E_BADARGS
IP
=
$(
docker-machine ip
"
$MACHINE_NAME
"
)
IP
=
$(
docker-machine ip
"
$MACHINE_NAME
"
)
...
...
examples/docker-compose/notebook/letsencrypt-notebook.yml
View file @
3923ac62
---
# Copyright (c) Jupyter Development Team.
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
# Distributed under the terms of the Modified BSD License.
...
@@ -9,8 +10,8 @@ services:
...
@@ -9,8 +10,8 @@ services:
image
:
my-notebook
image
:
my-notebook
container_name
:
${NAME}
container_name
:
${NAME}
volumes
:
volumes
:
-
"
work:/home/jovyan/work"
-
"
work:/home/jovyan/work"
-
"
secrets:/etc/letsencrypt"
-
"
secrets:/etc/letsencrypt"
ports
:
ports
:
-
"
${PORT}:8888"
-
"
${PORT}:8888"
environment
:
environment
:
...
...
examples/docker-compose/notebook/notebook.yml
View file @
3923ac62
---
# Copyright (c) Jupyter Development Team.
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
# Distributed under the terms of the Modified BSD License.
...
@@ -9,7 +10,7 @@ services:
...
@@ -9,7 +10,7 @@ services:
image
:
my-notebook
image
:
my-notebook
container_name
:
${NAME}
container_name
:
${NAME}
volumes
:
volumes
:
-
"
work:/home/jovyan/work"
-
"
work:/home/jovyan/work"
ports
:
ports
:
-
"
${PORT}:8888"
-
"
${PORT}:8888"
...
...
examples/docker-compose/notebook/secure-notebook.yml
View file @
3923ac62
---
# Copyright (c) Jupyter Development Team.
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
# Distributed under the terms of the Modified BSD License.
...
@@ -9,7 +10,7 @@ services:
...
@@ -9,7 +10,7 @@ services:
image
:
my-notebook
image
:
my-notebook
container_name
:
${NAME}
container_name
:
${NAME}
volumes
:
volumes
:
-
"
work:/home/jovyan/work"
-
"
work:/home/jovyan/work"
ports
:
ports
:
-
"
${PORT}:8888"
-
"
${PORT}:8888"
environment
:
environment
:
...
...
examples/docker-compose/notebook/up.sh
View file @
3923ac62
...
@@ -11,8 +11,7 @@ USAGE="Usage: `basename $0` [--secure | --letsencrypt] [--password PASSWORD] [--
...
@@ -11,8 +11,7 @@ USAGE="Usage: `basename $0` [--secure | --letsencrypt] [--password PASSWORD] [--
# Parse args to determine security settings
# Parse args to determine security settings
SECURE
=
${
SECURE
:
=no
}
SECURE
=
${
SECURE
:
=no
}
LETSENCRYPT
=
${
LETSENCRYPT
:
=no
}
LETSENCRYPT
=
${
LETSENCRYPT
:
=no
}
while
[[
$#
>
0
]]
while
[[
$#
>
0
]]
;
do
do
key
=
"
$1
"
key
=
"
$1
"
case
$key
in
case
$key
in
--secure
)
--secure
)
...
@@ -37,25 +36,25 @@ shift # past argument or value
...
@@ -37,25 +36,25 @@ shift # past argument or value
done
done
if
[[
"
$LETSENCRYPT
"
==
yes
||
"
$SECURE
"
==
yes
]]
;
then
if
[[
"
$LETSENCRYPT
"
==
yes
||
"
$SECURE
"
==
yes
]]
;
then
if
[
-z
"
${
PASSWORD
:+x
}
"
]
;
then
if
[
-z
"
${
PASSWORD
:+x
}
"
]
;
then
echo
"ERROR: Must set PASSWORD if running in secure mode"
echo
"ERROR: Must set PASSWORD if running in secure mode"
echo
"
$USAGE
"
echo
"
$USAGE
"
exit
1
exit
1
fi
if
[
"
$LETSENCRYPT
"
==
yes
]
;
then
CONFIG
=
letsencrypt-notebook.yml
if
[
-z
"
${
SECRETS_VOLUME
:+x
}
"
]
;
then
echo
"ERROR: Must set SECRETS_VOLUME if running in letsencrypt mode"
echo
"
$USAGE
"
exit
1
fi
fi
else
if
[
"
$LETSENCRYPT
"
==
yes
]
;
then
CONFIG
=
secure-notebook.yml
CONFIG
=
letsencrypt-notebook.yml
fi
if
[
-z
"
${
SECRETS_VOLUME
:+x
}
"
]
;
then
export
PORT
=
${
PORT
:
=443
}
echo
"ERROR: Must set SECRETS_VOLUME if running in letsencrypt mode"
echo
"
$USAGE
"
exit
1
fi
else
CONFIG
=
secure-notebook.yml
fi
export
PORT
=
${
PORT
:
=443
}
else
else
CONFIG
=
notebook.yml
CONFIG
=
notebook.yml
export
PORT
=
${
PORT
:
=80
}
export
PORT
=
${
PORT
:
=80
}
fi
fi
# Setup environment
# Setup environment
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment