A little sanity for our infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

24 lines
581 B

# Build gem
FROM ruby:2.7.2-alpine AS builder
WORKDIR /tmp
COPY . /tmp
# Build and install sanity gem into system gems
RUN apk --no-cache add build-base git && \
gem build sanity -o sanity.gem && \
gem install -N /tmp/sanity.gem
# Create runtime image
FROM ruby:2.7.2-alpine AS runtime
LABEL MAINTAINERS="Christian Aust <christian.aust@zurich.com>"
VOLUME /app
WORKDIR /app
COPY --from=builder /usr/local/bundle /usr/local/bundle
RUN addgroup -S sanity && adduser -D -h /app -H -u 993 -G sanity sanity
USER sanity
CMD ["/usr/local/bundle/bin/sanity", "/app/*.json"]