{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/23638","labels_url":"https://api.github.com/repos/saltstack/salt/issues/23638/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/23638/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/23638/events","html_url":"https://github.com/saltstack/salt/issues/23638","id":75878094,"number":23638,"title":"Documentation: docker.running \"port_bindings\" vs \"ports\" ","user":{"login":"tkent-xetus","id":8021697,"avatar_url":"https://avatars.githubusercontent.com/u/8021697?v=3","gravatar_id":"","url":"https://api.github.com/users/tkent-xetus","html_url":"https://github.com/tkent-xetus","followers_url":"https://api.github.com/users/tkent-xetus/followers","following_url":"https://api.github.com/users/tkent-xetus/following{/other_user}","gists_url":"https://api.github.com/users/tkent-xetus/gists{/gist_id}","starred_url":"https://api.github.com/users/tkent-xetus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkent-xetus/subscriptions","organizations_url":"https://api.github.com/users/tkent-xetus/orgs","repos_url":"https://api.github.com/users/tkent-xetus/repos","events_url":"https://api.github.com/users/tkent-xetus/events{/privacy}","received_events_url":"https://api.github.com/users/tkent-xetus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Documentation","name":"Documentation","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Help%20Wanted","name":"Help Wanted","color":"009800"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P3","name":"P3","color":"0a3d77"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":2776,"closed_issues":3009,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-12-03T23:08:34Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2015-05-13T07:16:10Z","updated_at":"2015-12-04T10:29:15Z","closed_at":null,"body":"Pre salt 2015.2.0, the `docker.running` state required that `port_bindings` be used to define port mappings for docker. This was confusing because the documentation referenced `ports` and `port_bindings` (but `ports` in more places than `port_bindings`) and showed examples of both a dictionary and an ordered dictionary in the examples. See #21572 for references on the confusion.\r\n\r\nAfter salt 2015.2.0 `port_bindings` are now ignored and `ports` must be used instead. This is a much nicer key name to use, but the documentation still shows two different keys and two different dictionary formats. This, coupled with the many references to `port_bindings` you get with a quick google, makes things really confusing.\r\n\r\nIt would be great if the documentation was made consistent to just say `ports`.\r\n\r\nP.S. While the change makes sense, the lack of backwards compatibility for those of us with 20+ docker states in different formulas is kinda rough. A warning message of future deprecation, with continued support, would really be appreciated for things like this."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/161931834","html_url":"https://github.com/saltstack/salt/issues/23638#issuecomment-161931834","issue_url":"https://api.github.com/repos/saltstack/salt/issues/23638","id":161931834,"user":{"login":"Deshke","id":1473225,"avatar_url":"https://avatars.githubusercontent.com/u/1473225?v=3","gravatar_id":"","url":"https://api.github.com/users/Deshke","html_url":"https://github.com/Deshke","followers_url":"https://api.github.com/users/Deshke/followers","following_url":"https://api.github.com/users/Deshke/following{/other_user}","gists_url":"https://api.github.com/users/Deshke/gists{/gist_id}","starred_url":"https://api.github.com/users/Deshke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deshke/subscriptions","organizations_url":"https://api.github.com/users/Deshke/orgs","repos_url":"https://api.github.com/users/Deshke/repos","events_url":"https://api.github.com/users/Deshke/events{/privacy}","received_events_url":"https://api.github.com/users/Deshke/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T10:29:14Z","updated_at":"2015-12-04T10:29:14Z","body":"below my docker state.  as you can see i do remove it before i start another :) and it don't matter if i run docker.running or docker.installed it ends up on the same side.\r\n\r\nbtw. i'm currently running docker 1.9.1 with docker-py 1.6.0 (what is as of 2015-12-04 the current version https://github.com/docker/docker-py/releases)\r\n\r\n```yml\r\n#   mem_limit: !!null // until https://github.com/saltstack/salt/issues/25492 is fixed\r\n# docker images -q |xargs docker rmi:\r\n#   cmd.run:\r\n#   - order: 0\r\nstop-old-container:\r\n  docker.absent:\r\n    - name: vimage\r\n{% if grains['environment'] == 'live' %}\r\nvimage-live-image:\r\n  docker.pulled:\r\n    - tag: 11c1913-1510281533\r\n    - name: registry_host.tld:5043/user/vimage_live\r\n{% elif grains['environment'] == 'preview' %}\r\nvimage-preview-image:\r\n  docker.pulled:\r\n    - tag: 11c1913-1510290916\r\n    - name: registry_host.tld:5043/user/vimage_preview\r\n{% elif grains['environment'] == 'stage' %}\r\n{% elif grains['environment'] == 'dev' %}\r\n{% endif %}\r\nvimage-preview-container:\r\n  docker.running:\r\n    - container: vimage\r\n    {% if grains['environment'] == 'live' %}\r\n    - image: registry_host.tld:5043/user/vimage_live:11c1913-1510281533\r\n    {% elif grains['environment'] == 'preview' %}\r\n    - image: registry_host.tld:5043/user/vimage_preview:11c1913-1510290916\r\n    {% elif grains['environment'] == 'stage' %}\r\n    {% elif grains['environment'] == 'dev' %}\r\n    {% endif %}\r\n    - mem_limit: !!null\r\n    - restart_policy:     \r\n      MaximumRetryCount: 3,\r\n      Name: always\r\n    - ports:\r\n      - \"80/tcp\":\r\n            HostIp: \"\"\r\n            HostPort: \"80\"\r\n      - \"1935/tcp\":\r\n            HostIp: \"\"\r\n            HostPort: \"1935\"\r\n      - \"443/tcp\":\r\n            HostIp: \"\"\r\n            HostPort: \"443\"\r\n    - publish_all_ports: true\r\n```"}}