Switch Docker build to be omnibus-based (5362)

This commit is contained in:
Clinton Wolfe 2021-01-12 09:36:18 -05:00 committed by GitHub
commit bc7433fc5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 11 deletions

View file

@ -1,20 +1,30 @@
FROM ruby:alpine FROM ubuntu:18.04
LABEL maintainer="Chef Software, Inc. <docker@chef.io>" LABEL maintainer="Chef Software, Inc. <docker@chef.io>"
ARG EXPEDITOR_VERSION ARG VERSION=4.24.8
ARG VERSION=4.24.28 ARG CHANNEL=stable
# GEM_SOURCE is kept away from expeditor controlled ARGs to accomodate 3rd party distros ENV PATH=/opt/inspec/bin:/opt/inspec/embedded/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ARG GEM_SOURCE=https://rubygems.org
# Run the entire container with the default locale to be en_US.UTF-8
RUN apt-get update && \
apt-get install -y locales && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
# Allow VERSION below to be controlled by either VERSION or EXPEDITOR_VERSION build arguments
ENV VERSION ${EXPEDITOR_VERSION:-${VERSION}}
RUN mkdir -p /share RUN mkdir -p /share
RUN apk add --update build-base libxml2-dev libffi-dev git openssh-client
RUN gem install --no-document --source ${GEM_SOURCE} --version ${VERSION} inspec RUN apt-get update && \
RUN gem install --no-document --source ${GEM_SOURCE} --version ${VERSION} inspec-bin apt-get install -y wget rpm2cpio cpio && \
RUN apk del build-base wget "http://packages.chef.io/files/${CHANNEL}/inspec/${VERSION}/el/7/inspec-${VERSION}-1.el7.x86_64.rpm" -O /tmp/inspec.rpm && \
rpm2cpio /tmp/inspec.rpm | cpio -idmv && \
rm -rf /tmp/inspec.rpm
ENTRYPOINT ["inspec"] ENTRYPOINT ["inspec"]
CMD ["help"] CMD ["help"]

View file

@ -16,3 +16,6 @@ image=chef:
args: args:
VERSION: '{env.EXPEDITOR_VERSION}' VERSION: '{env.EXPEDITOR_VERSION}'
CHANNEL: unstable CHANNEL: unstable
annotations:
tags:
- expeditor:final-channel-tags={{major}},{{major}}.{{minor}}