Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Dockerfile will no longer build using rust:1.59.0 as base #140

@camilovietnam

Description

@camilovietnam

Running on a Mac M1
The process to build the Dockerfile image:

docker build -t circom .

is failing with either a timeout because the update of "crates.io index" takes a very long time, or with an error related to requirement "num-traits":

[+] Building 176.3s (8/10)                                                                                                                                                     docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                                           0.0s
 => => transferring dockerfile: 649B                                                                                                                                                           0.0s
 => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)                                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/node:16.14.2                                                                                                                                1.1s
 => [internal] load metadata for docker.io/library/rust:1.59.0                                                                                                                                 0.0s
 => [auth] library/node:pull token for registry-1.docker.io                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                                                                0.0s
 => CACHED [circom-instaler 1/4] FROM docker.io/library/rust:1.59.0                                                                                                                            0.0s
 => [stage-1 1/2] FROM docker.io/library/node:16.14.2@sha256:6e54786b2ad01667d46524e82806298714f50d2be72b39706770aed55faedbd7                                                                  0.0s
 => ERROR [circom-instaler 2/4] RUN git clone https://github.com/iden3/circom.git &&     cd circom &&     cargo build --release &&     cargo install --path circom                           175.1s
------                                                                                                                                                                                              
 > [circom-instaler 2/4] RUN git clone https://github.com/iden3/circom.git &&     cd circom &&     cargo build --release &&     cargo install --path circom:                                        
0.238 Cloning into 'circom'...                                                                                                                                                                      
2.632     Updating crates.io index                                                                                                                                                                  
175.0 error: failed to select a version for the requirement `num-traits = "^0.2.6"`                                                                                                                 
175.0 candidate versions found which didn't match: 0.2.18, 0.2.17, 0.2.16, ...                                                                                                                      
175.0 location searched: crates.io index
175.0 required by package `parser v2.2.2 (/circom/parser)`
------

 1 warning found (use docker --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)
Dockerfile:8
--------------------
   7 |     
   8 | >>> RUN git clone https://github.com/iden3/circom.git && \
   9 | >>>     cd circom && \
  10 | >>>     cargo build --release && \
  11 | >>>     cargo install --path circom
  12 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c git clone https://github.com/iden3/circom.git &&     cd circom &&     cargo build --release &&     cargo install --path circom" did not complete successfully: exit code: 101

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/xexmd9rlnvrn34l6uon27aihz
(base)                                                                                                                                                      

You can use the rust 1.87.0 image as base, but that still does not work because the final image is based on node:16.14.2, and when you try to run circom, you get an error about GLIBC:

circom: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by circom)
circom: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by circom)
circom: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by circom)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions