Skip to content

Instantly share code, notes, and snippets.

@timkelty
Created February 4, 2015 03:09
Show Gist options
  • Save timkelty/92af884f3e6163c6c48e to your computer and use it in GitHub Desktop.
Save timkelty/92af884f3e6163c6c48e to your computer and use it in GitHub Desktop.
var imageName, containerName;
var pull = function pull() {
return shipit.remote("docker pull " + imageName);
};
var rm = function rm() {
return shipit.remote("docker rm -f " + containerName + " || true");
};
var run = function run() {
return shipit.remote("docker run -d -p 11000:11000 --name " + containerName + " " + imageName);
};
shipit.task("deploy", function() {
return pull()
.then(rm)
.then(run)
.then(function () {
shipit.log('Done!');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment