/
Dockerfile.debian
41 lines (31 loc) · 1.85 KB
/
Dockerfile.debian
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
# LICENSE UPL 1.0
#
# Copyright (c) 2023 Oracle and/or its affiliates.
#
ARG BASE_IMAGE=debian:buster-slim
FROM ${BASE_IMAGE}
LABEL \
org.opencontainers.image.url='https://github.com/graalvm/container' \
org.opencontainers.image.source='https://github.com/graalvm/container/tree/master/truffleruby-community' \
org.opencontainers.image.title='TruffleRuby Community Edition' \
org.opencontainers.image.authors='GraalVM Sustaining Team <graalvm-sustaining_ww_grp@oracle.com>' \
org.opencontainers.image.description='TruffleRuby is the GraalVM high-performance implementation of the Ruby programming language.'
ARG GRAALVM_VERSION=23.0.0
ARG TARGETPLATFORM
ARG GRAALVM_PKG=https://github.com/oracle/truffleruby/releases/download/vm-$GRAALVM_VERSION/truffleruby-$GRAALVM_VERSION-GRAALVM_ARCH.tar.gz
WORKDIR /app
ENV LANG=en_US.UTF-8 \
PATH=/opt/truffleruby-$GRAALVM_VERSION/bin:$PATH
SHELL ["/bin/bash", "-c"]
RUN set -eux \
&& apt-get update -y \
&& apt-get install -y locales ca-certificates curl tar gzip libz-dev libssl-dev gcc make \
&& rm -rf /var/lib/apt/lists/*
RUN set -eux \
&& mkdir -p /opt/truffleruby-$GRAALVM_VERSION \
&& if [ "$TARGETPLATFORM" == "linux/amd64" ]; then (curl --fail --silent --location --retry 3 ${GRAALVM_PKG/GRAALVM_ARCH/linux-amd64} | gunzip | tar x -C /opt/truffleruby-$GRAALVM_VERSION --strip-components=1) && /opt/truffleruby-$GRAALVM_VERSION/lib/truffle/post_install_hook.sh; fi \
&& if [ "$TARGETPLATFORM" == "linux/arm64" ]; then (curl --fail --silent --location --retry 3 ${GRAALVM_PKG/GRAALVM_ARCH/linux-aarch64} | gunzip | tar x -C /opt/truffleruby-$GRAALVM_VERSION --strip-components=1) && /opt/truffleruby-$GRAALVM_VERSION/lib/truffle/post_install_hook.sh; fi \
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
&& locale-gen \
&& echo "gem: --no-document" > ~/.gemrc
CMD [ "irb" ]