Cloud Native 10 min read

Why Containers Matter: From Docker Basics to Kubernetes Orchestration

This lesson introduces container technology, explains Docker’s core concepts, image layering, Dockerfile syntax, and common commands, while also showing how Kubernetes scales container management for cloud‑native applications. It highlights the advantages over traditional VMs, resource utilization improvements, and practical examples for building and running container images.

UCloud Tech
UCloud Tech
UCloud Tech
Why Containers Matter: From Docker Basics to Kubernetes Orchestration

Course Overview

“U创营” is a cloud‑computing introductory series for university students, combining video, text and hands‑on labs to bridge theory and practice.

Lecture 9 – Introduction to Containers

Containers share server resources like virtualization but provide greater flexibility and efficiency. Compared with hypervisor‑based VMs, containers raise resource utilization from 10‑20% to 40‑50%.

Advantages of Containers

Eliminate the need for a full OS per instance, reducing I/O overhead.

Focus on the application layer; middleware and OS issues are handled by Docker.

Self‑contained dependencies make containers a cornerstone of cloud‑native applications.

Docker Core Concepts

Docker’s most widely used engine consists of three main objects:

Image

Container

Registry

Docker images are built from a Dockerfile. Example:

FROM uhub.service.ucloud.cn/hello/maven:3-jdk-8-alpine
WORKDIR /usr/src/app
COPY target /usr/src/app
COPY lib/jmx_prometheus_javaagent-0.12.0.jar /usr/src/app
COPY yaml/javaagent.yaml /usr/src/app

ENV PORT 8080
EXPOSE $PORT
ENV JMXPORT 9090
EXPOSE $JMXPORT
CMD ["sh","-c","java -javaagent:jmx_prometheus_javaagent-0.12.0.jar=${JMXPORT}:javaagent.yaml   -jar /usr/src/app/demo-0.0.1-SNAPSHOT.jar -Dserver.port=${PORT} --spring.config.location=/etc/appconfig/hello.properties"]

Common Dockerfile instructions include FROM , WORKDIR , RUN , CMD / ENTRYPOINT , ADD / COPY , ENV , and EXPOSE .

Docker Workflow

docker build – create an image from a Dockerfile.

docker tag – label the image with a version.

docker push / docker pull – upload to or download from a registry.

docker run – start a container from an image.

Additional commands such as docker stop , docker start , docker restart , and docker commit are less frequently used.

Docker Architecture

Docker client sends commands to the Docker engine, which delegates to containerd and runc. containerd‑shim decouples the daemon from the container process, allowing upgrades without stopping containers.

From Docker to Kubernetes

When container instances scale, manual management becomes impractical; Kubernetes provides orchestration, deployment, and lifecycle management for large‑scale container fleets.

cloud-nativeDockerKubernetesDevOpsDockerfile
UCloud Tech
Written by

UCloud Tech

UCloud is a leading neutral cloud provider in China, developing its own IaaS, PaaS, AI service platform, and big data exchange platform, and delivering comprehensive industry solutions for public, private, hybrid, and dedicated clouds.

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.