{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/1809","repository_url":"https://api.github.com/repos/docker/compose","labels_url":"https://api.github.com/repos/docker/compose/issues/1809/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/1809/comments","events_url":"https://api.github.com/repos/docker/compose/issues/1809/events","html_url":"https://github.com/docker/compose/issues/1809","id":99211391,"node_id":"MDU6SXNzdWU5OTIxMTM5MQ==","number":1809,"title":"Execute a command after run","user":{"login":"ahmet2mir","id":7580541,"node_id":"MDQ6VXNlcjc1ODA1NDE=","avatar_url":"https://avatars1.githubusercontent.com/u/7580541?v=4","gravatar_id":"","url":"https://api.github.com/users/ahmet2mir","html_url":"https://github.com/ahmet2mir","followers_url":"https://api.github.com/users/ahmet2mir/followers","following_url":"https://api.github.com/users/ahmet2mir/following{/other_user}","gists_url":"https://api.github.com/users/ahmet2mir/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmet2mir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmet2mir/subscriptions","organizations_url":"https://api.github.com/users/ahmet2mir/orgs","repos_url":"https://api.github.com/users/ahmet2mir/repos","events_url":"https://api.github.com/users/ahmet2mir/events{/privacy}","received_events_url":"https://api.github.com/users/ahmet2mir/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":90,"created_at":"2015-08-05T14:02:02Z","updated_at":"2018-12-16T14:07:33Z","closed_at":"2015-10-16T18:58:57Z","author_association":"NONE","body":"Hi,\n\nIt will be very helpful to have something like \"onrun\" in the YAML to be able to run commands after the run. Similar to https://github.com/docker/docker/issues/8860\n\n```\nmongodb:\n    image: mongo:3.0.2\n    hostname: myhostname\n    domainname: domain.lan\n    volumes:\n        - /data/mongodb:/data\n    ports:\n        - \"27017:27017\" \n    onrun:\n        - mongodump --host db2dump.domain.lan --port 27017 --out /data/mongodb/dumps/latest\n        - mongorestore -d database /data/mongodb/dumps/latest/database\n```\n\nAfter the mongodb start, It will dump db2dump.domain.lan and restore it.\n\nWhen I will stop and then start the container, onrun part will no be executed to preserve idempotency.\n"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/447646162","html_url":"https://github.com/docker/compose/issues/1809#issuecomment-447646162","issue_url":"https://api.github.com/repos/docker/compose/issues/1809","id":447646162,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzY0NjE2Mg==","user":{"login":"rm-rf-etc","id":5067463,"node_id":"MDQ6VXNlcjUwNjc0NjM=","avatar_url":"https://avatars0.githubusercontent.com/u/5067463?v=4","gravatar_id":"","url":"https://api.github.com/users/rm-rf-etc","html_url":"https://github.com/rm-rf-etc","followers_url":"https://api.github.com/users/rm-rf-etc/followers","following_url":"https://api.github.com/users/rm-rf-etc/following{/other_user}","gists_url":"https://api.github.com/users/rm-rf-etc/gists{/gist_id}","starred_url":"https://api.github.com/users/rm-rf-etc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rm-rf-etc/subscriptions","organizations_url":"https://api.github.com/users/rm-rf-etc/orgs","repos_url":"https://api.github.com/users/rm-rf-etc/repos","events_url":"https://api.github.com/users/rm-rf-etc/events{/privacy}","received_events_url":"https://api.github.com/users/rm-rf-etc/received_events","type":"User","site_admin":false},"created_at":"2018-12-16T14:07:33Z","updated_at":"2018-12-16T14:07:33Z","author_association":"NONE","body":"@shin-, I followed your link and I don't see how the user property is relevant to setting the owner of a bind mounted directory. Seems to be related to ports.\r\n\r\nRe: attitude: Looks like people agree with me, so take it as strong feedback. Sorry if you don't like how I'm expressing this, but it just really seems that the user demands are being ignored, so what else do you expect?"}}
{"actor":{"display_login":"rm-rf-etc"}}