forked from ruby/docker-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-arm64
62 lines (54 loc) · 1.4 KB
/
Dockerfile-arm64
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM multiarch/ubuntu-core:arm64-bionic
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ADD ruby_build_deps.txt /tmp/
RUN set -ex && \
\
apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
gcc \
libffi-dev \
libgdbm-dev \
libgmp-dev \
libncurses5-dev \
libreadline-dev \
libssl-dev \
libyaml-dev \
make \
autoconf \
bison \
git \
tzdata \
zlib1g-dev \
$(cat /tmp/ruby_build_deps.txt)
RUN set -ex && \
useradd -ms /bin/bash ubuntu
ADD tmp/ruby /usr/src/ruby
ADD install_ruby.sh /tmp/
ARG RUBY_VERSION=2.6.3
ENV RUBY_VERSION=$RUBY_VERSION
ENV RUBYGEMS_VERSION=3.0.3
ARG optflags
ARG debugflags
ARG cppflags
RUN set -ex && \
# skip installing gem documentation
mkdir -p /usr/local/etc && \
{ \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /usr/local/etc/gemrc && \
\
/tmp/install_ruby.sh && \
rm /tmp/install_ruby.sh && \
\
dpkg-query --show --showformat '${package}\n' \
| grep -P '^libreadline\d+$' \
| xargs apt-mark manual && \
\
apt-get purge -y --auto-remove $(cat /tmp/ruby_build_deps.txt) && \
rm /tmp/ruby_build_deps.txt && \
\
apt-get clean && \
rm -r /var/lib/apt/lists/*