-
Notifications
You must be signed in to change notification settings - Fork 62
/
Dockerfile.addresses
27 lines (24 loc) · 973 Bytes
/
Dockerfile.addresses
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
FROM haskell:8.10.7 AS build
WORKDIR /build
RUN apt-get update && apt-get install --no-install-recommends -y build-essential git
RUN stack upgrade
# Install cardano-addresses
ARG VERSION
RUN echo "Building tags/$VERSION..." \
&& git clone https://github.com/IntersectMBO/cardano-addresses \
&& cd cardano-addresses \
&& git fetch --all --recurse-submodules --tags \
&& git tag \
&& git checkout tags/$VERSION \
&& stack setup \
&& stack build --only-snapshot \
&& stack build --only-dependencies \
&& stack install --flag cardano-addresses:release
# Run
FROM debian:stable-slim
COPY --from=build /root/.local/bin /bin
RUN mkdir /etc/bash_completion.d
RUN cardano-address --bash-completion-script `which cardano-address` > /etc/bash_completion.d/cardano-address
RUN echo "source /etc/bash_completion.d/cardano-address" >> ~/.bashrc
RUN echo "cardano-address --help" >> ~/.bashrc
ENTRYPOINT ["cardano-address"]