Skip to content

Commit

Permalink
Ensure SIGTERM leads to graceful termination in rocker/binder (#773)
Browse files Browse the repository at this point in the history
Fixes #771, not by introducing `tini`, but by ensuring we don't let `sh`
be the init process which in turn runs `jupyter lab` without propegating
SIGTERM to it.

There may be a point to introduce `tini` or similar, but from the
SIGTERM perspective, this does the trick as well.

This PR is modelled on for example
https://github.com/rocker-org/rocker-versioned2/pull/740/files where I
see that all Dockerfiles are updated along with a repsective .json file.
  • Loading branch information
cboettig authored Mar 29, 2024
2 parents 08427f9 + 61d1c64 commit cfe88aa
Show file tree
Hide file tree
Showing 38 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.0.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.0.1.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.0.2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.0.3.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.0.4.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.0.5.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.1.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.1.1.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.1.2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.1.3.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.2.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.2.1.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.2.2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.2.3.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.3.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.3.1.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.3.2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_4.3.3.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/binder_devel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN /rocker_scripts/install_jupyter.sh

EXPOSE 8888

CMD ["/bin/sh", "-c", "jupyter lab --ip 0.0.0.0 --no-browser"]
CMD ["jupyter", "lab", "--ip", "0.0.0.0", "--no-browser"]

USER ${NB_USER}

Expand Down
2 changes: 1 addition & 1 deletion stacks/4.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.0.1"
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.0.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.0.2"
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.0.3.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.0.3"
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.0.4.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.0.4"
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.0.5.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.0.5",
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.1.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.1.0"
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.1.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.1.1"
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.1.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.1.2"
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.1.3.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.1.3",
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.2.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.2.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.2.1",
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.2.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.2.2",
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.2.3.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.2.3",
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.3.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.3.0",
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.3.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.3.1",
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.3.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.3.2",
Expand Down
2 changes: 1 addition & 1 deletion stacks/4.3.3.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888,
"tags": [
"docker.io/rocker/binder:4.3.3",
Expand Down
2 changes: 1 addition & 1 deletion stacks/devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
],
"USER": "${NB_USER}",
"WORKDIR": "/home/${NB_USER}",
"CMD": "[\"/bin/sh\", \"-c\", \"jupyter lab --ip 0.0.0.0 --no-browser\"]",
"CMD": "[\"jupyter\", \"lab\", \"--ip\", \"0.0.0.0\", \"--no-browser\"]",
"EXPOSE": 8888
},
{
Expand Down

0 comments on commit cfe88aa

Please sign in to comment.