Skip to content

Commit 0a79e58

Browse files
authored
update for latest binder/base image (jorgensd#218)
- remove workaround for incompatible notebook/lab fixed in repo2docker - allow for adduser to be redundant if uid already exists
1 parent d054ef7 commit 0a79e58

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Dockerfile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,9 @@ FROM ghcr.io/jorgensd/dolfinx-tutorial:release
33
# create user with a home directory
44
ARG NB_USER=jovyan
55
ARG NB_UID=1000
6-
RUN useradd -m ${NB_USER} -u ${NB_UID}
7-
ENV HOME /home/${NB_USER}
8-
9-
# for binder: base image upgrades lab to require jupyter-server 2,
10-
# but binder explicitly launches jupyter-notebook
11-
# force binder to launch jupyter-server instead
12-
RUN nb=$(which jupyter-notebook) \
13-
&& rm $nb \
14-
&& ln -s $(which jupyter-lab) $nb
6+
# 24.04 adds uid 1000, skip this if uid already exists
7+
RUN useradd -m ${NB_USER} -u ${NB_UID} || true
8+
ENV HOME=/home/${NB_USER}
159

1610
# Copy home directory for usage in binder
1711
WORKDIR ${HOME}

0 commit comments

Comments
 (0)