{"action":"created","comment":{"url":"https://api.github.com/repos/wercker/docs/pulls/comments/33863161","id":33863161,"diff_hunk":"@@ -0,0 +1,104 @@\n+## Internal steps\n+Internal steps are developed by wercker and are baked into the wercker cli as\n+these interact with the Docker API that is external from the container. From a\n+security perspective we don’t want to make this funcionality available from\n+inside the Docker container, and as such have created these internal steps.\n+\n+This article will explain all the different internal steps that are available:\n+\n+* [internal/docker-push](#docker-push)\n+* [internal/docker-scratch-push](#scratch-push)\n+* [internal/watch](#internal-watch)\n+* [internal/shell](#internal-shell)\n+\n+\n+    \n+### <a name=\"docker-push\"></a>internal/docker-push\n+```yaml\n+deploy:\n+  steps:\n+    - internal/docker-push:\n+        username: $USERNAME\n+        password: $PASSWORD\n+        tag: my-amazing-tag\n+        repository: turing/bar\n+        registry: https://registry.hub.docker.com\n+```\n+\n+The `$USERNAME` and `$PASSWORD` fields are environment variables that you\n+should specify through the [wercker web\n+interface](/docs/environment-variables/index.html). The `repo` field contains\n+the repository that you want to push to (in this case the username `turing`\n+with the `bar` image), and `registry` is the URL of your Docker registry.\n+\n+More information about the internal/docker-push step can be found\n+[here](/docs/containers/pushing-containers.html).\n+\n+### <a name=\"scratch-push\" class=\"anchor\"></a>internal/docker-scratch-push\n+The `docker-scratch-push` step works the same as the normal `docker-push` step.\n+The main difference is that this step uses a\n+[scratch](https://docs.docker.com/articles/baseimages/) base image provided by\n+Docker. This image contains only the bare essentials, and as such is very\n+lightweight. To set it up correctly however, it requires some additional steps. \n+\n+To help you build your first scratch-enabled application, you can follow our\n+[tutorial](/quickstarts/advanced/building-minimal-container-with-go.html)\n+\n+### <a name=\"internal-watch\" clacc=\"anchor\"></a>internal/watch\n+The `internal/watch` step gives you a long-running step that can be configured\n+to reload on file changes. A very common use case for this step is frontend\n+development, here's an example from our getting-started-nodejs project:\n+\n+``` yaml\n+box: nodesource/trusty\n+dev:\n+  steps:\n+    - npm-install\n+    - internal/watch:\n+        code: node app.js\n+        reload: true\n+```\n+\n+With this dev pipeline we run one initial setup step, `npm-install`, to prepare\n+our container's environment, then we execute our node app, reloading on changes.\n+\n+To run this, you would do:\n+\n+ `$ wercker dev --publish 5000`\n+\n+And once it loads, browse to your docker host (either localhost on linux, or\n+with boot2docker usually  on 192.168.59.103) on port 5000 to see your app running.\n+For your convenience, we'll tell you the IP once the step runs.\n+\n+As you make changes to your code, the app will be reloaded, but the npm-install\n+steps will not be run again.\n+\n+Without the \"reload: true\" the code will only be run once, which is useful if\n+your development server has its own reloading semantics (or is only loading\n+static files).","path":"content/docs/steps/internal-steps.md","position":78,"original_position":78,"commit_id":"f5ebb4349f02e4109b774c481054a8d9a56336f5","original_commit_id":"f5ebb4349f02e4109b774c481054a8d9a56336f5","user":{"login":"hatchan","id":202981,"avatar_url":"https://avatars.githubusercontent.com/u/202981?v=3","gravatar_id":"","url":"https://api.github.com/users/hatchan","html_url":"https://github.com/hatchan","followers_url":"https://api.github.com/users/hatchan/followers","following_url":"https://api.github.com/users/hatchan/following{/other_user}","gists_url":"https://api.github.com/users/hatchan/gists{/gist_id}","starred_url":"https://api.github.com/users/hatchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hatchan/subscriptions","organizations_url":"https://api.github.com/users/hatchan/orgs","repos_url":"https://api.github.com/users/hatchan/repos","events_url":"https://api.github.com/users/hatchan/events{/privacy}","received_events_url":"https://api.github.com/users/hatchan/received_events","type":"User","site_admin":false},"body":"Also might be a good idea to link to the dev article (and vice versa)","created_at":"2015-07-03T13:20:19Z","updated_at":"2015-07-03T13:20:19Z","html_url":"https://github.com/wercker/docs/pull/249#discussion_r33863161","pull_request_url":"https://api.github.com/repos/wercker/docs/pulls/249","_links":{"self":{"href":"https://api.github.com/repos/wercker/docs/pulls/comments/33863161"},"html":{"href":"https://github.com/wercker/docs/pull/249#discussion_r33863161"},"pull_request":{"href":"https://api.github.com/repos/wercker/docs/pulls/249"}}},"pull_request":{"url":"https://api.github.com/repos/wercker/docs/pulls/249","id":39168736,"html_url":"https://github.com/wercker/docs/pull/249","diff_url":"https://github.com/wercker/docs/pull/249.diff","patch_url":"https://github.com/wercker/docs/pull/249.patch","issue_url":"https://api.github.com/repos/wercker/docs/issues/249","number":249,"state":"open","locked":false,"title":"Internal steps && advanced quickstarts","user":{"login":"Tonnu","id":1899787,"avatar_url":"https://avatars.githubusercontent.com/u/1899787?v=3","gravatar_id":"","url":"https://api.github.com/users/Tonnu","html_url":"https://github.com/Tonnu","followers_url":"https://api.github.com/users/Tonnu/followers","following_url":"https://api.github.com/users/Tonnu/following{/other_user}","gists_url":"https://api.github.com/users/Tonnu/gists{/gist_id}","starred_url":"https://api.github.com/users/Tonnu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tonnu/subscriptions","organizations_url":"https://api.github.com/users/Tonnu/orgs","repos_url":"https://api.github.com/users/Tonnu/repos","events_url":"https://api.github.com/users/Tonnu/events{/privacy}","received_events_url":"https://api.github.com/users/Tonnu/received_events","type":"User","site_admin":false},"body":"Contains:\r\n* Internal step docs\r\n* Advanced quickstarts section\r\n* Article on building minimal containers with Go","created_at":"2015-07-03T11:44:39Z","updated_at":"2015-07-03T13:20:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fbfcec1c4079ee852ac325339f5bafa6ca4f67a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wercker/docs/pulls/249/commits","review_comments_url":"https://api.github.com/repos/wercker/docs/pulls/249/comments","review_comment_url":"https://api.github.com/repos/wercker/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wercker/docs/issues/249/comments","statuses_url":"https://api.github.com/repos/wercker/docs/statuses/f5ebb4349f02e4109b774c481054a8d9a56336f5","head":{"label":"wercker:internal-steps","ref":"internal-steps","sha":"f5ebb4349f02e4109b774c481054a8d9a56336f5","user":{"login":"wercker","id":1695193,"avatar_url":"https://avatars.githubusercontent.com/u/1695193?v=3","gravatar_id":"","url":"https://api.github.com/users/wercker","html_url":"https://github.com/wercker","followers_url":"https://api.github.com/users/wercker/followers","following_url":"https://api.github.com/users/wercker/following{/other_user}","gists_url":"https://api.github.com/users/wercker/gists{/gist_id}","starred_url":"https://api.github.com/users/wercker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wercker/subscriptions","organizations_url":"https://api.github.com/users/wercker/orgs","repos_url":"https://api.github.com/users/wercker/repos","events_url":"https://api.github.com/users/wercker/events{/privacy}","received_events_url":"https://api.github.com/users/wercker/received_events","type":"Organization","site_admin":false},"repo":{"id":25548089,"name":"docs","full_name":"wercker/docs","owner":{"login":"wercker","id":1695193,"avatar_url":"https://avatars.githubusercontent.com/u/1695193?v=3","gravatar_id":"","url":"https://api.github.com/users/wercker","html_url":"https://github.com/wercker","followers_url":"https://api.github.com/users/wercker/followers","following_url":"https://api.github.com/users/wercker/following{/other_user}","gists_url":"https://api.github.com/users/wercker/gists{/gist_id}","starred_url":"https://api.github.com/users/wercker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wercker/subscriptions","organizations_url":"https://api.github.com/users/wercker/orgs","repos_url":"https://api.github.com/users/wercker/repos","events_url":"https://api.github.com/users/wercker/events{/privacy}","received_events_url":"https://api.github.com/users/wercker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wercker/docs","description":"Wercker docs","fork":false,"url":"https://api.github.com/repos/wercker/docs","forks_url":"https://api.github.com/repos/wercker/docs/forks","keys_url":"https://api.github.com/repos/wercker/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wercker/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wercker/docs/teams","hooks_url":"https://api.github.com/repos/wercker/docs/hooks","issue_events_url":"https://api.github.com/repos/wercker/docs/issues/events{/number}","events_url":"https://api.github.com/repos/wercker/docs/events","assignees_url":"https://api.github.com/repos/wercker/docs/assignees{/user}","branches_url":"https://api.github.com/repos/wercker/docs/branches{/branch}","tags_url":"https://api.github.com/repos/wercker/docs/tags","blobs_url":"https://api.github.com/repos/wercker/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wercker/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wercker/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/wercker/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wercker/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/wercker/docs/languages","stargazers_url":"https://api.github.com/repos/wercker/docs/stargazers","contributors_url":"https://api.github.com/repos/wercker/docs/contributors","subscribers_url":"https://api.github.com/repos/wercker/docs/subscribers","subscription_url":"https://api.github.com/repos/wercker/docs/subscription","commits_url":"https://api.github.com/repos/wercker/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/wercker/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/wercker/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/wercker/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/wercker/docs/contents/{+path}","compare_url":"https://api.github.com/repos/wercker/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wercker/docs/merges","archive_url":"https://api.github.com/repos/wercker/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wercker/docs/downloads","issues_url":"https://api.github.com/repos/wercker/docs/issues{/number}","pulls_url":"https://api.github.com/repos/wercker/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/wercker/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/wercker/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wercker/docs/labels{/name}","releases_url":"https://api.github.com/repos/wercker/docs/releases{/id}","created_at":"2014-10-21T21:53:24Z","updated_at":"2015-06-24T02:02:43Z","pushed_at":"2015-07-03T12:54:54Z","git_url":"git://github.com/wercker/docs.git","ssh_url":"git@github.com:wercker/docs.git","clone_url":"https://github.com/wercker/docs.git","svn_url":"https://github.com/wercker/docs","homepage":"http://devcenter.wercker.com/","size":7672,"stargazers_count":8,"watchers_count":8,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":20,"forks":11,"open_issues":20,"watchers":8,"default_branch":"master"}},"base":{"label":"wercker:master","ref":"master","sha":"5eeeb366970b156388a520bc12f0ce9f215f7d85","user":{"login":"wercker","id":1695193,"avatar_url":"https://avatars.githubusercontent.com/u/1695193?v=3","gravatar_id":"","url":"https://api.github.com/users/wercker","html_url":"https://github.com/wercker","followers_url":"https://api.github.com/users/wercker/followers","following_url":"https://api.github.com/users/wercker/following{/other_user}","gists_url":"https://api.github.com/users/wercker/gists{/gist_id}","starred_url":"https://api.github.com/users/wercker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wercker/subscriptions","organizations_url":"https://api.github.com/users/wercker/orgs","repos_url":"https://api.github.com/users/wercker/repos","events_url":"https://api.github.com/users/wercker/events{/privacy}","received_events_url":"https://api.github.com/users/wercker/received_events","type":"Organization","site_admin":false},"repo":{"id":25548089,"name":"docs","full_name":"wercker/docs","owner":{"login":"wercker","id":1695193,"avatar_url":"https://avatars.githubusercontent.com/u/1695193?v=3","gravatar_id":"","url":"https://api.github.com/users/wercker","html_url":"https://github.com/wercker","followers_url":"https://api.github.com/users/wercker/followers","following_url":"https://api.github.com/users/wercker/following{/other_user}","gists_url":"https://api.github.com/users/wercker/gists{/gist_id}","starred_url":"https://api.github.com/users/wercker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wercker/subscriptions","organizations_url":"https://api.github.com/users/wercker/orgs","repos_url":"https://api.github.com/users/wercker/repos","events_url":"https://api.github.com/users/wercker/events{/privacy}","received_events_url":"https://api.github.com/users/wercker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wercker/docs","description":"Wercker docs","fork":false,"url":"https://api.github.com/repos/wercker/docs","forks_url":"https://api.github.com/repos/wercker/docs/forks","keys_url":"https://api.github.com/repos/wercker/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wercker/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wercker/docs/teams","hooks_url":"https://api.github.com/repos/wercker/docs/hooks","issue_events_url":"https://api.github.com/repos/wercker/docs/issues/events{/number}","events_url":"https://api.github.com/repos/wercker/docs/events","assignees_url":"https://api.github.com/repos/wercker/docs/assignees{/user}","branches_url":"https://api.github.com/repos/wercker/docs/branches{/branch}","tags_url":"https://api.github.com/repos/wercker/docs/tags","blobs_url":"https://api.github.com/repos/wercker/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wercker/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wercker/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/wercker/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wercker/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/wercker/docs/languages","stargazers_url":"https://api.github.com/repos/wercker/docs/stargazers","contributors_url":"https://api.github.com/repos/wercker/docs/contributors","subscribers_url":"https://api.github.com/repos/wercker/docs/subscribers","subscription_url":"https://api.github.com/repos/wercker/docs/subscription","commits_url":"https://api.github.com/repos/wercker/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/wercker/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/wercker/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/wercker/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/wercker/docs/contents/{+path}","compare_url":"https://api.github.com/repos/wercker/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wercker/docs/merges","archive_url":"https://api.github.com/repos/wercker/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wercker/docs/downloads","issues_url":"https://api.github.com/repos/wercker/docs/issues{/number}","pulls_url":"https://api.github.com/repos/wercker/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/wercker/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/wercker/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wercker/docs/labels{/name}","releases_url":"https://api.github.com/repos/wercker/docs/releases{/id}","created_at":"2014-10-21T21:53:24Z","updated_at":"2015-06-24T02:02:43Z","pushed_at":"2015-07-03T12:54:54Z","git_url":"git://github.com/wercker/docs.git","ssh_url":"git@github.com:wercker/docs.git","clone_url":"https://github.com/wercker/docs.git","svn_url":"https://github.com/wercker/docs","homepage":"http://devcenter.wercker.com/","size":7672,"stargazers_count":8,"watchers_count":8,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":20,"forks":11,"open_issues":20,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wercker/docs/pulls/249"},"html":{"href":"https://github.com/wercker/docs/pull/249"},"issue":{"href":"https://api.github.com/repos/wercker/docs/issues/249"},"comments":{"href":"https://api.github.com/repos/wercker/docs/issues/249/comments"},"review_comments":{"href":"https://api.github.com/repos/wercker/docs/pulls/249/comments"},"review_comment":{"href":"https://api.github.com/repos/wercker/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wercker/docs/pulls/249/commits"},"statuses":{"href":"https://api.github.com/repos/wercker/docs/statuses/f5ebb4349f02e4109b774c481054a8d9a56336f5"}}}}