Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 15 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
15
Dung lượng
4,45 MB
Nội dung
TRƯỜNG ĐẠI HỌC CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG VIỆT – HÀN KHOA KHOA HỌC MÁY TÍNH Deploy and Configuration Docker Container Platform Students Lecturer : : Trần Thế Ngun Hản 20IT476 Mai Thanh Trí Đơng 20IT838 Lê Thị Thúy Hiền 20IT830 Trần Thị Khánh Linh Dr Nguyễn Hữu Nhật Minh 20IT903 Đà Nẵng, tháng 10 năm 2022 TRƯỜNG ĐẠI HỌC CÔNG NGHỆ THÔNG TIN VÀ TRUYỀN THÔNG VIỆT – HÀN KHOA KHOA HỌC MÁY TÍNH Deploy and Configuration Docker Container Platform Students Lecturer : : Trần Thế Nguyên Hản 20IT476 Mai Thanh Trí Đơng 20IT838 Lê Thị Thúy Hiền 20IT830 Trần Thị Khánh Linh 20IT903 Dr Nguyễn Hữu Nhật Minh Đà Nẵng, tháng 10 năm 2022 Table of contents 1.Docker Overview 1.1 Get Docker 1.2 Docker Desktop 1.3 Docker Object: 1.3.1 Container: 1.3.2 Image: 4 5 2.Install Docker Desktop 1.1 System requirements 1.2 Install Docker 6 Configuration Docker Container Platform 3.1 Docker file: 3.2 Docker-composes 11 11 12 Run service on docker 13 Tài liệu tham khảo 15 Docker Overview 1.1 Get Docker Docker is an open platform for developing, shipping, and running applications Docker enables you to separate your applications from your infrastructure so you can deliver software quickly With Docker, you can manage your infrastructure in the same ways you manage your applications By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production You can download and install Docker on multiple platforms Refer to the following section and choose the best installation path for you 1.2 Docker Desktop An easy-to-install application that runs on Linux, macOS, and Windows systems It enables one to build and share containerized applications The components included in Docker Desktop are: ● ● ● ● ● ● Docker Engine Docker CLI client Docker Compose Docker Content Trust Kubernetes Credential Helper Docker Desktop works with your choice of development tools and languages and gives you access to a vast library of certified images and templates in Docker Hub This enables development teams to extend their environment to rapidly auto-build, continuously integrate, and collaborate using a secure repository 1.3 Docker Object: 1.3.1 Container: A container is a runnable instance of an image You can create, start, stop, move, or delete a container using the Docker API or CLI You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state By default, a container is relatively well isolated from other containers and its host machine You can control how isolated a container’s network, storage, or other underlying subsystems are from other containers or from the host machine A container is defined by its image as well as any configuration options you provide to it when you create or start it When a container is removed, any changes to its state that are not stored in persistent storage disappear 1.3.2 Image: An image is a read-only template with instructions for creating a Docker container Often, an image is based on another image, with some additional customization For example, you may build an image which is based on the ubuntu image, but installs the Apache web server and your application, as well as the configuration details needed to make your application run You might create your own images or you might only use those created by others and published in a registry To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it Each instruction in a Dockerfile creates a layer in the image When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt This is part of what makes images so lightweight, small, and fast when compared to other virtualization technologies Install Docker Desktop 1.1 System requirements This setup will work best if your Linux host meets the below specifications: ● 64-bit kernel and CPU support for virtualization ● Memory above 4GBQEMU must be version 5.2 or newer ● Gnome or KDE Desktop environment ● Systemd init system ● KVM virtualization supports The above is required since Docker Desktop for Linux runs a Virtual Machine (VM).To load the KVM module manually, run the command: Check if the module is enabled Add your system user to the KVM group 1.2 Install Docker a Install Docker Engine Proceed and set up the Docker repository on Ubuntu 22.04|20.04|18.04 First, remove the existing repository Install the required packages: Add the Docker repository Install Docker on Ubuntu with the command: Add your user account to docker group: b Install Docker Desktop on Ubuntu Now download the latest Docker Desktop package Copy the link to the latest Debian package and download with wget Uninstall the previous installations of Docker Desktop tech, preview or beta versions: Clean up the system and completely remove the data files: For those using non-Gnome Desktop environments, you need to install the package below: Once downloaded, execute the command below to install Docker Desktop Accept the installation of any dependencies required: After the execution, a new entry is added in the /etc/hosts for Kubernetes as shown: c Launch and Use Docker Desktop 3.Configuration Docker Container Platform 3.1 Docker file: 3.2 Docker-composes Run service on docker Tài liệu tham khảo https://docs.docker.com/get-started/ https://computingforgeeks.com/install-docker-desktop-on-ubuntu/