Skip to content

Commit

Permalink
Fix ctrl-c not shutting down ./start (Qiskit#1476)
Browse files Browse the repository at this point in the history
For some reason, a couple weeks ago `ctrl-c` stopped properly shutting
down the Docker container when running `./start`. So I'd have to
manually kill the container.

It now works when using `--init`:

```
❯ docker run --help | grep init
      --init                           Run an init inside the container that forwards signals and reaps processes
```
  • Loading branch information
Eric-Arellano authored May 31, 2024
1 parent 13f1e35 commit 1ff27c0
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions start
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ def main() -> None:
+ "`docker pull qiskit/documentation` to check for updates.",
file=sys.stderr,
)
subprocess.run(
# Keep this aligned with the Dockerfile at the root of the repository.
[
"docker",
"run",
"-v",
f"{PWD}/docs:/home/node/app/docs",
*translation_volume_mounts(),
"-v",
f"{PWD}/public:/home/node/app/packages/preview/public",
"-p",
"3000:3000",
"-p",
"5001:5001",
"qiskit/documentation",
],
check=True,
)
# Keep this aligned with the Dockerfile at the root of the repository.
cmd = [
"docker",
"run",
"-v",
f"{PWD}/docs:/home/node/app/docs",
*translation_volume_mounts(),
"-v",
f"{PWD}/public:/home/node/app/packages/preview/public",
"-p",
"3000:3000",
"-p",
"5001:5001",
# Needed for ctrl-c to shut down the container.
"--init",
"qiskit/documentation",
]
subprocess.run(cmd, check=True)


if __name__ == "__main__":
Expand Down

0 comments on commit 1ff27c0

Please sign in to comment.