forked from chainguard-dev/edu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (29 loc) · 843 Bytes
/
Makefile
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
cfg?=apko.yaml
arch := $(shell uname -m)
.PHONY: apko-build dev-container
apko-build:
docker run --rm -v $$PWD:/work -it cgr.dev/chainguard/apko:latest build \
--arch $(arch) \
/work/$(cfg) academy.local /work/academy.tar
docker load < academy.tar
rm academy.tar
dev-container:
ifeq ("$(arch)","x86_64")
docker run --rm \
-v $$PWD/config/entrypoint.sh:/entrypoint.sh \
-v $$PWD/public:/usr/share/nginx/html \
-v $$PWD/nginx.conf:/etc/nginx/nginx.conf \
-v $$PWD:/home/inky/ \
-p 8080:8080 -p 1313:1313 \
-it --user root \
academy.local:latest-amd64
else
docker run --rm \
-v $$PWD/config/entrypoint.sh:/entrypoint.sh \
-v $$PWD/public:/usr/share/nginx/html \
-v $$PWD/nginx.conf:/etc/nginx/nginx.conf \
-v $$PWD:/home/inky/ \
-p 8080:8080 -p 1313:1313 \
-it --user root \
academy.local:latest-$(arch)
endif