-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add minimal Dockerfile for repo2docker to build and launch successfully from matthewfeickert/pythia-python:pythia8.308. - Constrain 'jupyter-server<2.0.0' to avoid jupyterhub/repo2docker#1231 and jupyter-server/jupyter_server#1038 * Add binder_repo2docker Make target for local building with repo2docker. * Add Binder launch badge to README.
- Loading branch information
1 parent
c70139a
commit b7d81d2
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM matthewfeickert/pythia-python:pythia8.308 | ||
|
||
# Remove existing non-root user "docker" with uid 1000 | ||
# to avoid conflict with jovyan | ||
USER root | ||
RUN deluser docker | ||
|
||
ARG NB_USER=jovyan | ||
ARG NB_UID=1000 | ||
ENV USER ${NB_USER} | ||
ENV NB_UID ${NB_UID} | ||
ENV HOME /home/${NB_USER} | ||
|
||
USER root | ||
RUN adduser --disabled-password \ | ||
--gecos "Default user" \ | ||
--uid ${NB_UID} \ | ||
${NB_USER} | ||
USER ${NB_USER} | ||
|
||
# FIXME: Downgrade jupyter-server to contend with: | ||
# https://github.com/jupyterhub/repo2docker/issues/1231 | ||
# https://github.com/jupyter-server/jupyter_server/issues/1038 | ||
RUN python -m pip --no-cache-dir install --upgrade \ | ||
notebook \ | ||
jupyterlab \ | ||
jupyterhub \ | ||
'jupyter-server<2.0.0' | ||
|
||
# Make sure the contents of the repo are in ${HOME} | ||
COPY . ${HOME} | ||
USER root | ||
RUN chown -R ${NB_UID} ${HOME} && \ | ||
chown -R ${NB_UID} /usr/local/venv | ||
USER ${NB_USER} | ||
WORKDIR ${HOME} | ||
|
||
# Null out ENTRYPOINT and CMD to let repo2docker control them | ||
ENTRYPOINT [ ] | ||
CMD [ ] |