-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (31 loc) · 756 Bytes
/
Makefile
File metadata and controls
38 lines (31 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!make
.DEFAULT_GOAL := build
REGISTRY := halkeye
NAME := code-server
VERSION := latest
NAME_VERSION := $(NAME):$(VERSION)
TAGNAME := $(REGISTRY)/$(NAME_VERSION)
.PHONY: version
version: ## Show the current image version
@echo Image: $(TAGNAME)
.PHONY: build
build: ## Build docker image
docker build -t $(TAGNAME) .
.PHONY: push
push: ## push to docker hub
docker push $(TAGNAME)
.PHONY: push
kill: ## kill the running process
docker kill $(NAME)
.SHELL := /bin/bash
.PHONY: run
run: ## run the docker hub
docker run \
-it \
--rm \
-p 3000:3000 \
--name $(NAME) \
$(TAGNAME)
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'