- person Penulis:
-
Dimas Maryanto
PT. Tabeldata Informatika
- account_balance_wallet Donasi via:
- Saweria a/n Dimas Maryanto
- lock_open Join Premium Members:
- Udemy.com
-
Daftar Materi
-
1. Pengenalan Docker 8
-
2. Docker Registry 3
-
3. Docker Container CLI 8
-
1. Docker CLI (Command Line Interface)
2. Management Docker Container
3. Management Docker Images
4. Run a command in a running container
5. Expose services to outside using ports
6. Copying files/content between container and filesystem
7. Logging, Inspect, & Resource Usage Statistics Containers
8. Run a Container using Environtment File
-
4. Docker Networks 7
-
5. Docker Volumes 5
-
6. Dockerfile 15
-
1. Build Docker Image Overview
2. Usage docker build
3. FROM Instruction
4. Environtment Replacement
5. Copying Resources
6. Excluding files/directories
7. Label Instruction
8. Execution Instruction
9. CMD vs ENTRYPOINT?
10. Exposing Ports
11. User, Volumes and Working Directory
12. Health Check Instruction
13. Multiple Stage Builds
14. Best practices for writing Dockerfiles
15. Best practices for scanning images
-
7. Study Kasus: Build docker image 14
-
1. Build specific docker image by programming languages
2. Build Docker Image for Java Webapp
3. Build Java Web using maven-docker-plugin
4. Build docker image for spring-boot
5. Springboot - using Environtment
6. Springboot - where data such as files/images we stored?
7. Springboot - Using Database
8. Build docker image for Angular Project
9. Angular - Access Rest API
10. Angular - Proxy to backend
11. Build docker image for PHP
12. Build Docker image for Laravel Framework
13. Laravel - Using Frontend & Rest API
14. Laravel - Using Database
-
8. Docker Compose 19
-
1. Overview of Docker Compose
2. Get started with Docker Compose
3. Overview of docker-compose CLI
4. Compose file specification and syntax
5. Environment variables in Compose
6. Volume in Compose
7. Share data between Containers in Compose
8. Using sshfs for share data in Compose
9. Using NFS for share data in Compose
10. Networking Overview in Compose file
11. Network links in Compose file
12. Specify custom networks in Compose file
13. Dependency between services in Compose file
14. Build docker image using Compose file
15. Using profiles with Compose file
16. Multiple Compose files to Add & Override attribute
17. Example use case of multiple compose files
18. Scale services using compose command
19. Use Compose in production
-
9. Study Kasus: Docker Compose 7
-
10. Docker Context 8
-
11. Study Kasus: Docker for CI 8
-
1. Overview of Study Cases using docker for CI
2. Setup environment for CI using Gitlab & Nexus OSS
3. The `.gitlab-ci.yml` file
4. Pipeline: PHP deployment using Gitlab CI
5. Pipeline: Java Web deployment using Gitlab CI
6. Pipeline: spring-boot deploy with Gitlab CI
7. Pipeline: Angular deploy with Gitlab CI
8. Pipeline: Laravel deploy with Gitlab CI
-
12. Docker Machine 7
-
13. Study Kasus: Ansible for Docker 4
-
14. Docker Swarm
- Materi: belum tersedia...
-
15. Study Kasus: Docker Swarm
- Materi: belum tersedia...
-
16. Docker on Cloud using GCP
- Materi: belum tersedia...
- Lastest Posts
- 09 Apr 23 Working with Deployment object
- 26 Feb 23 Study cases: Microservice apps (...
- 05 Feb 23 Welcome to the Nutanix HCF (Hybr...
- 04 Feb 23 Silabus SRE - Nutanix AHV: Pemul...
- 17 Jan 23 What is Workload Resources?
- 17 Jan 23 Overview Kubernetes Workloads re...
- 15 Jan 23 Getting started with Transaction...
- 14 Jan 23 Overview of Concurrency Control
- 14 Jan 23 Time your practice (part 3)
- 08 Jan 23 Cleanup Data from Table
Docker Registry (Docker HUB)
halo semuanya, di materi kali ini kita akan membahas tentang Docker Registry, The Registry is a stateless, highly scalable server side application that stores and lets you distribute Docker images. The Registry is open-source, under the permissive Apache license. Secara default, Docker Registry menggunakan Docker Hub. Ok nah jadi sekarang kita akan membahas:
- Apa itu Official Images
- Apa itu Public Images
- Docker Hub Repository (Public/Private repository)
- How to Sign-up & Sign-in to hub.docker.com
- How to Store your own images to hub.docker.com
Official Image
The Docker Official Images are a curated set of Docker repositories hosted on Docker Hub. They are designed to:
- Provide essential base OS repositories (for example, ubuntu, centos) that serve as the starting point for the majority of users.
- Provide drop-in solutions for popular programming language runtimes, data stores, and other services, similar to what a Platform as a Service (PAAS) would offer.
- Exemplify Dockerfile best practices and provide clear documentation to serve as a reference for other Dockerfile authors.
- Ensure that security updates are applied in a timely manner. This is particularly important as Official Images are some of the most popular on Docker Hub.
Docker, Inc. sponsors a dedicated team that is responsible for reviewing and publishing all content in the Official Images. This team works in collaboration with upstream software maintainers, security experts, and the broader Docker community. If you are new to Docker, we recommend that you use the Official Images in your projects. These images have clear documentation, promote best practices, and are designed for the most common use cases. Advanced users can review the Official Images as part of your Dockerfile learning process.
A common rationale for diverging from Official Images is to optimize for image size. For instance, many of the programming language stack images contain a complete build toolchain to support installation of modules that depend on optimized code. An advanced user could build a custom image with just the necessary pre-compiled libraries to save space.
Berikut adalah contoh official image, jika kita search di halaman hub.docker.com
Public docker images
Selain official docker image, di hub.docker.com ada juga public image yang kita bisa coba, Jadi public docker image ini adalah docker image yang di publish oleh semua orang di seluruh dunia, sebagai contoh klo temen-temen search image mysql
maka yang tampil ada banyak sekali. biasanya public image diawali dengan username/<image-name:tag>
seperti berikut:
Sign-up & Sign-in to registry
Dengan adanya image registry hub seperti Docker Hub, kita bisa berkolaborasi artinya image yang kita publish ke registry bisa digunakan juga oleh orang lain atau ke team (private repository). Nah untuk mempublish kita perlu daftar dulu ke hub.docker.com jika belum punya account, jika sudah kita login dulu login dengan menggunakan perintah
Jika di jalankan hasilnya seperti berikut:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
Loading personal and system profiles took 514ms.
➜ ~ docker login -u dimmaryanto93
Password:
Login Succeeded
Selain menggunakan command berikut kita jika menggunakan Docker Desktop kita bisa login dari menu, Docker Desktop
-> Sign in / Create Docker ID
maka akan muncul seperti berikut:
Store your image to Docker Hub
Untuk menyimpan image ke Docker Hub, kita bisa menyimpan as Public atau Private Repositories. Untuk public repository biasanya bisa digunakan oleh siapapun, sedangkan untuk private repository hanya yang diberikan akses saja. Nah di Docker Hub kita diberikan 1 Private Repository untuk setiap user dan unlimited public repositories. berikut adalah perbandingan Pricing
Untuk mempublish suatu image ke Docker Hub dari image yang telah tersedia atau yang kita build sendiri. kita harus menggunakan Docker ID sebagai identified dalam penamaan imagenya seperti <your-username>/<image-name>:<tag>
Contoh implementasinya seperti berikut:
For Bash script:
For Powershell script:
Jika dijalankan seperti berikut:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
Loading personal and system profiles took 507ms.
➜ ~ ✗ docker pull mysql:5.7
5.7: Pulling from library/mysql
f7ec5a41d630: Pull complete
9444bb562699: Pull complete
6a4207b96940: Pull complete
181cefd361ce: Pull complete
8a2090759d8a: Pull complete
15f235e0d7ee: Pull complete
d870539cd9db: Pull complete
cb7af63cbefa: Pull complete
151f1721bdbf: Pull complete
fcd19c3dd488: Pull complete
415af2aa5ddc: Pull complete
Digest: sha256:a655529fdfcbaf0ef28984d68a3e21778e061c886ff458b677391924f62fb457
Status: Downloaded newer image for mysql:5.7
docker.io/library/mysql:5.7
➜ ~ docker image tag mysql:5.7 dimmaryanto93/mysql:5.7
➜ ~ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
dimmaryanto93/mysql 5.7 87eca374c0ed 4 days ago 447MB
mysql 5.7 87eca374c0ed 4 days ago 447MB
➜ ~ docker push dimmaryanto93/mysql:5.7
The push refers to repository [docker.io/dimmaryanto93/mysql]
065db6810608: Mounted from library/mysql
c72710eaafe9: Mounted from library/mysql
f06c93a4b5ba: Mounted from library/mysql
711202fdcd50: Mounted from library/mysql
1ce52ff7c16f: Mounted from library/mysql
2cb169012988: Mounted from library/mysql
2b1742830571: Mounted from library/mysql
7afbf38fd1da: Mounted from library/mysql
f68961560ec1: Mounted from library/mysql
76233144372b: Mounted from library/mysql
7e718b9c0c8c: Mounted from library/mysql
5.7: digest: sha256:9f768489d306402ea11243f1b96aeaa4696adb9ed7c1bb0318724759b9cbd1a6 size: 2621
Jika di check di website, hasilnya seperti berikut:
Yuk simak juga videonya,
Dan jika temen-temen belajar hal baru kali ini jangan lupa buat Like, Subcribe, dan Share ke temen kalian. Terimakasih!!!