forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
39 lines (29 loc) · 840 Bytes
/
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
FROM ubuntu:18.04
USER root
# Install dependencies.
RUN apt-get update && apt-get install -y build-essential cmake curl git python
# Create a regular user.
RUN useradd -m rustacean
# Copy the code over, create an empty directory for builds.
ADD . /code
# RUN cd /code
RUN mkdir /build && cd /build
# symlink Rust build directory to the /build volume
# RUN mkdir /build && ln -sf /build /code/build
# Compile rust.
# RUN /code/x.py build
# Generate Makefile using settings suitable for an experimental compiler
RUN /code/configure \
--enable-debug \
--disable-docs \
--enable-llvm-assertions \
--enable-debug-assertions \
--enable-optimize \
--enable-llvm-release-debuginfo \
--experimental-targets=AVR
RUN make
RUN make install
# Drop down to the regular user
USER rustacean
VOLUME /code
VOLUME /build