Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
FROM ruby:2.4
# Phase 1: Build the gem and all dependencies, needs C compiler
FROM ruby:2.4-alpine as builder

RUN gem install redis-stat
RUN apk add --no-cache build-base

ENV GEM_HOME "/gems"

RUN gem install -N redis-stat

# Phase 2: Build the actual docker image, needs no C compiler -> much smaller image
FROM ruby:2.4-alpine

RUN apk add --no-cache ncurses

ENV GEM_HOME "/gems"
ENV PATH $GEM_HOME/bin:$GEM_HOME/gems/bin:$PATH

COPY --from=builder /gems /gems

EXPOSE 63790
ENTRYPOINT ["redis-stat"]