forked from hadolint/hadolint-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
25 lines (18 loc) · 837 Bytes
/
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
IMAGE_NAME:=hadolint-action
lint-dockerfile: ## Runs hadoint against application dockerfile
@docker run --rm -v "$(PWD):/data" -w "/data" hadolint/hadolint hadolint Dockerfile
lint-yaml: ## Lints yaml configurations
@docker run --rm -v "$(PWD):/yaml" sdesbure/yamllint yamllint .
build: ## Builds the docker image
@docker build . -t $(IMAGE_NAME)
test: build ## Runs a test in the image
@docker run -i --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ${PWD}:/test zemanlx/container-structure-test:v1.8.0-alpine \
test \
--image $(IMAGE_NAME) \
--config test/structure-tests.yaml
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
.DEFAULT_GOAL := help
.PHONY: lint build test help