-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
55 lines (41 loc) · 1.83 KB
/
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
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
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt -y install wget curl vim net-tools iputils-ping openssh-server
RUN wget -O /sbin/zinit https://github.com/threefoldtech/zinit/releases/download/v0.2.5/zinit && \
chmod +x /sbin/zinit
ENV ALGORAND_DATA=/var/lib/algorand
RUN echo export ALGORAND_DATA=/var/lib/algorand >> ~/.bashrc
RUN curl -O https://releases.algorand.com/key.pub &&\
apt-get update &&\
apt-get install -y gnupg2 software-properties-common &&\
apt-key add key.pub &&\
add-apt-repository "deb [arch=amd64] https://releases.algorand.com/deb/ stable main" &&\
apt-get update &&\
apt-get install -y algorand-devtools algorand
RUN apt update && \
apt -y install expect
RUN apt-get update &&\
apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg &&\
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null &&\
apt-get update &&\
apt-get install -y docker-ce docker-ce-cli containerd.io
RUN wget https://github.com/docker/compose/releases/download/v2.1.0/docker-compose-linux-x86_64 &&\
mv ./docker-compose-linux-x86_64 /usr/local/bin/docker-compose &&\
chmod a+x /usr/local/bin/docker-compose
COPY indexer /indexer
RUN mkdir -p /var/algorand/data &&\
mkdir -p /var/lib/postgresql/data/ &&\
cp /indexer/config.json /var/algorand/config.json
COPY scripts /scripts
RUN chmod -R +x /scripts
RUN mkdir -p /etc/zinit
COPY zinit /etc/zinit
ENTRYPOINT [ "/sbin/zinit", "init" ]
# IMAGE_TAG: threefolddev/algorand:v1.0-all