-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathDockerfileRocket
96 lines (78 loc) · 3.31 KB
/
DockerfileRocket
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
FROM ubuntu:20.04
ARG SCARB_VERSION
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true
ENV SCARB_VERSION=${SCARB_VERSION}
RUN apt-get clean
RUN apt-get update
RUN apt-get install -y --no-install-recommends curl \
git \
cmake \
build-essential \
gcc \
apt-transport-https \
software-properties-common \
wget \
pkg-config \
libssl-dev
# Installing grafana agent
RUN mkdir -p /etc/apt/keyrings/
RUN wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | tee /etc/apt/keyrings/grafana.gpg > /dev/null
RUN echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list
RUN apt-get update
RUN apt-get install grafana-agent-flow
# ----------------------------------------------------------------------------
# ASDF INSTALLATION
# ----------------------------------------------------------------------------
RUN apt-get update && \
apt-get install -y --no-install-recommends \
automake \
autoconf \
libreadline-dev && \
rm -rf /var/lib/apt/lists/*
ENV ASDF_VERSION="v0.13.1"
RUN git clone --branch "${ASDF_VERSION}" https://github.com/asdf-vm/asdf.git ~/.asdf
ENV ASDF_DIR="/root/.asdf"
ENV PATH="${ASDF_DIR}/bin:${ASDF_DIR}/shims:${PATH}"
RUN echo -e '\n. $ASDF_DIR/asdf.sh' >> /root/.bashrc && \
echo -e '\n. $ASDF_DIR/completions/asdf.bash' >> /root/.bashrc
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# INSTALL SCARB USING ASDF
# ----------------------------------------------------------------------------
RUN asdf plugin add scarb
RUN asdf install scarb ${SCARB_VERSION}
RUN asdf global scarb ${SCARB_VERSION}
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# INSTALL UNIVERSAL SIERRA COMPILER
# ----------------------------------------------------------------------------
RUN curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | bash
ENV PATH="/root/.local/bin:${PATH}"
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# INSTALL FOUNDRY USING ASDF
# ----------------------------------------------------------------------------
RUN asdf plugin add starknet-foundry
RUN asdf install starknet-foundry latest
RUN asdf global starknet-foundry latest
# ----------------------------------------------------------------------------
WORKDIR /opt/app
SHELL ["/bin/bash", "-lc"]
# ----------------------------------------------------------------------------
# INSTALL RUST
# ----------------------------------------------------------------------------
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
RUN whoami
ENV PATH="/root/.cargo/bin:${PATH}"
# ----------------------------------------------------------------------------
# copy Remix plugin source
COPY . /opt/app
RUN git submodule update --init
# Build the API service
WORKDIR /opt/app/api
RUN cargo build --release
RUN chmod +x ./docker_run.sh
EXPOSE 8000
WORKDIR /opt/app/api
ENTRYPOINT [ "./docker_run.sh" ]