-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (24 loc) · 766 Bytes
/
Makefile
File metadata and controls
35 lines (24 loc) · 766 Bytes
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
IMAGE=embedgem
ACCOUNT=$(shell aws ecr describe-registry --query registryId --output text)
REGION=$(shell aws configure get region)
REGISTRY=$(ACCOUNT).dkr.ecr.$(REGION).amazonaws.com
setup:
cp ../environment.yml .
login:
aws ecr get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(REGISTRY)
build:
docker build -t $(REGISTRY)/$(IMAGE) --build-arg REGISTRY=$(REGISTRY) .
build-local:
docker build -t $(IMAGE) --build-arg REGISTRY=$(REGISTRY) .
create-repo:
aws ecr create-repository --repository=$(IMAGE)
push:
docker push $(REGISTRY)/$(IMAGE)
pull:
docker pull $(REGISTRY)/$(IMAGE)
bash:
docker run --rm -it $(REGISTRY)/$(IMAGE) bash
bash-local:
docker run --rm -it $(IMAGE) bash
teardown:
rm environment.yml