-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile-glibc
42 lines (34 loc) · 1.18 KB
/
Dockerfile-glibc
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
29
30
31
32
33
34
35
36
37
38
39
40
41
# vim:set fenc=utf-8 ts=2 sw=2 sts=2 et ft=dockerfile:
ARG ALPINE_VERSION
FROM frolvlad/alpine-glibc:alpine-${ALPINE_VERSION}
LABEL "org.opencontainers.image.authors"="Andrius Kairiukstis <k@andrius.mobi>"
LABEL "org.opencontainers.image.source"="https://github.com/andrius/alpine-ruby"
LABEL "org.opencontainers.image.description"="Minimal dockerized ruby based on frolvlad/alpine Linux (Alpine with GNU C library - glibc)"
RUN apk --no-cache add bash
SHELL ["/bin/bash", "-c"]
RUN apk --no-cache add \
ca-certificates \
less \
libressl \
ruby \
ruby-bigdecimal \
ruby-etc \
ruby-io-console \
ruby-irb
COPY gemrc /root/.gemrc
# The following is needed for nokogiri
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=1
# It tries to install ruby bundler with failback to apk version and nokoiri
RUN <<EOF
apk add --no-cache --virtual .build-dependencies build-base ruby-dev libressl-dev
ERR=$(gem install bundler 2>&1);
if [[ $ERR =~ \`(.+)\` ]]; then
eval "${BASH_REMATCH[1]} 2>&1"
fi || apk add ruby-bundler
gem install json
bundle config build.nokogiri --use-system-libraries
bundle config git.allow_insecure true
gem cleanup
rm -rf /usr/lib/ruby/gems/*/cache/*
apk del .build-dependencies
EOF