Cloud Native 10 min read

How to Build, Tag, and Push Docker Images to Alibaba Cloud Registry

This guide walks through building a Docker image, logging into Docker Hub or Alibaba Cloud Registry, tagging the image, pushing it to the remote repository, pulling it back, and also covers basic BusyBox usage, USTC mirror setup for Docker, and fast installation of Docker‑Compose.

Open Source Tech Hub
Open Source Tech Hub
Open Source Tech Hub
How to Build, Tag, and Push Docker Images to Alibaba Cloud Registry

Docker Official Registry

Follow these steps to create and manage an image on Docker Hub.

Build the image:

docker build --rm --no-cache -t tinywan/dnmp:php7.2-v1 .

Log in to the registry:

docker login --username=tinywan --password=tinywan123

List local images to verify the build:

$ docker images
REPOSITORY          TAG          IMAGE ID   CREATED        SIZE
tinywan/dnmp        php7.2-v3    3fd6c1dc1321   2 minutes ago   837MB

Tag the image for the remote repository: docker tag 3fd6c1dc1321 tinywan/dnmp:php7.2-v3 Push the image: docker push tinywan/dnmp:php7.2-v3 Pull the image from the registry:

docker pull tinywan/dnmp:php7.2-v3

Alibaba Cloud Registry (Recommended)

Log in to Alibaba Cloud Docker Registry:

sudo docker login [email protected] registry.cn-beijing.aliyuncs.com

Tag the local image for the Alibaba Cloud repository:

docker tag ef20a9366f62 registry.cn-beijing.aliyuncs.com/tinywan/dnmp:php7.2-v3

Push the image:

docker push registry.cn-beijing.aliyuncs.com/tinywan/dnmp:php7.2-v3

Pull the image back:

docker pull registry.cn-beijing.aliyuncs.com/tinywan/dnmp:php7.2-v3
public repository setting is required; otherwise you must log in before pulling.

Base Images

BusyBox Image

Ideal for experimental environments.

Provides a compact set of over a hundred common Linux commands in a single executable.

Runs on many POSIX‑compatible systems such as Linux (including Android), Hurd, FreeBSD, etc.

Combines simple tools (cat, echo) with more complex ones (grep, find, mount, telnet) – often called the "Swiss army knife" of Linux.

Example usage:

docker exec -it box001 bash

Installing Docker with USTC Mirror

Replace the default apt source with the USTC mirror and update the package list:

vim /etc/apt/sources.list

deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu bionic stable

sudo apt-get update

Installing Docker‑Compose in China

Docker‑Compose binaries are hosted on GitHub and can be unstable; the following command downloads a fast mirror from DaoCloud:

sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.23.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
DockerAlibaba CloudDocker ComposeContainer Registrybusybox
Open Source Tech Hub
Written by

Open Source Tech Hub

Sharing cutting-edge internet technologies and practical AI resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.