Question

How to create docker image using already configured application folder

Posted March 6, 2019 748 views
Docker

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.

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.

×
1 answer

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.

Submit an Answer