You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM chef/inspec:4.56.20
## Install dependencies
RUN apt-get update && \
apt install -y build-essential ruby-dev coreutils bash git
## Fix path issue.
RUN ln -s /bin/mkdir /usr/bin/mkdir
## Install kubernetes plugin
RUN gem install inspec-bin -v 4.56.20 --no-document --quiet
RUN gem install train-kubernetes
## Accept license
ENV CHEF_LICENSE=accept
RUN inspec plugin install train-kubernetes
## Fix version issue
RUN sed -ie 's#"= 0#"0#g' /root/.inspec/plugins.json
## Volume and workdir
VOLUME ["/srv"]
WORKDIR /srv
## Set entrypoint and command.
ENTRYPOINT ["inspec"]
CMD ["help"]
The tests in question:
control "k8s-1.0" do
impact 0.2
title "Validate built-in namespaces"
desc "The kube-system, kube-public and default namespaces should exist"
describe k8sobject(api: 'v1', type: 'namespaces', name: 'default') do
it { should exist }
end
describe k8sobject(api: 'v1', type: 'namespaces', name: 'kube-system') do
it { should exist }
end
describe k8sobject(api: 'v1', type: 'namespaces', name: 'kube-public') do
it { should exist }
end
end
I used version 4.56.20 because that is the latest version I could find for version 4.x for both inspec and inspec-bin. I also tried with version 5.18.15 of Inspec but that wouldn't even run.
If you need any more information please let me know.
The text was updated successfully, but these errors were encountered:
I'm trying to build a docker container to run inspec-k8s but when executing Inspec I get the following error for all defined resources:
I'm using the following versions:
I ensured
=
has been removed fromplugins.json
:I've ensured only one version of excon is installed:
Inspect detect:
The Dockerfile in question:
The tests in question:
I used version
4.56.20
because that is the latest version I could find for version 4.x for both inspec and inspec-bin. I also tried with version5.18.15
of Inspec but that wouldn't even run.If you need any more information please let me know.
The text was updated successfully, but these errors were encountered: