# 1: Use ruby 2.4.1 as base: FROM ruby:2.4.1-alpine # 2: We'll set this gem's lib path as the working directory WORKDIR /usr/src/lib # 3: We'll set the working dir as HOME and add the app's binaries path to $PATH: # NOTE: The PAGER variable allows Pry to work on alpine linux. # See https://github.com/pry/pry/issues/1494 ENV HOME=/usr/src/lib PATH=/usr/src/lib/bin:$PATH PAGER='busybox less' # 4: Set the default command: CMD ["guard"] # --- Install development and runtime dependencies: --- # 6: Install the development & runtime packages: RUN set -ex && apk add --no-cache \ build-base \ git \ ca-certificates \ openssl \ tzdata \ su-exec