forked from abracadaniel/cardano-pool-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.cncli
46 lines (37 loc) · 1.39 KB
/
Dockerfile.cncli
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
FROM debian:buster-slim as build
# Install build dependencies
RUN apt-get update -y \
&& apt-get install -y automake build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ tmux git jq wget libncursesw5 libtool autoconf \
&& apt-get install -y libsqlite3-dev m4 ca-certificates gcc libc6-dev curl \
&& apt-get clean
# Install rust
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN cat /usr/local/cargo/env
RUN rustup install stable \
&& rustup default stable \
&& rustup update \
&& rustup component add clippy rustfmt
# Install cncli
ARG VERSION
RUN echo "Building tags/v$VERSION..." \
&& git clone --recurse-submodules https://github.com/cardano-community/cncli \
&& cd cncli \
&& git fetch --all --recurse-submodules --tags \
&& git tag \
&& git checkout tags/v$VERSION \
&& cargo install --path . --force \
&& cncli --version
# Run
FROM arradev/cardano-node:latest AS node
FROM debian:stable-slim
SHELL ["/bin/bash", "-c"]
# Install dependencies
RUN apt-get update -y \
&& apt-get install -y openssl \
&& apt-get clean
# Install compiled files
COPY --from=build /usr/local/cargo/bin/cncli /bin/cncli
ENTRYPOINT ["cncli"]