Docker Community Forums

Share and learn in the Docker community.

How to Deploy Self Customized Image


(Kinosa) #1

Hi to everyone here at docker, i’m new to docker, pardon my ignorance. Just trying to find out and learn. question is, if you have your own customize image and you want to deploy that without adding anything else. am still a wee bit lost in this area and looking for directions. my advance thanks for anyone taking this question.


(Martin Terp) #2

Hi

Lets say that you have an image you want to use ( docker images list available images on your host )
You can then: docker run -tid THEIMAGEIDorNAME to start a container with that image.

Is this what you’re asking about?


(Kinosa) #3

Hi Martin, thank you for the respond. to paint a more better picture, say you have a centos on your localhost workstation, and you want to put deploy that because you made some custom builds to that and that is the image you want to deploy. that’s where i am coming from. and i’m not sure from there out. :frowning:


(Martin Terp) #4

If im understanding your correctly, you want the OS of your workstation, and make that a docker image?
You cant :slight_smile:

The way you create docker images, is by using Dockerfile OR what you can do, is to get the centos image, run a container with that image, and install what you need, but the correct way would be a Dockerfile

To download and run container with centos: docker run -ti centos:latest, but again, learn how to do Dockerfiles :slight_smile:


(Kinosa) #5

Hi Martin, u r right in understanding what i was trying to put out, i guess that answers my question. basically what it is, is that i have a vm image of the image and with all the bells and whistles installed in it, i thought i could cut it short by slipping that into a dockerfile, but after much thought i guess it’s quite a fair bit of work involved what should be simple. thank you once again for the idea and the commands for it.
cheers !! :slight_smile:


(Martin Terp) #6

Okay :slight_smile:
The way docker works, is that you split up all the services to different containers, so you have a web container and a database container, and makes those too talk to eachother.
But it is possible to create one container, with all services.


(Kinosa) #7

sometimes infrastructure guys like myself tend to do stuff like that :smile:

but yeah i’m beginning to see the fun side of it and understanding more just playing around with it.