{"action":"created","comment":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/36292436","id":36292436,"diff_hunk":"@@ -3,46 +3,86 @@\n \n You can build a docker image based on this Dockerfile. This image will contain only an Orion Context Broker instance, exposing port `1026`. This requires that you have [docker](https://docs.docker.com/installation/) installed on your machine.\n \n-If you just want to have an Orion Context Broker running as fast as possible jump to section [The Fastest Way](#the_fastest_way).\n+If you just want to have an Orion Context Broker running as fast as possible jump to section *The Fastest Way*.\n \n-If you want to know what and how we are doing things with the container step by step you can  go ahead and read the [Build](#build_the_image) and [Run](#run_the_container) sections.\n+If you want to know what and how we are doing things with the container step by step you can go ahead and read the build and run sections.\n \n ## The Fastest Way\n \n-A Docker Compose file is provided for convenience. You must install [Docker Compose](https://docs.docker.com/compose/install/) for this method to work.\n+Docker Compose lets you have an Orion Context Broker container along with a MongoDB container running in a few minutes. You must install [Docker Compose](https://docs.docker.com/compose/install/) for this method to work.\n \n-Simply navigate to the docker directory of the fiware-orion code (if you have downloaded it) and run\n+### Run a container from an image you just built\n \n-\tdocker-compose up\n+If you have downloaded the [Orion's code](https://github.com/telefonicaid/fiware-orion/) simply navigate to the docker directory and run\n \n-If you haven't or you don't want to download the whole thing, you can download the file called `docker-compose.yaml` in a directory of your choice and run the aforementioned command. It will work just the same.\n+\tsudo docker-compose up\n+\n+You are using this [docker-compose.yml](docker-compose.yml) file. This will instruct to build a new image for Orion and run it linking it to another MongoDB container.\n+\n+### Run a container pulling an image from the cloud (recommended)\n+\n+If you haven't or you don't want to download the Orion repository, you can create a file called `docker-compose.yml` in a directory of your choice and fill it with the following content\n+\n+\torion:\n+\t  image: fiware/orion\n+\t  links:\n+\t    - mongo\n+\t  ports:\n+\t    - \"1026:1026\"\n+\t  command: -dbhost mongo\n+\n+\tmongo:\n+\t  image: mongo:2.6\n+\n+Then run\n+\n+\tsudo docker-compose up\n+\n+This way is equivalent to the previous one, except that it pulls the image from the Docker Registry instead of building your own. Keep in mind though that everything is run locally. \n+\n+> **Warning**\n+> Everything you do with Orion Context Broker when dockerized is non-persistent. *You will lose all your data* if you turn off the MongoDB container. This happens with either this method or the manual one.\n+> If you want to prevent this from happening take a look at [this link](https://registry.hub.docker.com/_/mongo/) in section *Where to Store Data* of the MongoDB docker documentation. In it you will find instructions and ideas on how to make your MongoDB data persistent.\n \n ## Build the image\n \n-This is an alternative approach than the one presented in section [The Fastest Way](#the_fastest_way). You do not need to go through these steps if you have used docker-compose.\n+This is an alternative approach to the one presented in the previous section. You do not need to go through these steps if you have used docker-compose. The end result will be the same, but this way you have a bit more of control of what's happening.\n \n You only need to do this once in your system:\n \n-\tdocker build -t orion .\n+\tsudo docker build -t orion .\n+\n+> **Note**\n+> If you don't want to have to use `sudo` in this or in the next section follow [these instructions](http://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo).\n+\n \n The parameter `-t orion` gives the image a name. This name could be anything, or even include an organization like `-t org/fiware-orion`. This name is later used to run the container based on the image.\n \n If you want to know more about images and the building process you can find it in [Docker's documentation](https://docs.docker.com/userguide/dockerimages/).\n     \n-## Run the container\n+### Run the container\n+\n+The following line will run the container exposing port `1026`, give it a name -in this case `orion1`, link it to a mongodb docker, and present a bash prompt. This uses the image built in the previous section.\n \n-The following line will run the container exposing port `1026`, give it a name -in this case `orion1`, link it to a mongodb docker, and present a bash prompt.\n+\t  sudo docker run -d --name orion1 --link mongodb:mongodb -p 1026:1026 orion -dbhost mongodb\n \n-\t  docker run -d --name orion1 --link mongodb:mongodb -p 1026:1026 orion -dbhost mongodb\n+If did not build the image yourself and want to use the one on Docker Hub use the following command:\n+\n+\t  sudo docker run -d --name orion1 --link mongodb:mongodb -p 1026:1026 fiware/orion -dbhost mongodb\n+\n+> **Note**\n+> Keep in mind that if you use this last command you get access to the tags and specific versions of Orion. For example, you may add `fiware/orion:0.22` if you need that particular version. If you don't specify a version you are pulling from `latest`.\n \n As a result of this command, there is a context broker listening on port 1026 on localhost. Try to see if it works now with\n \n \tcurl localhost:1026/version\n \n+\n+\n A few points to consider:\n \n * The name `orion1` can be anything and doesn't have to be related to the name given to the docker image in the previous section.\n-* `--link mongodb:mongodb` assumes there is a docker container running a MongoDB image in your system, whose name is `mongodb`. In case you need one type `docker run --name mongodb -d mongo:2.6`.\n+* `--link mongodb:mongodb` assumes there is a docker container running a MongoDB image in your system, whose name is `mongodb`. In case you need one type `sudo docker run --name mongodb -d mongo:2.6`.\n * In `-p 1026:1026` the first value represents the port to listen in on localhost. If you wanted to run a second context broker on your machine you should change this value to something else, for example `-p 1027:1026`.\n-* Anything after the name of the container image (in this case `orion`) is interpreted as a parameter for the Orion Context Broker. In this case we are telling the broker where the MongoDB host is, represented by the name of our other MongoDB container. Take a look at the [documentation](../.../.../doc/admin/cli.md) for other command-line options.\n+* Anything after the name of the container image (in this case `orion`) is interpreted as a parameter for the Orion Context Broker. In this case we are telling the broker where the MongoDB host is, represented by the name of our other MongoDB container. Take a look at the [documentation](../doc/manuals/admin/cli.md) for other command-line options.\n ","path":"docker/README.md","position":99,"original_position":99,"commit_id":"0b29624fd11ef415143fabba857be4a7c9d21c96","original_commit_id":"337aff2249144bc0b062007d1db13c9e2d7b706d","user":{"login":"LeandroGuillen","id":347884,"avatar_url":"https://avatars.githubusercontent.com/u/347884?v=3","gravatar_id":"","url":"https://api.github.com/users/LeandroGuillen","html_url":"https://github.com/LeandroGuillen","followers_url":"https://api.github.com/users/LeandroGuillen/followers","following_url":"https://api.github.com/users/LeandroGuillen/following{/other_user}","gists_url":"https://api.github.com/users/LeandroGuillen/gists{/gist_id}","starred_url":"https://api.github.com/users/LeandroGuillen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeandroGuillen/subscriptions","organizations_url":"https://api.github.com/users/LeandroGuillen/orgs","repos_url":"https://api.github.com/users/LeandroGuillen/repos","events_url":"https://api.github.com/users/LeandroGuillen/events{/privacy}","received_events_url":"https://api.github.com/users/LeandroGuillen/received_events","type":"User","site_admin":false},"body":"I'll go ahead and use the root path for the repo.","created_at":"2015-08-05T11:42:30Z","updated_at":"2015-08-05T11:42:30Z","html_url":"https://github.com/telefonicaid/fiware-orion/pull/1102#discussion_r36292436","pull_request_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1102","_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments/36292436"},"html":{"href":"https://github.com/telefonicaid/fiware-orion/pull/1102#discussion_r36292436"},"pull_request":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1102"}}},"pull_request":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1102","id":40791836,"html_url":"https://github.com/telefonicaid/fiware-orion/pull/1102","diff_url":"https://github.com/telefonicaid/fiware-orion/pull/1102.diff","patch_url":"https://github.com/telefonicaid/fiware-orion/pull/1102.patch","issue_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1102","number":1102,"state":"open","locked":false,"title":"Docker README fix","user":{"login":"LeandroGuillen","id":347884,"avatar_url":"https://avatars.githubusercontent.com/u/347884?v=3","gravatar_id":"","url":"https://api.github.com/users/LeandroGuillen","html_url":"https://github.com/LeandroGuillen","followers_url":"https://api.github.com/users/LeandroGuillen/followers","following_url":"https://api.github.com/users/LeandroGuillen/following{/other_user}","gists_url":"https://api.github.com/users/LeandroGuillen/gists{/gist_id}","starred_url":"https://api.github.com/users/LeandroGuillen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeandroGuillen/subscriptions","organizations_url":"https://api.github.com/users/LeandroGuillen/orgs","repos_url":"https://api.github.com/users/LeandroGuillen/repos","events_url":"https://api.github.com/users/LeandroGuillen/events{/privacy}","received_events_url":"https://api.github.com/users/LeandroGuillen/received_events","type":"User","site_admin":false},"body":"Adapted to both github and dockerhub, some more explanations added, a warning about losing data, etc.","created_at":"2015-07-24T16:25:03Z","updated_at":"2015-08-05T11:42:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74470e9bfd2b76ec45a4e97708d140f391e23fc8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1102/commits","review_comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1102/comments","review_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1102/comments","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/0b29624fd11ef415143fabba857be4a7c9d21c96","head":{"label":"telefonicaid:fix/docker_readme","ref":"fix/docker_readme","sha":"0b29624fd11ef415143fabba857be4a7c9d21c96","user":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"repo":{"id":12808420,"name":"fiware-orion","full_name":"telefonicaid/fiware-orion","owner":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telefonicaid/fiware-orion","description":"FIWARE Orion Context Broker","fork":false,"url":"https://api.github.com/repos/telefonicaid/fiware-orion","forks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/forks","keys_url":"https://api.github.com/repos/telefonicaid/fiware-orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telefonicaid/fiware-orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telefonicaid/fiware-orion/teams","hooks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/hooks","issue_events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/events{/number}","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/events","assignees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/assignees{/user}","branches_url":"https://api.github.com/repos/telefonicaid/fiware-orion/branches{/branch}","tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/tags","blobs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/{sha}","languages_url":"https://api.github.com/repos/telefonicaid/fiware-orion/languages","stargazers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/stargazers","contributors_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contributors","subscribers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscribers","subscription_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscription","commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/comments{/number}","contents_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contents/{+path}","compare_url":"https://api.github.com/repos/telefonicaid/fiware-orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telefonicaid/fiware-orion/merges","archive_url":"https://api.github.com/repos/telefonicaid/fiware-orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telefonicaid/fiware-orion/downloads","issues_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues{/number}","pulls_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls{/number}","milestones_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones{/number}","notifications_url":"https://api.github.com/repos/telefonicaid/fiware-orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels{/name}","releases_url":"https://api.github.com/repos/telefonicaid/fiware-orion/releases{/id}","created_at":"2013-09-13T11:55:25Z","updated_at":"2015-07-28T07:28:30Z","pushed_at":"2015-08-05T11:41:01Z","git_url":"git://github.com/telefonicaid/fiware-orion.git","ssh_url":"git@github.com:telefonicaid/fiware-orion.git","clone_url":"https://github.com/telefonicaid/fiware-orion.git","svn_url":"https://github.com/telefonicaid/fiware-orion","homepage":"http://catalogue.fiware.org/enablers/publishsubscribe-context-broker-orion-context-broker","size":26100,"stargazers_count":26,"watchers_count":26,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":31,"mirror_url":null,"open_issues_count":213,"forks":31,"open_issues":213,"watchers":26,"default_branch":"develop"}},"base":{"label":"telefonicaid:develop","ref":"develop","sha":"63332b0940345349d53ddcc0ca5fc1e89a2e09df","user":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"repo":{"id":12808420,"name":"fiware-orion","full_name":"telefonicaid/fiware-orion","owner":{"login":"telefonicaid","id":968363,"avatar_url":"https://avatars.githubusercontent.com/u/968363?v=3","gravatar_id":"","url":"https://api.github.com/users/telefonicaid","html_url":"https://github.com/telefonicaid","followers_url":"https://api.github.com/users/telefonicaid/followers","following_url":"https://api.github.com/users/telefonicaid/following{/other_user}","gists_url":"https://api.github.com/users/telefonicaid/gists{/gist_id}","starred_url":"https://api.github.com/users/telefonicaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/telefonicaid/subscriptions","organizations_url":"https://api.github.com/users/telefonicaid/orgs","repos_url":"https://api.github.com/users/telefonicaid/repos","events_url":"https://api.github.com/users/telefonicaid/events{/privacy}","received_events_url":"https://api.github.com/users/telefonicaid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/telefonicaid/fiware-orion","description":"FIWARE Orion Context Broker","fork":false,"url":"https://api.github.com/repos/telefonicaid/fiware-orion","forks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/forks","keys_url":"https://api.github.com/repos/telefonicaid/fiware-orion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/telefonicaid/fiware-orion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/telefonicaid/fiware-orion/teams","hooks_url":"https://api.github.com/repos/telefonicaid/fiware-orion/hooks","issue_events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/events{/number}","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/events","assignees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/assignees{/user}","branches_url":"https://api.github.com/repos/telefonicaid/fiware-orion/branches{/branch}","tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/tags","blobs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/refs{/sha}","trees_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/{sha}","languages_url":"https://api.github.com/repos/telefonicaid/fiware-orion/languages","stargazers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/stargazers","contributors_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contributors","subscribers_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscribers","subscription_url":"https://api.github.com/repos/telefonicaid/fiware-orion/subscription","commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/commits{/sha}","git_commits_url":"https://api.github.com/repos/telefonicaid/fiware-orion/git/commits{/sha}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/comments{/number}","issue_comment_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/comments{/number}","contents_url":"https://api.github.com/repos/telefonicaid/fiware-orion/contents/{+path}","compare_url":"https://api.github.com/repos/telefonicaid/fiware-orion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/telefonicaid/fiware-orion/merges","archive_url":"https://api.github.com/repos/telefonicaid/fiware-orion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/telefonicaid/fiware-orion/downloads","issues_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues{/number}","pulls_url":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls{/number}","milestones_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones{/number}","notifications_url":"https://api.github.com/repos/telefonicaid/fiware-orion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels{/name}","releases_url":"https://api.github.com/repos/telefonicaid/fiware-orion/releases{/id}","created_at":"2013-09-13T11:55:25Z","updated_at":"2015-07-28T07:28:30Z","pushed_at":"2015-08-05T11:41:01Z","git_url":"git://github.com/telefonicaid/fiware-orion.git","ssh_url":"git@github.com:telefonicaid/fiware-orion.git","clone_url":"https://github.com/telefonicaid/fiware-orion.git","svn_url":"https://github.com/telefonicaid/fiware-orion","homepage":"http://catalogue.fiware.org/enablers/publishsubscribe-context-broker-orion-context-broker","size":26100,"stargazers_count":26,"watchers_count":26,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":31,"mirror_url":null,"open_issues_count":213,"forks":31,"open_issues":213,"watchers":26,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1102"},"html":{"href":"https://github.com/telefonicaid/fiware-orion/pull/1102"},"issue":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1102"},"comments":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1102/comments"},"review_comments":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1102/comments"},"review_comment":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/pulls/1102/commits"},"statuses":{"href":"https://api.github.com/repos/telefonicaid/fiware-orion/statuses/0b29624fd11ef415143fabba857be4a7c9d21c96"}}}}