mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
Merge pull request #745 from chef/dr/docker-release
rake release_docker + smaller image builds
This commit is contained in:
commit
7c9706bbd7
2 changed files with 15 additions and 5 deletions
|
@ -1,10 +1,9 @@
|
|||
FROM ruby:alpine
|
||||
RUN mkdir /share
|
||||
RUN apk add --update \
|
||||
build-base \
|
||||
libxml2-dev \
|
||||
libffi-dev
|
||||
RUN gem install inspec --no-document
|
||||
COPY inspec.gem /
|
||||
RUN apk add --update build-base libxml2-dev libffi-dev && \
|
||||
gem install /inspec.gem --no-document && \
|
||||
apk del build-base
|
||||
ENTRYPOINT ["inspec"]
|
||||
CMD ["help"]
|
||||
VOLUME ["/share"]
|
||||
|
|
11
Rakefile
11
Rakefile
|
@ -146,3 +146,14 @@ task :bump_version, [:version] do |_, args|
|
|||
inspec_version(v)
|
||||
Rake::Task['changelog'].invoke
|
||||
end
|
||||
|
||||
desc 'Release a new docker image'
|
||||
task :release_docker do
|
||||
version = Inspec::VERSION
|
||||
cmd = "rm *.gem; gem build *gemspec && "\
|
||||
"mv *.gem inspec.gem && "\
|
||||
"docker build -t chef/inspec:#{version} . && "\
|
||||
"docker push chef/inspec:#{version}"
|
||||
puts "--> #{cmd}"
|
||||
sh('sh', '-c', cmd)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue