From 28740488edcf16d43c63a72fb44bb4a1fd5b69d8 Mon Sep 17 00:00:00 2001 From: Tonio Fincke Date: Thu, 7 Apr 2022 11:17:01 +0200 Subject: [PATCH 1/5] run demo service by default --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9483299a1..05c940ff7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,5 +58,8 @@ RUN if [[ ${INSTALL_PLUGINS} == '1' ]]; then bash install_xcube.sh xcube-cds ${X # Export web server port EXPOSE 8080 -# Start bash, so we can invoke xcube CLI. -CMD ["/bin/bash"] +# Run bash in xcube environment, so we can invoke xcube CLI. +ENTRYPOINT ["conda", "run", "-v", "-n", "xcube", "/bin/bash", "-c"] + +# By default run demo service. +CMD ["xcube serve -v --address 0.0.0.0 --port 8080 -c /home/xcube/examples/serve/demo/config.yml"] From 6b156227d7ab39c86ee541371da2eaf4869d121e Mon Sep 17 00:00:00 2001 From: Tonio Fincke Date: Thu, 7 Apr 2022 11:17:18 +0200 Subject: [PATCH 2/5] updated documentation --- docs/source/installation.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/source/installation.md b/docs/source/installation.md index bf1323f1d..9e25c65b8 100644 --- a/docs/source/installation.md +++ b/docs/source/installation.md @@ -99,10 +99,20 @@ Alternatively, to install xcube directly from the repository: To start a demo using docker use the following commands $ docker build -t [your name] . - $ docker run -d -p [host port]:8000 [your name] + $ docker run -d -p [host port]:8080 [your name] -Example: +Example 1: - $ docker build -t xcube:0.1.0dev6 . - $ docker run -d -p 8001:8000 xcube:0.1.0dev6 + $ docker build -t xcube:0.10.0 . + $ docker run -d -p 8001:8080 xcube:0.10.0 $ docker ps + +This will have started a service in the background which can be accessed +through port 8001, as the startup of a service is configured as default +behaviour. +Alternatively, you might access the `xcube` cli like this: + +Example 2: + + $ docker build -t xcube:0.10.0 . + $ docker run xcube:0.10.0 "xcube --help" From 7e85107abace32ad43c312a7c98a728e42be4c4b Mon Sep 17 00:00:00 2001 From: Tonio Fincke Date: Wed, 20 Apr 2022 16:09:16 +0200 Subject: [PATCH 3/5] changed default command --- Dockerfile | 2 +- docs/source/installation.md | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 05c940ff7..cab95a6da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,4 +62,4 @@ EXPOSE 8080 ENTRYPOINT ["conda", "run", "-v", "-n", "xcube", "/bin/bash", "-c"] # By default run demo service. -CMD ["xcube serve -v --address 0.0.0.0 --port 8080 -c /home/xcube/examples/serve/demo/config.yml"] +CMD ["xcube --help"] diff --git a/docs/source/installation.md b/docs/source/installation.md index 9e25c65b8..ce1fe167c 100644 --- a/docs/source/installation.md +++ b/docs/source/installation.md @@ -99,20 +99,25 @@ Alternatively, to install xcube directly from the repository: To start a demo using docker use the following commands $ docker build -t [your name] . - $ docker run -d -p [host port]:8080 [your name] + $ docker run [your name] + + +$ docker run -d -p [host port]:8080 [your name] Example 1: $ docker build -t xcube:0.10.0 . - $ docker run -d -p 8001:8080 xcube:0.10.0 - $ docker ps + $ docker run xcube:0.10.0 -This will have started a service in the background which can be accessed -through port 8001, as the startup of a service is configured as default -behaviour. -Alternatively, you might access the `xcube` cli like this: +This will create the docker container and list the functionality of the +`xcube` cli. Example 2: $ docker build -t xcube:0.10.0 . - $ docker run xcube:0.10.0 "xcube --help" + $ docker run -d -p 8001:8080 "xcube:0.10.0 xcube serve -v --address 0.0.0.0 --port 8080 -c /home/xcube/examples/serve/demo/config.yml" + $ docker ps + +This will have started a service in the background which can be accessed +through port 8001, as the startup of a service is configured as default +behaviour. From fcef435098d22cae1cbf493962e9ef817c860490 Mon Sep 17 00:00:00 2001 From: Tonio Fincke Date: Wed, 20 Apr 2022 16:09:28 +0200 Subject: [PATCH 4/5] updated changelog --- CHANGES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 49610497c..eefa01325 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -105,6 +105,11 @@ * Opening of multi-level datasets with filesystem data stores now recognizes the `cache_size` open parameter. +* It is possible again to build and run docker containers from the docker file + in the Github Repository. (#651) + For more information, see + https://xcube.readthedocs.io/en/latest/installation.html#docker + ### Other changes * The `xcube tile` CLI tool has been deprecated. A new tool is planned that can work From dd75df3aabc69a04af5ab184104052878bcc2766 Mon Sep 17 00:00:00 2001 From: Tonio Fincke Date: Wed, 20 Apr 2022 16:17:23 +0200 Subject: [PATCH 5/5] Update Dockerfile Co-authored-by: Norman Fomferra --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cab95a6da..952a6a2db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,5 +61,5 @@ EXPOSE 8080 # Run bash in xcube environment, so we can invoke xcube CLI. ENTRYPOINT ["conda", "run", "-v", "-n", "xcube", "/bin/bash", "-c"] -# By default run demo service. +# By default show xcube help CMD ["xcube --help"]