From 966bfa9867f4117677990cf02be678f8249997f0 Mon Sep 17 00:00:00 2001 From: Stefano Alberto Russo <stefano.russo@gmail.com> Date: Fri, 8 Apr 2022 09:54:27 +0200 Subject: [PATCH] Disabled token-based auth for contaners created with rep2docker as the proxy is already enforcing authentication. --- services/webapp/code/rosetta/core_app/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/webapp/code/rosetta/core_app/utils.py b/services/webapp/code/rosetta/core_app/utils.py index f122aa0..8f5e42d 100644 --- a/services/webapp/code/rosetta/core_app/utils.py +++ b/services/webapp/code/rosetta/core_app/utils.py @@ -761,11 +761,14 @@ def get_or_create_container_from_repository(user, repository_url, repository_tag # If reusing: #{"message": "Reusing existing image (r2dhttps-3a-2f-2fgithub-2ecom-2fnorvig-2fpytudes5e745c3), not building."} + appendix = 'CMD ["jupyter", "notebook", "--ip", "0.0.0.0", "--NotebookApp.token", ""]' + + # Build the Docker container for this repo if repository_tag: - command = 'sudo jupyter-repo2docker --ref {} --user-id 1000 --user-name jovyan --no-run --json-logs {}'.format(repository_tag, repository_url) + command = 'sudo jupyter-repo2docker --ref {} --user-id 1000 --user-name jovyan --no-run --appendix \'{}\' --json-logs {}'.format(repository_tag, appendix, repository_url) else: - command = 'sudo jupyter-repo2docker --user-id 1000 --user-name jovyan --no-run --json-logs {}'.format(repository_url) + command = 'sudo jupyter-repo2docker --user-id 1000 --user-name jovyan --no-run --appendix \'{}\' --json-logs {}'.format(repository_url, appendix) out = os_shell(command, capture=True) if out.exit_code != 0: logger.error(out.stderr) -- GitLab