-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (38 loc) · 983 Bytes
/
Makefile
File metadata and controls
42 lines (38 loc) · 983 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
app?=ssh-server
image_tag := $(app)
image_tar := $(app).tar
image_eif := $(app).eif
$(image_tar): $(app)/* Makefile
@echo "Building $(image_tar)..."
docker run \
--quiet \
--volume $(PWD)/$(app):/workspace \
gcr.io/kaniko-project/executor:v1.9.2 \
--reproducible \
--tar-path $(image_tar) \
--no-push \
--verbosity warn \
--destination $(image_tag) \
--custom-platform linux/amd64 >/dev/null
$(image_eif): $(image_tar)
@echo "Loading Docker image..."
@docker load --quiet --input $(app)/$<
@echo "Building $(image_eif)..."
@nitro-cli build-enclave \
--docker-uri $(image_tag) \
--output-file $(app)/$(image_eif)
.PHONY: run
run: $(image_eif)
@echo "Terminating any running enclave..."
@nitro-cli terminate-enclave \
--all
@echo "Starting enclave..."
@nitro-cli run-enclave \
--enclave-name $(app) \
--eif-path $(app)/$(image_eif) \
--attach-console \
--cpu-count 2 \
--memory 3500
.PHONY: clean
clean:
rm -f $(image_tar) $(image_eif)