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
If you're using Ubuntu 16.04+, you can install docker by running this script. Otherwise, go here
Create a free Alicloud account here
Go to container registry console, and create a namespace. You can call it anything you want. I called mine pandawarrior.
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
Clone this repo (e.g. git clone https://github.com/ehan1990/alicloud-tutorial.git)
cd to tutorial-1
cd alicloud-tutorial/tutorial-1
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