-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-debug
56 lines (45 loc) · 1.99 KB
/
Dockerfile-debug
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
52
53
54
55
56
FROM docker.uclv.cu/ubuntu:focal as builder
# TODO - delete next line if you are not from Cuba
COPY ./sources.list /etc/apt/
# TODO - delete proxy lines
RUN export HTTP_PROXY="http://192.168.49.1:8282" \
&& export http_proxy="http://192.168.49.1:8282" \
https_proxy="http://192.168.49.1:8282" \
&& apt update \
&& unset HTTP_PROXY http_proxy https_proxy
RUN export HTTP_PROXY="http://192.168.49.1:8282" \
&& export http_proxy="http://192.168.49.1:8282" \
https_proxy="http://192.168.49.1:8282" \
&& apt install --no-install-recommends -y git clang curl libssl-dev llvm libudev-dev ca-certificates \
&& unset HTTP_PROXY http_proxy https_proxy
RUN export HTTP_PROXY="http://192.168.49.1:8282" \
&& export http_proxy="http://192.168.49.1:8282" \
https_proxy="http://192.168.49.1:8282" \
&& curl https://sh.rustup.rs -sSf | sh -s -- -y \
&& unset HTTP_PROXY http_proxy https_proxy
RUN export HTTP_PROXY="http://192.168.49.1:8282" \
&& export http_proxy="http://192.168.49.1:8282" \
https_proxy="http://192.168.49.1:8282" \
&& . $HOME/.cargo/env \
&& rustup default stable \
&& rustup update \
&& rustup update nightly \
&& rustup target add wasm32-unknown-unknown --toolchain nightly \
&& unset HTTP_PROXY http_proxy https_proxy
WORKDIR /usr/src/app
COPY ./ ./
RUN export HTTP_PROXY="http://192.168.49.1:8282" \
&& export http_proxy="http://192.168.49.1:8282" \
https_proxy="http://192.168.49.1:8282" \
&& export CARGO_HTTP_TIMEOUT=300 \
&& export HTTP_TIMEOUT=300 \
&& export CARGO_HTTP_LOW_SPEED_LIMIT=1 \
&& export CARGO_HTTP_PROXY="http://192.168.49.1:8282" HTTPS_PROXY="http://192.168.49.1:8282" \
&& . $HOME/.cargo/env \
&& cargo build \
&& unset HTTP_PROXY http_proxy https_proxy
################################################################
FROM docker.uclv.cu/ubuntu:focal
COPY --from=builder /usr/src/app/target/debug /usr/local/bin/myapp
WORKDIR /usr/local/bin/myapp
CMD ["./node-template --help"]