forked from mrubyc/mrubyc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
71 lines (60 loc) · 2.13 KB
/
Dockerfile
File metadata and controls
71 lines (60 loc) · 2.13 KB
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
63
64
65
66
67
68
69
70
71
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture armhf
# Update Ubuntu sources.list
RUN echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" > /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y --no-install-recommends \
ruby \
qemu-user \
qemu-user-static \
qemu-system-arm \
binfmt-support \
build-essential \
gcc \
clang \
libc++-dev \
libc++abi-dev \
g++-arm-linux-gnueabihf \
libc6-dev-armhf-cross \
libc6:armhf \
g++-mips-linux-gnu \
libc6-dev-mips-cross \
gcc-mips-linux-gnu \
binutils-mips-linux-gnu \
git \
cmake \
make \
libssl-dev \
libssl-dev:armhf \
ca-certificates \
tzdata \
pkg-config \
file \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN gem install rake bundler
ARG USER_ID=1000
RUN useradd -m -u "$USER_ID" mrubyc
RUN mkdir /work && chown mrubyc /work
USER mrubyc
RUN git clone --depth 1 --recursive -b master \
https://github.com/picoruby/picoruby /work/picoruby
WORKDIR /work/picoruby
ENV MRUBY_CONFIG=picoruby-test
RUN rake --trace
ENV MRUBY_CONFIG=arm-linux-gnueabihf
RUN rake --trace
ENV MRUBY_CONFIG=mips-linux-gnu
RUN rake --trace
ENV MRUBY_CONFIG=picoruby-test
VOLUME /work/mrubyc
RUN cd /work/picoruby/mrbgems/picoruby-mrubyc/lib; \
rm -rf mrubyc; \
ln -s /work/mrubyc mrubyc
WORKDIR /work/picoruby