Updates rust in docker. Pins circom-compat to pinned FFI branch (#818)

* Updates rust in docker. Pins circom-compat to pinned FFI branch

* Extracts builder image from codex.Dockerfile

* Updates readme

* Use single Dockerfile

* Revert readme back

---------

Co-authored-by: Veaceslav Doina <20563034+veaceslavdoina@users.noreply.github.com>
This commit is contained in:
Ben Bierens 2024-05-31 10:23:11 +02:00 committed by GitHub
parent bd8fedaf28
commit 3246c43174
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 6 deletions

View File

@ -47,7 +47,7 @@
## Slim
1. Build the image using `docker build -t status-im/codexsetup:latest -f codex.Dockerfile ..`
1. Build the image using `docker build -t codexstorage/codexsetup:latest -f codex.Dockerfile ..`
2. The docker image can then be minified using [slim](https://github.com/slimtoolkit/slim). Install slim on your path and then run:
```shell
slim # brings up interactive prompt

View File

@ -1,6 +1,7 @@
# Variables
ARG BUILDER=ubuntu:22.04
ARG BUILDER=ubuntu:24.04
ARG IMAGE=${BUILDER}
ARG RUST_VERSION=${RUST_VERSION:-1.78.0}
ARG BUILD_HOME=/src
ARG MAKE_PARALLEL=${MAKE_PARALLEL:-4}
ARG NIMFLAGS="${NIMFLAGS:-"-d:disableMarchNative"}"
@ -9,11 +10,17 @@ ARG NAT_IP_AUTO=${NAT_IP_AUTO:-false}
# Build
FROM ${BUILDER} AS builder
ARG RUST_VERSION
ARG BUILD_HOME
ARG MAKE_PARALLEL
ARG NIMFLAGS
RUN apt-get update && apt-get install -y git cmake curl make bash lcov build-essential rustc cargo
RUN apt-get update && apt-get install -y git cmake curl make bash lcov build-essential
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- --default-toolchain=${RUST_VERSION} -y
SHELL ["/bin/bash", "-c"]
ENV BASH_ENV="/etc/bash_env"
RUN echo "export PATH=$PATH:$HOME/.cargo/bin" >> $BASH_ENV
WORKDIR ${BUILD_HOME}
COPY . .
@ -29,8 +36,8 @@ ARG NAT_IP_AUTO
WORKDIR ${APP_HOME}
COPY --from=builder ${BUILD_HOME}/build/codex /usr/local/bin
COPY --chmod=0755 docker/docker-entrypoint.sh /
COPY ./openapi.yaml .
COPY --from=builder ${BUILD_HOME}/openapi.yaml .
COPY --from=builder --chmod=0755 ${BUILD_HOME}/docker/docker-entrypoint.sh /
RUN apt-get update && apt-get install -y libgomp1 bash curl jq && rm -rf /var/lib/apt/lists/*
ENV NAT_IP_AUTO=${NAT_IP_AUTO}
ENTRYPOINT ["/docker-entrypoint.sh"]

@ -1 +1 @@
Subproject commit e710e4c333f367353aaa1ee82a55a47326b63a65
Subproject commit 4467e310b75aa0749ff28c1572a84ffce57d7c1c