Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
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
julianxhokaxhiu committed Jan 20, 2022
1 parent afd5059 commit 72d6d8b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Makefile
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)

0 comments on commit 72d6d8b

Please sign in to comment.