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.41.2
RUN apt-get update && apt-get install -y make gcc g++
RUN ln -s /bin/mkdir /usr/bin/mkdir # gem wants this for inexplicable reasons
RUN gem install inspec-bin -v 4.41.2 --no-document --quiet
RUN gem install train-kubernetes
WORKDIR /
RUN git clone https://github.com/GoogleCloudPlatform/inspec-gke-cis-benchmark.git
RUN cd inspec-gke-cis-benchmark && bundle install
RUN apt-get update && apt-get install -y jq curl python3
RUN curl https://sdk.cloud.google.com | bash
RUN ln -s /root/google-cloud-sdk/bin/gcloud /usr/bin/gcloud
ENV CHEF_LICENSE=accept
RUN gem uninstall excon -v 0.96.0
RUN inspec plugin install train-kubernetes
ENTRYPOINT []
Attempt 1
I build it with docker build -t chef-gke -f Dockerfile . in a directory with no other files. Every layer builds fine until I get to the inspec plugin install train-kubernetes. That fails with this error:
I also tried with gem uninstall excon -v 0.85.0, which is the other version which is present. With that change to the Dockerfile, I get this error instead:
=> ERROR [12/13] RUN inspec plugin install train-kubernetes 1.5s
------
> [12/13] RUN inspec plugin install train-kubernetes:
#15 1.429 /opt/inspec/embedded/lib/ruby/2.7.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'excon' (= 0.85.0) - did find: [excon-0.96.0] (Gem::MissingSpecVersionError)
#15 1.430 Checked in 'GEM_PATH=/root/.gem/ruby/2.7.0:/opt/inspec/embedded/lib/ruby/gems/2.7.0', execute `gem env` for more information
#15 1.430 from /opt/inspec/embedded/lib/ruby/2.7.0/rubygems/dependency.rb:323:in `to_spec'
#15 1.430 from /opt/inspec/embedded/lib/ruby/2.7.0/rubygems/core_ext/kernel_gem.rb:62:in `gem'
#15 1.430 from /opt/inspec/bin/inspec:107:in `<main>'
------
Attempt 3
I also tried building without gem uninstall excon at all:
FROM chef/inspec:4.41.2
RUN apt-get update && apt-get install -y make gcc g++
RUN ln -s /bin/mkdir /usr/bin/mkdir # gem wants this for inexplicable reasons
RUN gem install inspec-bin -v 4.41.2 --no-document --quiet
RUN gem install train-kubernetes
WORKDIR /
RUN git clone https://github.com/GoogleCloudPlatform/inspec-gke-cis-benchmark.git
RUN cd inspec-gke-cis-benchmark && bundle install
RUN apt-get update && apt-get install -y jq curl python3
RUN curl https://sdk.cloud.google.com | bash
RUN ln -s /root/google-cloud-sdk/bin/gcloud /usr/bin/gcloud
ENV CHEF_LICENSE=accept
RUN inspec plugin install train-kubernetes
ENTRYPOINT []
And one last try with as little extra noise as possible:
FROM chef/inspec:4.41.2
RUN apt-get update && apt-get install -y make gcc g++
RUN ln -s /bin/mkdir /usr/bin/mkdir # gem wants this for inexplicable reasons
ENV CHEF_LICENSE=accept
RUN gem install train-kubernetes
RUN inspec plugin install train-kubernetes
ENTRYPOINT []
I have this Dockerfile:
Attempt 1
I build it with
docker build -t chef-gke -f Dockerfile .
in a directory with no other files. Every layer builds fine until I get to theinspec plugin install train-kubernetes
. That fails with this error:Attempt 2
I also tried with
gem uninstall excon -v 0.85.0
, which is the other version which is present. With that change to the Dockerfile, I get this error instead:Attempt 3
I also tried building without
gem uninstall excon
at all:This also fails with
Attempt 4
And one last try with as little extra noise as possible:
Same error:
The text was updated successfully, but these errors were encountered: