Update Dockerfile to pull version from correct Expeditor variable

Expeditor now prefixes all environment variables and build args with
`EXPEDITOR_`. This commit updates the Dockerfile in a backwards
compatible fashion to respect both VERSION and EXPEDITOR_VERSION build
arguments.

Signed-off-by: Tom Duffield <tom@chef.io>
This commit is contained in:
Tom Duffield 2019-08-08 09:01:01 -05:00
parent 90fb536bf7
commit 16bd5fd0ac
No known key found for this signature in database
GPG key ID: 1F38F93AAC11A304

View file

@ -1,9 +1,13 @@
FROM ruby:alpine
MAINTAINER Chef Software, Inc. <docker@chef.io>
LABEL maintainer="Chef Software, Inc. <docker@chef.io>"
ARG VERSION=
ARG EXPEDITOR_VERSION
ARG VERSION
ARG GEM_SOURCE=https://rubygems.org
# Allow VERSION below to be controlled by either VERSION or EXPEDITOR_VERSION build arguments
ENV VERSION ${EXPEDITOR_VERSION:-${VERSION}}
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