-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (46 loc) · 1.34 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
43
44
45
46
47
48
49
50
51
52
53
54
.EXPORT_ALL_VARIABLES:
VERSION=edge
DOCKER_REGISTRY=pocketbase
DOCKER_IMAGE_NAME=pocketbase
BUILDKIT_PROGRESS=plain
BUILDX_PLATFORM=linux/amd64
DOCKER_IMAGE_TAG=${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}:${VERSION}
# Docker Metadata Actions
DOCKER_META_IMAGES=${DOCKER_REGISTRY}/${DOCKER_IMAGE_NAME}
DOCKER_META_VERSION=${VERSION}
# PockeBase
POCKETBASE_VERSION=0.7.10
main:
@echo No action was performed.
@echo
@echo Available flags:
@echo - VERSION=${VERSION}
@echo - DOCKER_REGISTRY=${DOCKER_REGISTRY}
@echo - DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME}
@echo - BUILDX_PLATFORM=${BUILDX_PLATFORM}
@echo
@echo Read-only flags:
@echo - DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG}
@echo - DOCKER_META_IMAGES=${DOCKER_META_IMAGES}
@echo - DOCKER_META_VERSION=${DOCKER_META_VERSION}
@echo
@echo Available commands:
@echo - run: run docker container
@echo - push: push docker image to registry
@echo - build: build docker image
build:
@docker buildx bake \
--file Makefile.docker-bake.hcl \
--print build
@echo Building ${DOCKER_IMAGE_TAG} docker image
@docker buildx bake \
--file Makefile.docker-bake.hcl \
--load build
push:
@echo Pushing ${DOCKER_IMAGE_TAG} to registry
@docker push ${DOCKER_IMAGE_TAG}
run:
@echo Running ${DOCKER_IMAGE_TAG} image on port http://localhost:8090
@docker run -it --rm \
--publish 8090:8090 \
${DOCKER_IMAGE_TAG}