diff --git a/source-code/chapter-4/exercise-1/docker-hello-world/Dockerfile b/source-code/chapter-4/exercise-1/docker-hello-world/Dockerfile index 7c1d5ab..620cf40 100644 --- a/source-code/chapter-4/exercise-1/docker-hello-world/Dockerfile +++ b/source-code/chapter-4/exercise-1/docker-hello-world/Dockerfile @@ -1,9 +1,8 @@ FROM python:3-alpine -LABEL author="sathyabhat" LABEL description="Dockerfile for Python script which prints Hello, Name" COPY hello-world.py /app/ -ENV NAME=Sathya +ENV NAME=Readers CMD python3 /app/hello-world.py diff --git a/source-code/chapter-4/exercise-1/docker-hello-world/hello-world.py b/source-code/chapter-4/exercise-1/docker-hello-world/hello-world.py index 850eed0..49e450d 100644 --- a/source-code/chapter-4/exercise-1/docker-hello-world/hello-world.py +++ b/source-code/chapter-4/exercise-1/docker-hello-world/hello-world.py @@ -1,10 +1,8 @@ #!/usr/bin/env python3 - from os import getenv if getenv('NAME') is None: name = 'World' else: name = getenv('NAME') - -print("Hello, {}!".format(name)) +print(f"Hello, {name}!")