Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:docker:dev [2014/09/01 13:38] – [MongoDB] admin | doc:docker:dev [2015/03/31 12:51] (current) – [Sharing images via Docker hub] daniel86 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== KnowRob & Docker | + | ====== KnowRob & Docker -- developer documentation ====== |
+ | |||
+ | This page lists information for developers that would like to modify, update and develop the docker images. If you would only like to start the existing docker containers, please have a look [[/ | ||
===== Building Docker images===== | ===== Building Docker images===== | ||
Line 5: | Line 8: | ||
The Dockerfiles for the KnowRob containers can be found in this repository: https:// | The Dockerfiles for the KnowRob containers can be found in this repository: https:// | ||
<code bash> | <code bash> | ||
- | | + | cd ~/docker/hydro-knowrob/ |
- | docker build -t knowrob/ | + | docker build -t knowrob/ |
+ | |||
+ | cd ~/ | ||
+ | docker build -t knowrob/ | ||
- | | + | cd ~/docker/hydro-knowrob/ |
- | docker build -t knowrob/ | + | docker build -t knowrob/ |
- | | + | cd ~/docker/webapps/ |
- | docker build -t knowrob/webrob | + | docker build -t openease/ |
+ | |||
+ | cd ~/ | ||
+ | docker build -t openease/ | ||
+ | |||
+ | cd ~/ | ||
+ | docker build -t openease/knowrob | ||
</ | </ | ||
You can tag a version of an image using | You can tag a version of an image using | ||
- | docker tag 18df3323a0d8 | + | docker tag 18df3323a0d8 |
===== Sharing images via Docker hub ===== | ===== Sharing images via Docker hub ===== | ||
Line 25: | Line 37: | ||
docker push knowrob/ | docker push knowrob/ | ||
- | # download images (this can also be done with the ' | + | # download images (this can also be done with the ' |
docker pull knowrob/ | docker pull knowrob/ | ||
- | docker pull knowrob/ | ||
docker pull knowrob/ | docker pull knowrob/ | ||
docker pull knowrob/ | docker pull knowrob/ | ||
+ | docker pull openease/ | ||
+ | [...] | ||
</ | </ | ||
Line 45: | Line 58: | ||
docker run -t -P -d knowrob/ | docker run -t -P -d knowrob/ | ||
</ | </ | ||
- | |||
- | ==== Web application ==== | ||
- | |||
- | The web app needs access to the Docker socket, so you have to start it like this: | ||
- | docker run --rm -i -p 5000:5000 -v / | ||
- | |||
- | You can then access the Web interface at http:// | ||
Line 81: | Line 87: | ||
Docker containers are cheap and usually short-lived, | Docker containers are cheap and usually short-lived, | ||
- | In the KnowRob use case, there is one container | + | In the KnowRob use case, there is one container |
- | + | ||
- | + | ||
- | ==== Creating the user data containers ==== | + | |
- | The user containers are built from the user_data Dockerfile. It basically just creates a user ' | + | |
- | + | ||
- | <code bash> | + | |
- | cd docker/ | + | |
- | docker build -t knowrob/ | + | |
- | docker run --name demo_data knowrob/ | + | |
- | </ | + | |
Line 109: | Line 105: | ||
<code bash> | <code bash> | ||
# interactive mode | # interactive mode | ||
- | docker run -t -P -i \ | + | docker run -t -P -i --rm \ |
| | ||
- | | + | |
| | ||
+ | | ||
| | ||
/ | / | ||
| | ||
# daemon mode | # daemon mode | ||
- | docker run -t -P -d \ | + | docker run -t -P -d --rm\ |
| | ||
- | | + | |
| | ||
+ | | ||
| | ||
</ | </ | ||
- | These examples are for the user ' | + | These examples are for the user ' |