-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
24 lines (19 loc) · 903 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
FROM ubuntu:20.04 as builder
ENV TZ=Europe/Stockholm
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get -y update && apt-get -y install protobuf-compiler curl git libssl-dev libudev-dev make pkg-config zlib1g-dev llvm clang cmake openssh-client
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup component add rustfmt && rustup update
COPY . /solana
WORKDIR /solana
RUN --mount=type=ssh cargo build --release
RUN rm /solana/target/release/deps -rf
RUN rm /solana/target/release/build -rf
FROM ubuntu:20.04 as dest
RUN apt-get -y update && apt-get -y install libssl-dev libudev-dev curl
COPY --from=builder /solana/target/release/ /usr/local/solana
COPY ./entrypoint.sh /entrypoint.sh
ENV PATH="/usr/local/solana:$PATH"
# CMD /bin/bash