-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it simple to build, run and clean the container image. Simply contributions to the code, by allowing everyone to build locally the image through make goals.
- Loading branch information
1 parent
afd5059
commit 72d6d8b
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
############################################################################### | ||
# ENVIRONMENT CONFIGURATION | ||
############################################################################### | ||
MAKEFLAGS += --no-print-directory | ||
SHELL=/bin/bash | ||
|
||
# Use default as default goal when running 'make' | ||
.PHONY: default | ||
.DEFAULT_GOAL := default | ||
|
||
############################################################################### | ||
# GOAL PARAMETERS | ||
############################################################################### | ||
|
||
# Container name | ||
CONTAINER_NAME ?= "julianxhokaxhiu/lineageota" | ||
|
||
# Tag name | ||
TAG_NAME ?= "latest" | ||
|
||
############################################################################### | ||
# GOALS ( safe defaults ) | ||
############################################################################### | ||
|
||
default: | ||
@docker build -t $(CONTAINER_NAME):$(TAG_NAME) . | ||
|
||
run: | ||
@docker run --rm=true -it -p 8080:80 -v "$(CURDIR)/builds:/var/www/html/builds" $(CONTAINER_NAME):$(TAG_NAME) | ||
|
||
clean: | ||
@docker rmi $(CONTAINER_NAME):$(TAG_NAME) |