Created
November 13, 2023 03:00
-
-
Save gbalbuena/7ed4cdaff38dbd214581b14312368369 to your computer and use it in GitHub Desktop.
docker hello-world
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM hello-world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define variables | |
IMAGE_NAME = hello-world-v1 | |
# Build the Docker image | |
build: | |
docker build -t $(IMAGE_NAME) . | |
# Run the Docker container | |
hello-world: | |
docker run $(IMAGE_NAME) | |
# Define phony targets | |
.PHONY: build hello-world help | |
# Display help message | |
help: | |
@echo "Usage: make [target]" | |
@echo "Targets:" | |
@echo " build - Build the Docker image" | |
@echo " hello-world - Run the Docker container" | |
@echo " help - Display this help message" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment