Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-bench
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
aquasecurity
kube-bench
Commits
ebc58dcb
Commit
ebc58dcb
authored
7 years ago
by
Amir Jerbi
Browse files
Options
Downloads
Patches
Plain Diff
Add Dockerfile build
parent
f9592f15
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+19
-0
19 additions, 0 deletions
Dockerfile
entrypoint.sh
+11
-0
11 additions, 0 deletions
entrypoint.sh
with
30 additions
and
0 deletions
Dockerfile
0 → 100644
+
19
−
0
View file @
ebc58dcb
FROM
golang:1.4.1
RUN
mkdir
/kube-bench
WORKDIR
/kube-bench
RUN
wget https://raw.githubusercontent.com/aquasecurity/kubernetes-bench-security/master/cfg/config.yaml
&&
\
wget https://raw.githubusercontent.com/aquasecurity/kubernetes-bench-security/master/cfg/federated.yaml
&&
\
wget https://raw.githubusercontent.com/aquasecurity/kubernetes-bench-security/master/cfg/master.yaml
&&
\
wget https://raw.githubusercontent.com/aquasecurity/kubernetes-bench-security/master/cfg/node.yaml
RUN
go get github.com/aquasecurity/kubernetes-bench-security
RUN
cp
/go/bin/kubernetes-bench-security /kube-bench/
&&
chmod
+x /kube-bench/kubernetes-bench-security
FROM
alpine:latest
RUN
mkdir
-p
/kube-bench/cfg
COPY
--from=0 /kube-bench/kubernetes-bench-security /kube-bench/kube-bench
COPY
--from=0 /kube-bench/config.yaml /kube-bench/cfg/config.yaml
COPY
--from=0 /kube-bench/federated.yaml /kube-bench/cfg/federated.yaml
COPY
--from=0 /kube-bench/master.yaml /kube-bench/cfg/master.yaml
COPY
--from=0 /kube-bench/node.yaml /kube-bench/cfg/node.yaml
ADD
entrypoint.sh /entrypoint.sh
ENTRYPOINT
/entrypoint.sh
This diff is collapsed.
Click to expand it.
entrypoint.sh
0 → 100755
+
11
−
0
View file @
ebc58dcb
#!/bin/sh
if
[
-d
/host
]
;
then
mkdir
-p
/host/cfg/
yes
|
cp
-rf
./kube-bench/cfg/
*
/host/cfg/
yes
|
cp
-rf
./kube-bench/kube-bench /host/
echo
"=== You can now run ./kube-bench from your host ==="
else
echo
"Error: please mount a host directory as /host volume"
echo
"docker run --rm -v
`
pwd
`
:/host aquasec/kube-bench"
exit
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment