λ컀λ μ ν리μΌμ΄μ μ μ μνκ² κ΅¬μΆ, ν μ€νΈ λ° λ°°ν¬ν μ μλ μννΈμ¨μ΄ νλ«νΌμ λλ€. λ컀λ μννΈμ¨μ΄λ₯Ό "컨ν μ΄λ" λΌλ νμ€νλ μ λμΌλ‘ ν¨ν€μ§νλ©°, μ΄ μ»¨ν μ΄λμλ λΌμ΄λΈλ¬λ¦¬, μμ€ν λꡬ, μ½λ, λ°νμ λ± μννΈμ¨μ΄λ₯Ό μ€ννλλ° νμν λͺ¨λ κ²μ΄ ν¬ν¨λμ΄ μμ΅λλ€.
A container is simply another process on your machine that has been isolated from all other processes on the host machine. That isolation leverages kernel namespaces and cgroups, features that have been in Linux for a long time.
컨ν μ΄λλ νΈμ€νΈ OSμμ λ Όλ¦¬μ μΈ κ΅¬ν(컨ν μ΄λ)μ λ§λ€κ³ , μ΄ν리μΌμ΄μ μ μλμν€κΈ° μν΄ νμν λΌμ΄λΈλ¬λ¦¬λ μ΄ν리μΌμ΄μ λ±μ νλλ‘ λͺ¨μ, λ§μΉ λ³λμ μλ²μΈ κ²μ²λΌ μ¬μ©ν μ μκ² λ§λ κ².
컨ν μ΄λ κΈ°μ μ μ¬μ©νλ©΄ OSλ λλ ν 리, IP μ£Όμ λ±κ³Ό κ°μ μμ€ν μμμ λ§μΉ κ° μ΄ν리μΌμ΄μ μ΄ μ μ νκ³ μλ κ² μ²λΌ 보μ΄κ² ν μ μλ€. 컨ν μ΄λλ μ΄ν리μΌμ΄μ μ μ€νμ νμν λͺ¨λμ 컨ν μ΄λλ‘ λͺ¨μ μ μκΈ° λλ¬Έμ, μ¬λ¬κ°μ 컨ν μ΄λλ₯Ό μ‘°ν©ν μ μμ΅λλ€.
When running a container, it uses an isolated filesystem. This custom filesystem is provided by a container image. Since the image contains the container's filesystem, it must contain everything needed to run an application - all dependencies, configuration, scripts, binaries, etc. The image also contains other configuration for the container, such as environment variables, a default command to run, and other metadata.
AWSμμλ AMI(Amazone Machine Image)ννλ‘ μ΄λ―Έμ§λ₯Ό κ΄λ¦¬νκ³ , Dockerμμλ Docker imageννλ‘ μ΄λ―Έμ§λ₯Ό κ΄λ¦¬ν©λλ€.
λ컀 μ΄λ―Έμ§λ 컨ν
μ΄λλ₯Ό μμ±νκΈ° μν΄ νμν μ€κ³λμ κ°μ΅λλ€.
λ컀 μ΄λ―Έμ§λ λ컀 νμΌμ ν΅ν΄ μμ±λλ©°, λ컀 νμΌμμ μμ±ν μ½λ λ μ΄μ΄λ€μ ν΅ν΄ μ΄λ€ λͺ
λ Ήμ μνν μ§ μ ν μ μμ΅λλ€.
Add an EXPOSE instruction in the Dockerfile
Use the βexpose flag at runtime to expose a port
Use the -p flag or -P flag in the Docker run string to publish a port
Docker Containerλ₯Ό μ€νμν€κΈ° μν΄μλ μ΄λ―Έμ§λ₯Ό λ¨Όμ λΉλν΄μ€μΌν©λλ€.
docker build [OPTIONS] PATH | URL | -
λ‘ μ΄λ―Έμ§ λΉλλ₯Ό μ€νν΄μ£Όκ³ ,
λΉλλ μ΄λ―Έμ§λ₯Ό docker run [options] Image[:tag] [command] [arg...]
λ₯Ό ν΅ν΄ λ컀 컨ν
μ΄λλ₯Ό μ€νμν¬ μ μμ΅λλ€.