-
Notifications
You must be signed in to change notification settings - Fork 49
/
Makefile
42 lines (29 loc) · 1.08 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
BUILD_DOCKERFILE=Dockerfile.build
BUILD_IMAGE=docs:builder
DEMO_DOCKERFILE=Dockerfile.demo
DEMO_IMAGE=docs:demo
buildx:
@echo "docker buildx create"
@echo docker buildx create --name multiarch --driver docker-container --use
@echo docker buildx inspect --bootstrap
all:
corepack enable && corepack prepare [email protected]
yarn install
NODE_OPTIONS=--openssl-legacy-provider yarn lint
NODE_OPTIONS=--openssl-legacy-provider yarn build
start:
NODE_OPTIONS=--openssl-legacy-provider yarn start
docker: buildx all
docker build -t registry.zerotier.com/zerotier/docs.zerotier.com:drone-$(DRONE_BUILD_NUMBER) .
docker-builder-build:
docker build -f ${BUILD_DOCKERFILE} -t ${BUILD_IMAGE} .
docker-builder-demo:
docker build -f ${DEMO_DOCKERFILE} -t ${DEMO_IMAGE} .
docker-demo: docker-builder-demo
docker run -it -u $$(id -u):$$(id -g) -v ${PWD}:/code -p 3000:3000 ${DEMO_IMAGE}
docker-build: docker-builder-build
docker run -it -u $$(id -u):$$(id -g) -v ${PWD}:/code ${BUILD_IMAGE}
.PHONY: docker-build docker-builder-build
drone:
@echo "signing drone.yml"
drone sign --save zerotier/docs