-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
43 lines (30 loc) · 1.44 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
# DOCKER
PACKAGE_VERSION := $(shell jq -r '.version' package.json)
PACKAGE_MAJOR_VERSION := $(shell echo $(PACKAGE_VERSION) | cut -d. -f1)
setup-docker-multiarch:
docker buildx create --use --name mybuilder --driver docker-container
docker buildx inspect mybuilder --bootstrap
docker-build-dev:
docker buildx build --platform linux/amd64 -t devthefuture/dockerfile-x:dev --progress=plain . --push
docker-build:
docker buildx build --platform linux/amd64,linux/arm64 -t devthefuture/dockerfile-x --progress=plain .
docker-push:
docker buildx build --platform linux/amd64,linux/arm64 -t devthefuture/dockerfile-x --progress=plain . --push
docker buildx build --platform linux/amd64,linux/arm64 -t devthefuture/dockerfile-x:v$(PACKAGE_MAJOR_VERSION) --progress=plain . --push
docker buildx build --platform linux/amd64,linux/arm64 -t devthefuture/dockerfile-x:v$(PACKAGE_VERSION) --progress=plain . --push
docker buildx build --platform linux/amd64,linux/arm64 -t devthefuture/dockerfile-x:$(PACKAGE_MAJOR_VERSION) --progress=plain . --push
docker buildx build --platform linux/amd64,linux/arm64 -t devthefuture/dockerfile-x:$(PACKAGE_VERSION) --progress=plain . --push
# GO
go-version:
gvm install go1.21
gvm use 1.21
go-deps:
go mod tidy
go mod vendor
go-build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -ldflags '-w -extldflags "-static"' -o dist-bin/dockerfile-x-frontend .
# NODE
node-deps:
yarn
node-build: node-deps
yarn build