From b12615f23447fc9f0068b1279f6ec319d68ce1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20REY?= Date: Sat, 11 Apr 2020 17:12:07 +0200 Subject: [PATCH] Move to ubuntu base image. Add conftest and opa --- Dockerfile | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index b4b932c..7cd5776 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,6 @@ -FROM alpine:3.11 - -RUN apk --no-cache add bash \ - ca-certificates \ - git \ - openssh-client \ - gcc \ - libc-dev \ - libstdc++ \ - make \ - ruby \ - ruby-dev \ - ruby-etc \ - ruby-rdoc \ - && rm -rf /var/cache/apk/* +FROM ubuntu:19.10 + +RUN apt update && apt install -y ruby ruby-dev build-essential wget COPY Gemfile . RUN gem install bundler @@ -32,3 +20,14 @@ RUN wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform chmod 755 /usr/bin/terraform && \ rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip +ENV OPA_VERSION=0.18.0 + +RUN wget https://github.com/open-policy-agent/opa/releases/download/v${OPA_VERSION}/opa_linux_amd64 && \ + mv opa_linux_amd64 /usr/bin/opa && \ + chmod 755 /usr/bin/opa + +ENV CONFTEST_VERSION=0.18.1 + +RUN wget https://github.com/instrumenta/conftest/releases/download/v${CONFTEST_VERSION}/conftest_${CONFTEST_VERSION}_linux_amd64.deb && \ + dpkg -i conftest_${CONFTEST_VERSION}_linux_amd64.deb && \ + rm conftest_${CONFTEST_VERSION}_linux_amd64.deb