From 79a34ca1f5123e311d29c964de2cd0af348b214c Mon Sep 17 00:00:00 2001 From: Asiya-Yunusa Date: Mon, 6 Nov 2023 19:34:20 +0100 Subject: [PATCH] Updating dockerfile with changes in develop branch to fix failing builds --- .github/workflows/api-deploy.yml | 2 +- DockerfileRocket | 36 ++++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/api-deploy.yml b/.github/workflows/api-deploy.yml index 27aa702d..db1d6e41 100644 --- a/.github/workflows/api-deploy.yml +++ b/.github/workflows/api-deploy.yml @@ -131,7 +131,7 @@ jobs: # inject the expected React package URL for CORS logic environment-variables: | RUST_LOG=INFO - VITE_URL=https://zksync-cairo-remix-dev.nethermind.io + VITE_URL=https://zksync-plugin.nethermind.dev PROMTAIL_USERNAME=${{secrets.PROMTAIL_USERNAME}} PROMTAIL_PASSWORD=${{secrets.PROMTAIL_PASSWORD}} diff --git a/DockerfileRocket b/DockerfileRocket index bf8b47b6..b8f2ff27 100644 --- a/DockerfileRocket +++ b/DockerfileRocket @@ -3,15 +3,32 @@ FROM ubuntu:20.04 ENV DEBIAN_FRONTEND=noninteractive ENV DEBCONF_NONINTERACTIVE_SEEN=true +RUN apt-get clean + RUN apt-get update RUN apt-get install -y curl \ - git \ - cmake \ - build-essential \ - gcc + git \ + cmake \ + build-essential \ + gcc \ + apt-transport-https \ + software-properties-common \ + wget + +# 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 WORKDIR /opt/app +SHELL ["/bin/bash", "-lc"] + +# copy Remix plugin source and install Rust COPY . /opt/app RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y @@ -20,17 +37,14 @@ RUN whoami ENV PATH="/root/.cargo/bin:${PATH}" -RUN git submodule update --init - # Build the API service WORKDIR /opt/app/api -RUN cargo build -# Build the cairo compiler -WORKDIR /opt/app/api/cairo -RUN cargo run -q --bin cairo-compile -- --version +RUN cargo build --release + +RUN chmod +x ./docker_run.sh EXPOSE 8000 WORKDIR /opt/app/api -ENTRYPOINT [ "cargo", "run" ] +ENTRYPOINT [ "./docker_run.sh" ] \ No newline at end of file