-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (26 loc) · 983 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
FROM rust
RUN apt-get update
RUN apt-get -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
RUN apt-get install -y build-essential git clang cmake libstdc++-10-dev libssl-dev libxxhash-dev zlib1g-dev pkg-config
# use mold!
ENV MOLD_PATH=/home/mold
RUN git clone https://github.com/rui314/mold.git $MOLD_PATH
WORKDIR ${MOLD_PATH}
RUN git checkout v1.0.2
RUN make -j$(nproc) CXX=clang++
RUN make install
RUN apt-get update
RUN apt-get -y install docker-ce
RUN rustup install nightly
# setup project
ENV SENTINEL_PATH=/home/sentinel
WORKDIR ${SENTINEL_PATH}
COPY Cargo.lock .
COPY Cargo.toml .
COPY ./src src
COPY ./resources resources
RUN mkdir .cargo
RUN cargo vendor > .cargo/config
CMD ["cargo", "+nightly", "run", "--", "-d", "ubuntu-echo", "-e", "/echo"]