BaşlayınÜcretsiz Başlayın

Changing behavior when starting a container

Let's see how the ENV Dockerfile instruction works in practice. We've added a Dockerfile to your current working directory with the following instructions:

FROM ubuntu:22.04
ENV NAME=Tim
CMD echo "Hello, my name is $NAME"

The Dockerfile will print a personalized message, Hello, my name is Tim, on startup. Let's see how we can change this personalized message even after building an image from the Dockerfile.

Bu egzersiz

Introduction to Docker

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

İnteraktif egzersizlerimizden biriyle teoriyi pratiğe dökün

Egzersizi başlat