Skip to content

Commit 3246c43

Browse files
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 <[email protected]>
1 parent bd8feda commit 3246c43

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

docker/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848

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

docker/codex.Dockerfile

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Variables
2-
ARG BUILDER=ubuntu:22.04
2+
ARG BUILDER=ubuntu:24.04
33
ARG IMAGE=${BUILDER}
4+
ARG RUST_VERSION=${RUST_VERSION:-1.78.0}
45
ARG BUILD_HOME=/src
56
ARG MAKE_PARALLEL=${MAKE_PARALLEL:-4}
67
ARG NIMFLAGS="${NIMFLAGS:-"-d:disableMarchNative"}"
@@ -9,11 +10,17 @@ ARG NAT_IP_AUTO=${NAT_IP_AUTO:-false}
910

1011
# Build
1112
FROM ${BUILDER} AS builder
13+
ARG RUST_VERSION
1214
ARG BUILD_HOME
1315
ARG MAKE_PARALLEL
1416
ARG NIMFLAGS
1517

16-
RUN apt-get update && apt-get install -y git cmake curl make bash lcov build-essential rustc cargo
18+
RUN apt-get update && apt-get install -y git cmake curl make bash lcov build-essential
19+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- --default-toolchain=${RUST_VERSION} -y
20+
21+
SHELL ["/bin/bash", "-c"]
22+
ENV BASH_ENV="/etc/bash_env"
23+
RUN echo "export PATH=$PATH:$HOME/.cargo/bin" >> $BASH_ENV
1724

1825
WORKDIR ${BUILD_HOME}
1926
COPY . .
@@ -29,8 +36,8 @@ ARG NAT_IP_AUTO
2936

3037
WORKDIR ${APP_HOME}
3138
COPY --from=builder ${BUILD_HOME}/build/codex /usr/local/bin
32-
COPY --chmod=0755 docker/docker-entrypoint.sh /
33-
COPY ./openapi.yaml .
39+
COPY --from=builder ${BUILD_HOME}/openapi.yaml .
40+
COPY --from=builder --chmod=0755 ${BUILD_HOME}/docker/docker-entrypoint.sh /
3441
RUN apt-get update && apt-get install -y libgomp1 bash curl jq && rm -rf /var/lib/apt/lists/*
3542
ENV NAT_IP_AUTO=${NAT_IP_AUTO}
3643
ENTRYPOINT ["/docker-entrypoint.sh"]

0 commit comments

Comments
 (0)