File tree Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Expand file tree Collapse file tree 4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,14 @@ RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/s
6868 && echo "source ~/completions/kubectl.bash" >> ~/.bashrc \
6969 && echo "alias k=kubectl" >> ~/.bashrc \
7070 && echo "complete -o default -F __start_kubectl k" >> ~/.bashrc
71+
72+ # Install trivy
73+ RUN mkdir /tmp/trivy \
74+ && curl -L https://github.com/aquasecurity/trivy/releases/download/v0.19.2/trivy_0.19.2_Linux-64bit.tar.gz | tar xvz -C /tmp/trivy -f - contrib trivy \
75+ && chmod +x /tmp/trivy/trivy \
76+ && mv /tmp/trivy/trivy /usr/local/bin/trivy \
77+ && mkdir -p /trivy/contrib \
78+ && mv /tmp/trivy/contrib/* /trivy/contrib/
7179
7280# Clean up
7381RUN apt-get autoremove -y \
Original file line number Diff line number Diff line change @@ -5,6 +5,13 @@ IMAGE_MAJOR_VERSION = $(shell echo "$(IMAGE_VERSION)" | cut -d '.' -f1 )
55IMAGE_MINOR_VERSION = $(shell echo "$(IMAGE_VERSION ) " | cut -d '.' -f2 )
66IMAGE = $(REGISTRY ) /$(REPOSITORY ) /hello-kubernetes
77
8+ .PHONY : scan-for-vulns
9+ scan-for-vulns :
10+ trivy image --format template --template " @/trivy/contrib/sarif.tpl" $(IMAGE ) :$(IMAGE_VERSION )
11+
12+ .PHONY : build-images
13+ build-images : build-image-linux
14+
815.PHONY : build-image-linux
916build-image-linux :
1017 docker build --no-cache \
Original file line number Diff line number Diff line change 1- FROM node:15-alpine
1+ FROM node:16-alpine3.13
22
33ARG IMAGE_CREATE_DATE
44ARG IMAGE_VERSION
Original file line number Diff line number Diff line change 11{
22 "name" : " hello-kubernetes" ,
3- "version" : " 1.10.0 " ,
3+ "version" : " 1.10.1 " ,
44 "description" : " Hello Kubernetes!" ,
55 "author" : " Paul Bouwer" ,
66 "license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments