BYU-Broadcast/Bi-Weekly Training

[Training] Docker Basics

brightlightkim 2022. 4. 22. 03:36

Docker

  • Short answer: lightweight linux VMs
  • Long answer: Docker is a system for building and running Containers
  • You can think of them as small containers

Containers instead VMs?

  • Portable
    • Development environment can be guaranteed to behave like your production environment
  • Scalable
    • Cloud providers can quickly add or remove more containers to meet demand
  • Lightweight
    • You only run what you need to
  • Composable
    • You can pull an existing container with most of what you need so you didn't start from scratch

Important Concepts

  • Container
    • a standalone executable package of software
  • Image
    • template with instructions for creating a container
  • Docker Hub
    • It's like a github for docker images. Images can be private or public
    • Docker webiste to get open source images
  • ECR
    • Elastic Container Registry. Similar to Docker Hub, but on AWS.
    • Private way of uploading Docker
  • ECS (Recommended Version)
    • Elastic Container Service: an AWS system for hosting containers.
      • We are moving to this way
    • Amazon ECO System
  • Kubernetes
    • a popular sofware for hosting containers in a way that's scalable and portable
    • downside: complex
  • Depends on the Configuration (Kubernetes >> dedicated to clusters) >> might lower cost and higher performance, but developer time (expansive >> easier to use feature)

 

DEMO

  • How to Dockerize? Make my website run on the Docker Container
    • Create a Docker File
      • FROM httpd:2.4 (Image)
        • Start from this image
      • COPY [Location]
        • Copy my website to default place
    • Then run with command "docker build -t"
      • Create a docker of cheat-codes
    • "docker run --name [memorable name]"
      • or we can run it with "docker run --publish [portNumber] [ID of the image]"
        • feed port 80 >> default http (can be hidden from the command line)
        • ex: 8080:80 forward to 80
        • It can be just the name
  • Then it will be employed every place same from docker hub 
  • Expand it and build on it were possible.

 

SYNTAX to check for

  • How to Dockerize? Make my website run on the Docker Container
    • Push and Pull (Look at their projects)
  • yml files && Docker Hub

 

Containers vs Lambda

  • Lambdas are usually cheaper but Containers are faster

 

'BYU-Broadcast > Bi-Weekly Training' 카테고리의 다른 글

[Bi-Weekly Training] CI/CD Principles for Containers  (0) 2022.06.03
[Bi-Weekly Training] Front-end Training  (0) 2022.05.12
Shell Training  (0) 2022.05.06