fix: use absolute image URLs for some tasks
This commit is contained in:
parent
bc727353cd
commit
dc2c2082c0
12
podman.mk
12
podman.mk
@ -14,18 +14,18 @@ all: test
|
|||||||
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@docker image exists $(IMAGE):$(TAG) || \
|
@docker image exists $(REGISTRY)/$(IMAGE):$(TAG) || \
|
||||||
docker build --rm -t $(IMAGE):$(TAG) --build-arg TAG=$(TAG) .
|
docker build --rm -t $(REGISTRY)/$(IMAGE):$(TAG) --build-arg TAG=$(TAG) .
|
||||||
|
|
||||||
test: build rm-test-image
|
test: build rm-test-image
|
||||||
@test -f Dockerfile.test && \
|
@test -f Dockerfile.test && \
|
||||||
{ docker build --rm -t $(IMAGE):$(TAG)-test --from=$(IMAGE):$(TAG) -f Dockerfile.test . && \
|
{ docker build --rm -t $(REGISTRY)/$(IMAGE):$(TAG)-test --from=$(REGISTRY)/$(IMAGE):$(TAG) -f Dockerfile.test . && \
|
||||||
docker run --rm --env-host -t $(IMAGE):$(TAG)-test; } || \
|
docker run --rm --env-host -t $(REGISTRY)/$(IMAGE):$(TAG)-test; } || \
|
||||||
echo "No Dockerfile.test found, skipping test"
|
echo "No Dockerfile.test found, skipping test"
|
||||||
|
|
||||||
scan: build
|
scan: build
|
||||||
@echo "Scanning $(IMAGE):$(TAG) using Trivy"
|
@echo "Scanning $(REGISTRY)/$(IMAGE):$(TAG) using Trivy"
|
||||||
@trivy $(TRIVY_OPTS) $(IMAGE):$(TAG)
|
@trivy $(TRIVY_OPTS) $(REGISTRY)/$(IMAGE):$(TAG)
|
||||||
|
|
||||||
push: build
|
push: build
|
||||||
@aws ecr-public get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(REGISTRY)
|
@aws ecr-public get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(REGISTRY)
|
||||||
|
Loading…
Reference in New Issue
Block a user