Report this

What is the reason for this report?

How to create docker image using already configured application folder

Posted on March 6, 2019

My basic requirement is to create a docker image and deploy it to docker registry.

I have a pre-configured application folder(/home/myfolder) in my jenkins server(to do this configuration I have used ansible script). Then I need to create docker image from that folder and deploy it to docker registry.

What’s the best way to do this? Please help me with this as I’m new to docker.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I suggest that you create a Dockerfile inside that directory and install docker-compose. That way you will be able to create your own image and after that login to the container which should have everything you need. This is a basic start. I do warn you however that you have to pay attention because dockerfile build sometimes likes to disperse files and folders differently unlike in your real setup.

This link should shed some light for you: https://docs.docker.com/compose/gettingstarted/

If you have any other question please write it down. I will be happy to answer what I know.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.