Skip to content

Commit

Permalink
Merge pull request #664 from dcs4cop/toniof-651-docker-image
Browse files Browse the repository at this point in the history
Docker image is not working
  • Loading branch information
TonioF authored Apr 20, 2022
2 parents 7c14198 + dd75df3 commit f7ec296
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 show xcube help
CMD ["xcube --help"]
23 changes: 19 additions & 4 deletions docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +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]:8000 [your name]
$ docker run [your name]

Example:

$ docker build -t xcube:0.1.0dev6 .
$ docker run -d -p 8001:8000 xcube:0.1.0dev6
$ docker run -d -p [host port]:8080 [your name]

Example 1:

$ docker build -t xcube:0.10.0 .
$ docker run xcube:0.10.0

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 -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.

0 comments on commit f7ec296

Please sign in to comment.