Docker Images
Understanding how application code and dependencies are packaged into immutable container images.
CONTAINERIZATION
Learning how to package applications into portable, reproducible containers using Docker.
$ docker build -t omkarlabs .
[+] Building container image...
$ docker images
omkarlabs:latest
$ docker run -p 8080:8080 omkarlabs
● Container running on port 8080
$ _
DOCKER LAB
Building practical Docker knowledge through hands-on container projects.
Understanding how application code and dependencies are packaged into immutable container images.
Running isolated application environments using Docker containers.
Creating reproducible container builds using Dockerfiles and layered images.
Understanding ports, bridge networks, container communication and service connectivity.
Learning how persistent application data can be stored outside the container lifecycle.
Publishing Docker images to registries such as Google Artifact Registry.
REAL-WORLD PROJECT
The Omkar Labs website is being used as a practical Docker learning project.
The static website is packaged into a Docker image and served using Nginx.
The same container can then be tested locally before being deployed to Google Cloud Run.
DOCKERFILE
A simple Nginx-based container suitable for the Omkar Labs static site.
FROM nginx:alpine
COPY . /usr/share/nginx/html
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
CONTAINER WORKFLOW
Create a Docker image from the application source code and Dockerfile.
Start the container locally and verify application behaviour.
Check HTTP connectivity, ports, logs and application health.
Push the container image to a container registry.
Deploy the container to Google Cloud Run.
Monitor logs, traffic, revisions and resource usage.
DOCKER CLI
$ docker --version
$ docker build -t omkarlabs .
$ docker images
$ docker run -p 8080:8080 omkarlabs
$ docker ps
$ docker logs CONTAINER_ID
$ docker stop CONTAINER_ID
$ docker rm CONTAINER_ID
● Docker Lab Ready
CONTAINER CONCEPTS
Containers share the host operating system kernel and package only the application and its dependencies.
Virtual machines include a complete guest operating system on top of virtualized hardware.
DOCKER ROADMAP
Images · Containers · Dockerfile · Ports · Logs · Volumes
Docker Compose · Networks · Multi-stage builds · Image optimisation
Artifact Registry · Cloud Run · CI/CD · GitHub Actions · Kubernetes
KEEP BUILDING
Learn Docker today. Deploy to the cloud tomorrow.
Explore GCP