forked from datafuselabs/databend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (31 loc) 路 1.36 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
FROM debian:bullseye
ENV TERM=dumb
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -yq && \
apt-get install -yq locales sudo unzip file && \
printf 'en_US.UTF-8 UTF-8\n' > /etc/locale.gen && \
locale-gen && \
rm -rf /var/lib/apt/lists/*
ENV LANGUAGE en_US
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
COPY rust-toolchain.toml /build/rust-toolchain.toml
COPY dev_setup.sh /build/scripts/setup/dev_setup.sh
RUN chmod +x /build/scripts/setup/dev_setup.sh && \
/build/scripts/setup/dev_setup.sh -yb && \
rm -rf /root/.cargo/git && \
rm -rf /root/.cargo/registry && \
mkdir -p /opt/rust && \
mv /root/.cargo /opt/rust/cargo && \
mv /root/.rustup /opt/rust/rustup
RUN ln -s $(readlink -f `which javac` | sed "s:/bin/javac::") /opt/java
RUN curl -sSfLo /tmp/mold.tar.gz https://github.com/rui314/mold/releases/download/v2.0.0/mold-2.0.0-$(uname -m)-linux.tar.gz && \
tar --strip-components=1 -xzf /tmp/mold.tar.gz -C /usr/local && \
rm -rf /tmp/mold.tar.gz && \
ln -sf /usr/local/bin/mold /usr/bin/$(uname -m)-linux-gnu-ld
ENV JAVA_HOME /opt/java
ENV LD_LIBRARY_PATH /opt/java/lib/server
ENV RUSTUP_HOME /opt/rust/rustup
ENV CARGO_HOME /opt/rust/cargo
ENV PATH /opt/rust/cargo/bin:/opt/java/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
VOLUME [ "/workspace", "/opt/rust/cargo/registry", "/opt/rust/cargo/git" ]