-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
41 lines (32 loc) · 962 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
40
41
FROM debian:jessie-slim
LABEL maintainer "Francois Teychene <[email protected]>"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install \
ca-certificates \
curl \
gcc \
libc6-dev \
-qqy \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV RUST_ARCHIVE=rust-nightly-x86_64-unknown-linux-gnu.tar.gz
ENV RUST_DOWNLOAD_URL=https://static.rust-lang.org/dist/$RUST_ARCHIVE
RUN mkdir -p /rust
WORKDIR /rust
RUN curl -fsOSL $RUST_DOWNLOAD_URL \
&& curl -s $RUST_DOWNLOAD_URL.sha256 | sha256sum -c - \
&& tar -C /rust -xzf $RUST_ARCHIVE --strip-components=1 \
&& rm $RUST_ARCHIVE \
&& ./install.sh
RUN apt-get update && \
apt-get install -y \
openssl \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /rust/app
WORKDIR /rust/app
COPY . /rust/app
RUN cargo build --release
CMD ["cargo", "run", "--release"]