-
Notifications
You must be signed in to change notification settings - Fork 30
/
Dockerfile
52 lines (42 loc) · 1.19 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
# Download custom base
FROM ubuntu:22.04
# Build Arguments
ARG TARGETPLATFORM
ARG VERSION
# LABEL about the custom image
LABEL maintainer="[email protected]"
LABEL version=$VERSION
LABEL description="Massa node with massa-guard features"
# Set timezone and default cli
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/Paris"
# Update and install packages dependencies
RUN apt-get update \
&& apt-get upgrade -y \
&& apt install -y curl wget screen procps python3 \
&& apt autoclean -y
# Download the Massa package
COPY download-massa.sh .
RUN chmod u+x download-massa.sh \
&& ./download-massa.sh \
&& rm download-massa.sh
# Create massa-guard tree
RUN mkdir /massa-guard \
&& mkdir /massa-guard/sources \
&& mkdir /massa-guard/config
# Copy massa-guard sources
COPY massa-guard.sh /massa-guard/
COPY sources /massa-guard/sources
COPY config /massa-guard/config
# Conf rights
RUN chmod +x /massa-guard/massa-guard.sh \
&& chmod +x /massa-guard/sources/* \
&& mkdir /massa_mount
# Expose ports
EXPOSE 31244
EXPOSE 31245
EXPOSE 33035
# Node run then massa-guard
CMD /massa-guard/sources/init_copy_host_files.sh \
&& bash /massa-guard/sources/run.sh \
&& bash /massa-guard/massa-guard.sh