Docker Build a Ubuntu Image

In the previous article, I showed you how to install Docker and clone first image to local machine. So now, I will show you how to push a Ubuntu image to Docker Repository

It’s not about “having” time. It’s about making time

 

At first, please make sure that you had a account at docker.com (if not, please create one, it is free)

Lets start with Docker Login command in local machine:

For example, you need build a Ubuntu image that contains Apache2 web server. You create a Docker build file firstly.

Add content below to Docker build file:

Run build a Docker Ubuntu Image:

And test and install some packet if you want:

Finnaly, commit & push your Ubuntu Image to your Docker Repository:

Note:  thanhson1085/webserver was created in your repositories at docker.com

That is all, love Docker at the first eye.