Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm having a bit of a difficult time understanding how I can leverage my existing infrastructure code with Docker.

I have a Ruby on Rails app that uses capistrano to push out deployments. I want to use this capistrano script to create a new docker image. Can I push out a deploy and then use the deployed to directory to deploy on top of an existing image say, precise (since that matches my target OS).

Would this be the right approach or am I missing something?

share|improve this question
1  
If you want to continue using capistrano to deploy your application, what role do you see docker playing? –  sciurus Mar 10 '14 at 0:32
    
@sciurus My application exists in two states - checked out from git for "development", or "deployed" via capistrano. I'm not sure how the "deployed" version differs from the "development" version. I want to take the "deployed" version and dockerify it. Then to "deploy" to other machines I could pass the docker image around. –  EightyEight Mar 10 '14 at 4:31

1 Answer 1

Usually in Docker the preferred way to deploy an application in a container is by a dockerfile, that can replace the role of a capistrano script, mainly running commands on the container (install packages, perform git clone, start services and applications and so on).

You define a dockerfile with a base image container and a list of commands to execute and then you build your container by:

docker build {{your_repository_containing_dockerfile}}

So you can translate your capistrano script to a dockerfile and replace Capistrano deploy with Docker deploy.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.