Skip to content

Instantly share code, notes, and snippets.

@chasseurmic chasseurmic/Rakefile
Created Jan 20, 2015

Embed
What would you like to do?
Rake tasks for building and deploying Rails app
namespace :docker do
desc "Remove docker container"
task :clean do
sh './clean.sh'
end
desc "Build Docker image"
task :build => [:clean] do
sh 'docker build -t localhost:5000/username/repo_name .'
end
desc "Run Docker image"
task :run => [:clean] do
sh 'docker run --name repo_name -p host_port:container_port -d localhost:5000/username/repo_name'
end
desc "Deploy Docker image"
task :deploy => [:build] do
sh './deploy.sh'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.