-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-ubuntu-arm-aarch64
55 lines (45 loc) · 2.01 KB
/
Dockerfile-ubuntu-arm-aarch64
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
######################## build ###############################
FROM ubuntu:latest as builder
RUN apt-get update
RUN apt-get install -y build-essential git m4 unzip rsync curl libev-dev libgmp-dev pkg-config libhidapi-dev
RUN apt-get install -y wget libcap2 bubblewrap
ARG net=mainnet
RUN git clone https://gitlab.com/tezos/tezos.git
WORKDIR tezos
RUN git checkout $net
RUN wget https://github.com/ocaml/opam/releases/download/2.0.5/opam-2.0.5-arm64-linux
RUN mv opam-2.0.5-arm64-linux /usr/local/bin/opam
RUN chmod a+x /usr/local/bin/opam
RUN opam init --comp=4.06.1 --disable-sandboxing
RUN opam switch 4.06.1
RUN opam update
RUN make build-deps
RUN eval $(opam config env) && make
RUN mkdir /_scripts && mkdir /_bin
RUN cp -a scripts/docker/entrypoint.sh /_bin/ && \
cp -a scripts/docker/entrypoint.inc.sh /_bin/ && \
cp scripts/tezos-docker-manager.sh /_scripts/ && \
cp scripts/alphanet_version /_scripts/ && \
cp src/bin_client/bash-completion.sh /_scripts/ && \
cp active_protocol_versions /_scripts/
######################### final ###############################
FROM ubuntu:latest as final
RUN apt-get update && \
apt-get install -y libev-dev libgmp-dev libhidapi-dev netbase && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mkdir -p /var/run/tezos/node /var/run/tezos/client
COPY --from=builder /_scripts/* /usr/local/share/tezos/
COPY --from=builder /_bin/* /usr/local/bin/
COPY --from=builder /tezos/tezos-node /usr/local/bin/
COPY --from=builder /tezos/tezos-accuser-* /usr/local/bin/
COPY --from=builder /tezos/tezos-admin-client /usr/local/bin/
COPY --from=builder /tezos/tezos-baker-* /usr/local/bin/
COPY --from=builder /tezos/tezos-client /usr/local/bin/
COPY --from=builder /tezos/tezos-endorser-* /usr/local/bin/
COPY --from=builder /tezos/tezos-node /usr/local/bin/
COPY --from=builder /tezos/tezos-protocol-compiler /usr/local/bin/
COPY --from=builder /tezos/tezos-signer /usr/local/bin/
RUN useradd -ms /bin/bash tezos
USER tezos
ENV USER=tezos
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]