Created
March 10, 2021 08:09
-
-
Save limbuu/b38574419c86f4046ea705c9ca647694 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.docker.com/engine/reference/builder/ | |
# /home/jovyan/work | |
ARG BASE_CONTAINER=jupyter/minimal-notebook | |
FROM $BASE_CONTAINER | |
LABEL maintainer="Bruno Bronosky <bruno@bronosky.com>" | |
USER root | |
# Install all OS dependencies for fully functional notebook server | |
RUN pip install bash_kernel && python -m bash_kernel.install | |
# Allow using 'su -' to make sandbox changes | |
RUN chpasswd <<<"root:root" && \ | |
sed -Ei 's/(.*pam_deny.so)/# \1/' /etc/pam.d/su | |
# Switch back to jovyan to avoid accidental container runs as root | |
USER $NB_UID | |
EXPOSE 8888 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For any user other tha
root
, use following:username=jovyan
password=jovyan
adduser --gecos "" --disabled-password $username
chpasswd <<<"$username:$password"