diff --git a/Dockerfile b/Dockerfile index c51e9d37..8e5ae8da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,15 @@ +# syntax=docker/dockerfile:1 + FROM ruby:2.7-alpine -# an explicitly blank version appears to grab latest -# override here for a real build process +LABEL org.opencontainers.image.authors='Stelligent' +LABEL org.opencontainers.image.licenses='MIT' +LABEL org.opencontainers.image.source='https://github.com/stelligent/cfn_nag' +LABEL org.opencontainers.image.title='cfn_nag' +LABEL org.opencontainers.image.vendor='Stelligent' + +# An explicitly blank version appears to grab latest. +# Pass the required version with `--build-arg version=${YOUR_VERSION}` for a real build process. ARG version='' RUN gem install cfn-nag --version "$version" diff --git a/Dockerfile-dev b/Dockerfile-dev index 0c0aa24b..ab6d50c3 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -1,11 +1,20 @@ +# syntax=docker/dockerfile:1 + FROM ruby:2.7-alpine -COPY . / +LABEL org.opencontainers.image.authors='Stelligent' +LABEL org.opencontainers.image.licenses='MIT' +LABEL org.opencontainers.image.source='https://github.com/stelligent/cfn_nag' +LABEL org.opencontainers.image.title='cfn_nag for development' +LABEL org.opencontainers.image.vendor='Stelligent' -RUN apk add --update build-base \ - curl \ - git +COPY . / -RUN gem install bundler -RUN gem install rubocop -RUN bundle install +RUN apk add --update --no-cache \ + build-base \ + curl \ + git \ + && gem install \ + 'bundler:2.4.22' \ + 'rubocop:~>1.67' \ + && bundle install diff --git a/Dockerfile.local b/Dockerfile.local index bf589475..d0a3afa5 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -1,5 +1,13 @@ +# syntax=docker/dockerfile:1 + FROM ruby:2.7-alpine +LABEL org.opencontainers.image.authors='Stelligent' +LABEL org.opencontainers.image.licenses='MIT' +LABEL org.opencontainers.image.source='https://github.com/stelligent/cfn_nag' +LABEL org.opencontainers.image.title='cfn_nag' +LABEL org.opencontainers.image.vendor='Stelligent' + ARG version COPY cfn-nag-${version}.gem /