컨테이너화와 가상화 개념
Julia Ostheimer
Freelance AI Consultant







FROM 명령어FROM COPY RUNENTRYPOINT문법:
FROM <name_of_image>
예시:
# Define the image on which to build
FROM python:3.10
문법:
COPY <source> <destination>
예시:
# Copy files/folders to the main folder of the container
COPY . .
문법:
RUN <command>
예시:
# Install the application's dependencies
RUN pip install -r requirements.txt
문법:
ENTRYPOINT ["command", "argument"]
예시:
# Run the script when the container starts
ENTRYPOINT ["python", "hello_world.py"]
# Define the image on which to build
FROM python:3.10
# Define the image on which to build
FROM python:3.10
# Copy files/folders to the main folder of the container
COPY . .
# Define the image on which to build
FROM python:3.10
# Copy files/folders to the main folder of the container
COPY . .
# Install the application's dependencies
RUN pip install -r requirements.txt
# Define the image on which to build
FROM python:3.10
# Copy files/folders to the main folder of the container
COPY . .
# Install the application's dependencies
RUN pip install -r requirements.txt
# Run the script when the container starts
ENTRYPOINT ["python", "hello_world.py"]
문법:
docker build <context>
문법:
docker run <name_of_image>
컨테이너화와 가상화 개념