-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
33 lines (25 loc) · 1.13 KB
/
Copy pathmakefile
File metadata and controls
33 lines (25 loc) · 1.13 KB
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
PROJECT_ID=burstier-review
# IMAGE_NAME=dash-app
TAG=latest
REGION=europe-west1
REPO=eu.gcr.io
DATASET?=inhibblock
APPLICATION?=review
# Cloud Run runs amd64 by default; override with PLATFORM= for a native arm64 build.
PLATFORM?=linux/amd64
docker-build:
docker build --platform $(PLATFORM) --build-arg DATASET=$(DATASET) --build-arg APPLICATION=$(APPLICATION) -t $(APPLICATION)-$(DATASET):$(TAG) .
docker-run:
docker run -p 8080:8080 -t $(APPLICATION)-$(DATASET):$(TAG)
docker-tag:
# docker tag $(APPLICATION)-$(DATASET):$(TAG) $(REGION)-docker.pkg.dev/$(PROJECT_ID)/$(REPO)/$(APPLICATION)-$(DATASET):$(TAG)
docker tag $(APPLICATION)-$(DATASET):$(TAG) $(REPO)/$(PROJECT_ID)/$(APPLICATION)-$(DATASET):$(TAG)
gcloud-auth:
gcloud auth login
gcloud auth configure-docker $(REGION)-docker.pkg.dev
gcloud auth configure-docker europe-docker.pkg.dev
docker-push:
# docker push $(REGION)-docker.pkg.dev/$(PROJECT_ID)/$(REPO)/$(APPLICATION)-$(DATASET):$(TAG)
docker push $(REPO)/$(PROJECT_ID)/$(APPLICATION)-$(DATASET):$(TAG)
docker-deploy: docker-build docker-tag gcloud-auth docker-push
docker-deploy-no-auth: docker-build docker-tag docker-push