Skip to content

Commit 1ff27c0

Browse files
Fix ctrl-c not shutting down ./start (Qiskit#1476)
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 ```
1 parent 13f1e35 commit 1ff27c0

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

start

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,24 @@ def main() -> None:
3838
+ "`docker pull qiskit/documentation` to check for updates.",
3939
file=sys.stderr,
4040
)
41-
subprocess.run(
42-
# Keep this aligned with the Dockerfile at the root of the repository.
43-
[
44-
"docker",
45-
"run",
46-
"-v",
47-
f"{PWD}/docs:/home/node/app/docs",
48-
*translation_volume_mounts(),
49-
"-v",
50-
f"{PWD}/public:/home/node/app/packages/preview/public",
51-
"-p",
52-
"3000:3000",
53-
"-p",
54-
"5001:5001",
55-
"qiskit/documentation",
56-
],
57-
check=True,
58-
)
41+
# Keep this aligned with the Dockerfile at the root of the repository.
42+
cmd = [
43+
"docker",
44+
"run",
45+
"-v",
46+
f"{PWD}/docs:/home/node/app/docs",
47+
*translation_volume_mounts(),
48+
"-v",
49+
f"{PWD}/public:/home/node/app/packages/preview/public",
50+
"-p",
51+
"3000:3000",
52+
"-p",
53+
"5001:5001",
54+
# Needed for ctrl-c to shut down the container.
55+
"--init",
56+
"qiskit/documentation",
57+
]
58+
subprocess.run(cmd, check=True)
5959

6060

6161
if __name__ == "__main__":

0 commit comments

Comments
 (0)