Konteneryzacja i wirtualizacja – podstawy
Julia Ostheimer
Freelance AI Consultant







FROMFROMCOPYRUNENTRYPOINTSkładnia:
FROM <name_of_image>
Przykład:
# Define the image on which to build
FROM python:3.10
Składnia:
COPY <source> <destination>
Przykład:
# Copy files/folders to the main folder of the container
COPY . .
Składnia:
RUN <command>
Przykład:
# Install the application's dependencies
RUN pip install -r requirements.txt
Składnia:
ENTRYPOINT ["command", "argument"]
Przykład:
# 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"]
Składnia:
docker build <context>
Składnia:
docker run <name_of_image>
Konteneryzacja i wirtualizacja – podstawy