How to create docker image using already configured application folder

March 6, 2019 369 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.

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.

Have another answer? Share your knowledge.