-
Notifications
You must be signed in to change notification settings - Fork 12.6k
/
Dockerfile
51 lines (44 loc) · 1.45 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y --no-install-recommends \
g++-multilib \
make \
file \
curl \
ca-certificates \
python2.7 \
git \
cmake \
xz-utils \
sudo \
gdb \
patch \
libssl-dev \
pkg-config
WORKDIR /build/
COPY musl-libunwind-patch.patch build-musl.sh /build/
RUN sh /build/build-musl.sh && rm -rf /build
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
dpkg -i dumb-init_*.deb && \
rm dumb-init_*.deb
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
RUN curl -o /usr/local/bin/sccache \
https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-09-sccache-x86_64-unknown-linux-musl && \
chmod +x /usr/local/bin/sccache
ENV RUST_CONFIGURE_ARGS \
--target=i686-unknown-linux-musl,i586-unknown-linux-gnu \
--musl-root-i686=/musl-i686 \
--enable-extended
# Newer binutils broke things on some vms/distros (i.e., linking against
# unknown relocs disabled by the following flag), so we need to go out of our
# way to produce "super compatible" binaries.
#
# See: https://github.com/rust-lang/rust/issues/34978
ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
ENV SCRIPT \
python2.7 ../x.py test \
--target i686-unknown-linux-musl \
--target i586-unknown-linux-gnu \
&& \
python2.7 ../x.py dist \
--target i686-unknown-linux-musl \
--target i586-unknown-linux-gnu