Skip to content

Instantly share code, notes, and snippets.

@gbalbuena
Created November 13, 2023 03:00
Show Gist options
  • Save gbalbuena/7ed4cdaff38dbd214581b14312368369 to your computer and use it in GitHub Desktop.
Save gbalbuena/7ed4cdaff38dbd214581b14312368369 to your computer and use it in GitHub Desktop.
docker hello-world
FROM hello-world
# 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