Merge pull request #18 from moisei/install-docker-on-container
install docker on jupyterhub container
This commit is contained in:
commit
7bc6a02bcd
@ -8,6 +8,11 @@ RUN /opt/conda/bin/pip install \
|
|||||||
oauthenticator==0.4.* \
|
oauthenticator==0.4.* \
|
||||||
dockerspawner==0.4.*
|
dockerspawner==0.4.*
|
||||||
|
|
||||||
|
# install docker on the jupyterhub container
|
||||||
|
RUN wget https://get.docker.com -q -O /tmp/getdocker && \
|
||||||
|
chmod +x /tmp/getdocker && \
|
||||||
|
sh /tmp/getdocker
|
||||||
|
|
||||||
# Copy TLS certificate and key
|
# Copy TLS certificate and key
|
||||||
ENV SSL_CERT /srv/jupyterhub/secrets/jupyterhub.crt
|
ENV SSL_CERT /srv/jupyterhub/secrets/jupyterhub.crt
|
||||||
ENV SSL_KEY /srv/jupyterhub/secrets/jupyterhub.key
|
ENV SSL_KEY /srv/jupyterhub/secrets/jupyterhub.key
|
||||||
|
13
Makefile
13
Makefile
@ -12,12 +12,16 @@ self-signed-cert:
|
|||||||
# make a self-signed cert
|
# make a self-signed cert
|
||||||
|
|
||||||
secrets/jupyterhub.crt:
|
secrets/jupyterhub.crt:
|
||||||
@echo "Need an SSL certificate in secrets/jupyterhub.crt"
|
@if [ "${SECRETS_VOLUME}" = "" ]; then \
|
||||||
@exit 1
|
echo "Need an SSL certificate in secrets/jupyterhub.crt"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
secrets/jupyterhub.key:
|
secrets/jupyterhub.key:
|
||||||
@echo "Need an SSL key in secrets/jupyterhub.key"
|
@if [ "${SECRETS_VOLUME}" = "" ]; then \
|
||||||
@exit 1
|
echo "Need an SSL key in secrets/jupyterhub.key"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
userlist:
|
userlist:
|
||||||
@echo "Add usernames, one per line, to ./userlist, such as:"
|
@echo "Add usernames, one per line, to ./userlist, such as:"
|
||||||
@ -26,7 +30,6 @@ userlist:
|
|||||||
@exit 1
|
@exit 1
|
||||||
|
|
||||||
check-files: secrets/jupyterhub.crt secrets/jupyterhub.key userlist
|
check-files: secrets/jupyterhub.crt secrets/jupyterhub.key userlist
|
||||||
# fail in an informative way if files don't exist
|
|
||||||
|
|
||||||
pull:
|
pull:
|
||||||
docker pull $(DOCKER_NOTEBOOK_IMAGE)
|
docker pull $(DOCKER_NOTEBOOK_IMAGE)
|
||||||
|
@ -12,9 +12,6 @@ services:
|
|||||||
image: jupyterhub
|
image: jupyterhub
|
||||||
container_name: jupyterhub
|
container_name: jupyterhub
|
||||||
volumes:
|
volumes:
|
||||||
# Bind Docker binary from host machine so we can invoke Docker commands
|
|
||||||
# from inside container
|
|
||||||
- "/usr/local/bin/docker:/usr/local/bin/docker:ro"
|
|
||||||
# Bind Docker socket on the host so we can connect to the daemon from
|
# Bind Docker socket on the host so we can connect to the daemon from
|
||||||
# within the container
|
# within the container
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock:rw"
|
- "/var/run/docker.sock:/var/run/docker.sock:rw"
|
||||||
|
Loading…
Reference in New Issue
Block a user