Skip to content

Instantly share code, notes, and snippets.

@jabelk
Created July 4, 2019 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jabelk/bd91249e4473951388ad02a7d8a2ee31 to your computer and use it in GitHub Desktop.
Save jabelk/bd91249e4473951388ad02a7d8a2ee31 to your computer and use it in GitHub Desktop.
docker make
DOCKER_IMG = testexplorer
DOCKER_TAG = latest
CONTAINER_NAME = testexplorer-container
.PHONY: build
build:
docker build -t $(DOCKER_IMG):$(DOCKER_TAG) .
.PHONY: run
run:
docker start -ai $(CONTAINER_NAME)
.PHONY: init
init:
docker run -it \
--name $(CONTAINER_NAME) \
$(DOCKER_IMG):$(DOCKER_TAG)
.PHONY: rebuild
rebuild:
docker stop $(CONTAINER_NAME); \
docker rm $(CONTAINER_NAME); \
docker rmi $(DOCKER_IMG):$(DOCKER_TAG); \
make build-image; \
make init-power
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment