Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion binder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Base image to use for demos.
# Base image to use for demos in (my)binder.

# Tag will be automatically generated through pre-commit hook if any changes
# happened in the docker/ folder
Expand All @@ -12,3 +12,22 @@ COPY notebooks/*.ipynb notebooks/

# Copy all the needed datasets for the demos
COPY datasets/ datasets/

# install the notebook package
RUN pip install --no-cache --upgrade pip && \
pip install --no-cache notebook jupyterlab traitlets

ARG NB_USER
ARG NB_UID

# Verify that the requested notebook user name+id match the current ones
RUN id -nu | grep -q $NB_USER
RUN id -u | grep -q $NB_UID

# Add a custom entrypoint script (required by binder due to custom args)
USER root
COPY binder/entrypoint-demos.sh /entrypoint-demos.sh
RUN chmod +x /entrypoint-demos.sh
WORKDIR ${HOME}
USER ${USER}
ENTRYPOINT ["/entrypoint-demos.sh"]
31 changes: 31 additions & 0 deletions binder/entrypoint-demos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
#
# Copyright (C) 2020 Dremio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -e

echo ""
echo "HELLO WORLD"
echo "HELLO WORLD"
echo "HELLO WORLD"
echo "HELLO WORLD"
echo ""
echo "$@" >> /dev/stderr
echo "$@"
echo ""
echo ""
echo ""

exec "$@"
Loading