Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.41 KB

File metadata and controls

39 lines (25 loc) · 1.41 KB

Tutorial 1: Building, and pushing docker images to AliCloud's Container Registry

In this tutorial, you will

  • Learn how to build a simple nginx docker image
  • Learn the awesomeness of using alpine base images (they're really small! ~25MB)
  • Learn how to create a container registry in Alicloud
  • Learn how to push docker image to container registry

Step 1:

If you're using Ubuntu 16.04+, you can install docker by running this script. Otherwise, go here

Step 2:

Create a free Alicloud account here

Step 3:

Go to container registry console, and create a namespace. You can call it anything you want. I called mine pandawarrior.

Step 4:

Open your bash terminal and login to your docker registry.

E.g. Assuming that you're using Hangzhou's DC, your login command should look something like this:

docker login --username=${EMAIL} registry-intl.cn-hangzhou.aliyuncs.com

Step 5:

Clone this repo (e.g. git clone https://github.com/ehan1990/alicloud-tutorial.git)

Step 6:

cd to tutorial-1

cd alicloud-tutorial/tutorial-1

Step 6:

Learn some of the useful commands I wrote in the Makefile.

make build-image builds the docker image using alpine as the base image. It's ~25MB.

make run-local