Skip to content

Instantly share code, notes, and snippets.

@bibendi
Created June 9, 2016 19:26
Show Gist options
  • Save bibendi/ee03cd52640050ecbd328d567d6fd6aa to your computer and use it in GitHub Desktop.
Save bibendi/ee03cd52640050ecbd328d567d6fd6aa to your computer and use it in GitHub Desktop.
FROM ruby:1.9.3-slim
RUN apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
locales \
make \
gcc \
g++ \
libxml2-dev \
libxslt-dev \
pkg-config \
libcurl3-dev \
libpq-dev \
libgmp3-dev \
postgresql-client \
git-core \
ssh \
libmagickwand-dev \
graphicsmagick-libmagick-dev-compat \
libsqlite3-dev \
catdoc \
enca \
libmysqlclient-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
truncate -s 0 /var/log/*log
RUN echo "Asia/Yekaterinburg" > /etc/timezone && \
dpkg-reconfigure -f noninteractive tzdata && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
echo 'LANG="en_US.UTF-8"' > /etc/default/locale && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
EXPOSE 3000
VOLUME /data
ENV BUNDLE_PATH /data/bundle
ENV PATH /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH
ARG APRESS_GEMS_CREDENTIALS
RUN echo 'gem: --no-rdoc --no-ri --no-document' > /root/.gemrc && \
ssh-keyscan -H github.com >> /etc/ssh/ssh_known_hosts && \
gem update --system && \
gem install bundler && \
bundle config --global jobs 4 && \
bundle config --global without production && \
bundle config --global gems.railsc.ru $APRESS_GEMS_CREDENTIALS && \
bundle config --global build.nokogiri --use-system-libraries
WORKDIR /app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment