-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (32 loc) · 871 Bytes
/
Makefile
File metadata and controls
48 lines (32 loc) · 871 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
39
40
41
42
43
44
45
46
47
48
DOCKER = docker
XZ = xz
IMAGE := conreality/devbox
VERSION := $(shell cat VERSION)
SOURCES := $(wildcard .docker/* etc/* home/admin/* home/admin/*/* usr/local/*/*)
all: build
.built: Dockerfile $(SOURCES)
$(DOCKER) build -t $(IMAGE) -f $< .
@touch $@
dist.tar.xz: .built
$(DOCKER) save $(IMAGE) | $(XZ) -1 > $@
build: .built
check:
@echo "not implemented" && false # TODO
dist: dist.tar.xz
install: .built
uninstall:
$(DOCKER) image rm $(IMAGE) || true
clean:
@rm -f .built *~
distclean: clean
mostlyclean: clean
boot: .built
$(DOCKER) run --rm -it -p22:22/tcp -p5900:5900/tcp $(IMAGE) init
exec-shell: .built
$(DOCKER) run --rm -it $(IMAGE) /bin/bash
exec-dropbear: .built
$(DOCKER) run --rm -it -p22:22/tcp $(IMAGE) dropbear
.PHONY: check uninstall clean distclean mostlyclean
.PHONY: boot exec-shell exec-dropbear
.SECONDARY:
.SUFFIXES: