Skip to content

Instantly share code, notes, and snippets.

@alwalker
Created July 5, 2021 20:34
Show Gist options
  • Save alwalker/17af6b18bbd691ec79a16f41efd4a872 to your computer and use it in GitHub Desktop.
Save alwalker/17af6b18bbd691ec79a16f41efd4a872 to your computer and use it in GitHub Desktop.
FROM ruby:2.4.2-alpine AS base
RUN apk add --update \
postgresql-dev git freetds-dev sqlite-dev tzdata
FROM base AS dependencies
WORKDIR /app
RUN apk add --update build-base
COPY Gemfile Gemfile.lock ./
RUN bundle config set without "development test" && \
bundle install --jobs=3 --retry=3
FROM base
WORKDIR /app
COPY --from=dependencies /usr/local/bundle/ /usr/local/bundle/
COPY . .
RUN chmod u+x cicd/startup.sh
RUN bundle config set without "development test" && \
bundle install --jobs=3 --retry=3
ENTRYPOINT ["./cicd/startup.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment