aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: e20759f7fc87989764fa8a7c90ee28acf1a38ff4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
fmt:
	go fmt github.com/fuwn/space...

run: fmt validate
	go run github.com/fuwn/space

build: fmt
	go build

validate: .space/.certificates/space.crt .space/.certificates/space.key

ssl:
	mkdir -p .space/.certificates
	openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes \
	  -out .space/.certificates/space.crt \
	  -keyout .space/.certificates/space.key \
	  -subj "/CN=fuwn.me"

docker: fmt
	docker build -t fuwn/space:latest .

# https://stackoverflow.com/a/49022012
dangling:
	sudo docker rmi $(sudo docker images -f "dangling=true" -q) --force