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
3560bbbb
Commit
3560bbbb
authored
7 years ago
by
Will Medlar
Browse files
Options
Downloads
Patches
Plain Diff
Allow kube-bench to be run inside its distribution container
parent
67786fd3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+17
-9
17 additions, 9 deletions
Dockerfile
hooks/build
+0
-0
0 additions, 0 deletions
hooks/build
with
17 additions
and
9 deletions
Dockerfile
+
17
−
9
View file @
3560bbbb
FROM
golang:1.9
FROM
golang:1.9
AS
build
WORKDIR
/kube-bench
WORKDIR
/go/src/github.com/aquasecurity/kube-bench/
RUN
go get github.com/aquasecurity/kube-bench
ADD
glide.lock glide.yaml ./
RUN
go get github.com/Masterminds/glide
&&
glide
install
ADD
main.go .
ADD
check/ check/
ADD
cmd/ cmd/
RUN
CGO_ENABLED
=
0 go
install
-a
-ldflags
'-w'
FROM
alpine:latest
FROM
alpine:latest
AS
run
WORKDIR
/
WORKDIR
/opt/kube-bench/
COPY
--from=0 /go/bin/kube-bench /kube-bench
# add GNU ps for -C, -o cmd, and --no-headers support
COPY
--from=0 /go/src/github.com/aquasecurity/kube-bench/cfg /cfg
# https://github.com/aquasecurity/kube-bench/issues/109
COPY
--from=0 /go/src/github.com/aquasecurity/kube-bench/entrypoint.sh /entrypoint.sh
RUN
apk
--no-cache
add procps
ENTRYPOINT
/entrypoint.sh
COPY
--from=build /go/bin/kube-bench /usr/local/bin/kube-bench
ADD
entrypoint.sh .
ADD
cfg/ cfg/
ENTRYPOINT
["./entrypoint.sh"]
# Build-time metadata as defined at http://label-schema.org
# Build-time metadata as defined at http://label-schema.org
ARG
BUILD_DATE
ARG
BUILD_DATE
...
...
This diff is collapsed.
Click to expand it.
hooks/build
100644 → 100755
+
0
−
0
View file @
3560bbbb
File mode changed from 100644 to 100755
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