Skip to content

Instantly share code, notes, and snippets.

@oki
Created December 23, 2021 13:31
Show Gist options
  • Save oki/f04a68001671e19e07114bb6dba10ed4 to your computer and use it in GitHub Desktop.
Save oki/f04a68001671e19e07114bb6dba10ed4 to your computer and use it in GitHub Desktop.
FROM ruby:2.3.1
RUN sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list && apt-get update -qq && apt-get install -y \
build-essential \
libpq-dev nodejs \
libsodium-dev \
lsof \
vim \
graphicsmagick \
postgresql-client \
locales \
locales-all \
tzdata \
unrar \
p7zip-full
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV TZ Europe/Warsaw
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV app /app
RUN mkdir -p $app
WORKDIR $app
COPY Gemfile /$app/Gemfile
COPY Gemfile.lock /$app/Gemfile.lock
RUN bundle install
COPY config/database.yml-docker /$app/config/database.yml
ADD . $app
ARG ASSET_HOST
RUN dotenv -f .ci bundle exec rake ASSET_HOST=${ASSET_HOST} RAILS_ENV=production assets:precompile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment