Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description
DOCKER_IMAGE := archweechat

DOCKER_ENVS := -e NICKS=_$(USER),__$(USER) -e USERNAME=$(USER) -e REALNAME=$(HOSTNAME)@$(USER)

DOCKER_ID := $(shell docker images --quiet="true" --filter="label=name=$(DOCKER_IMAGE)")

DOCKER_PS := $(shell docker ps -a --quiet="true" --filter="label=name=$(DOCKER_IMAGE)")

default: build run

build:
    docker build -t "$(DOCKER_IMAGE)" . ;

ifneq "$(DOCKER_PS)" ""
run:
    docker run --rm -it -t $(DOCKER_ENVS) "$(DOCKER_IMAGE)" ;
else
run: build
    docker run --rm -it -t $(DOCKER_ENVS) "$(DOCKER_IMAGE)" ;
endif

stop:
    docker stop $(DOCKER_PS) ;

rm:
    docker rm $(DOCKER_PS) ;

ifeq "$(DOCKER_PS)" ""
rmi:
    docker rmi $(DOCKER_ID) ;
else
rmi: rm
    docker rmi $(DOCKER_ID) ;
endif

.PHONY: default build run stop rm rmi
Docker Pull Command
Owner
adjivas
Source Repository