forked from CenturyLinkLabs/alpine-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (22 loc) · 975 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM alpine:3.2
MAINTAINER CenturyLink Labs <[email protected]>
ENV BUILD_PACKAGES="curl-dev ruby-dev build-base" \
DEV_PACKAGES="zlib-dev libxml2-dev libxslt-dev tzdata yaml-dev sqlite-dev postgresql-dev mysql-dev" \
RUBY_PACKAGES="ruby ruby-io-console ruby-json yaml nodejs" \
RAILS_VERSION="4.2.3"
RUN \
apk --update --upgrade add $BUILD_PACKAGES $RUBY_PACKAGES $DEV_PACKAGES && \
gem install -N bundler
RUN gem install -N nokogiri -- --use-system-libraries && \
gem install -N rails --version "$RAILS_VERSION" && \
echo 'gem: --no-document' >> ~/.gemrc && \
cp ~/.gemrc /etc/gemrc && \
chmod uog+r /etc/gemrc && \
# cleanup and settings
bundle config --global build.nokogiri "--use-system-libraries" && \
bundle config --global build.nokogumbo "--use-system-libraries" && \
find / -type f -iname \*.apk-new -delete && \
rm -rf /var/cache/apk/* && \
rm -rf /usr/lib/lib/ruby/gems/*/cache/* && \
rm -rf ~/.gem
EXPOSE 3000