Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mileszs
Last active March 5, 2019 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mileszs/2602f70a5e17f9a6f9111f1a7ae43899 to your computer and use it in GitHub Desktop.
Save mileszs/2602f70a5e17f9a6f9111f1a7ae43899 to your computer and use it in GitHub Desktop.
# stage 1
FROM madnight/docker-alpine-wkhtmltopdf:alpine-3.8 as base
# stage 2
FROM ruby:2.6.1-alpine3.8
# copy over wkhtmltopdf apline binary
COPY --from=base /bin/wkhtmltopdf /usr/bin/wkhtmltopdf
COPY .aptible.yml Procfile /.aptible/
COPY Gemfile Gemfile.lock /app/
RUN apk add --no-cache --virtual .builddeps \
build-base \
&& apk add --no-cache \
git \
glib \
libgcc \
libstdc++ \
libx11 \
libxrender \
libxext \
libintl \
libcrypto1.0 \
libssl1.0 \
ttf-dejavu \
ttf-droid \
ttf-freefont \
ttf-liberation \
ttf-ubuntu-font-family \
postgresql-dev \
tzdata \
&& cd /app \
&& gem update --system 3.0.3 \
&& bundle install \
&& apk del --no-network .builddeps
WORKDIR /app
COPY . .
EXPOSE 3000
CMD ["bundle", "exec", "rails", "s", "-b", "0.0.0.0", "-p", "3000"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment