Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build docker image on drew-erup-4 branch #307

Closed
nymkappa opened this issue Jun 7, 2021 · 0 comments
Closed

Unable to build docker image on drew-erup-4 branch #307

nymkappa opened this issue Jun 7, 2021 · 0 comments

Comments

@nymkappa
Copy link

nymkappa commented Jun 7, 2021

Hi,

I'm trying to build the docker image from drew-erup-4 branch (for ICON BTP development purpose) but I'm stuck with the following error.

Would it be possible to either provide an image for this branch or guide us for building it locally? Thank you.

#7 137.4   Downloaded libp2p-swarm-derive v0.23.0
#7 137.5 error: failed to parse manifest at `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-swarm-derive-0.23.0/Cargo.toml`
#7 137.5 
#7 137.5 Caused by:
#7 137.5   feature `resolver` is required
#7 137.5 
#7 137.5   consider adding `cargo-features = ["resolver"]` to the manifest

This is my Dockerfile.local so far

FROM ubuntu as builder

LABEL maintainer="[email protected]"

ARG RUST_VERSION=nightly-2020-10-06
ARG PROFILE=release
ARG BINARY_NAME=edgeware
ARG PACKAGE_NAME=edgeware-cli
ARG GIT_REPO=https://github.com/hicommonwealth/edgeware-node
ARG GIT_BRANCH=drew-erup-4

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
    clang \
    cmake \
    curl \
    git \
    libssl-dev \
    pkg-config

COPY . /edgeware

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
    export PATH=$PATH:$HOME/.cargo/bin && \
    git clone ${GIT_REPO} source && \
    cd source && \
    git checkout ${GIT_BRANCH} && \
    git submodule update --init --recursive && \
    rustup default ${RUST_VERSION} && \
    rustup toolchain install ${RUST_VERSION} && \	
    rustup target add wasm32-unknown-unknown --toolchain ${RUST_VERSION} && \
    cargo +${RUST_VERSION} build -p ${PACKAGE_NAME} --${PROFILE} && \
    cp target/${PROFILE}/${BINARY_NAME} /node

# ===== SECOND STAGE ======

FROM ubuntu

COPY --from=builder /node /usr/local/bin

# install curl in the event we want to interact with the local rpc
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl
RUN useradd --create-home runner

USER runner
EXPOSE 30333 9933 9944

ENTRYPOINT ["node"]

Build log

joris@joriss-MacBook-Pro edgeware-node % docker build -f docker/Dockerfile.local .        
[+] Building 143.3s (8/11)                                                                         
 => [internal] load build definition from Dockerfile.local                                    0.1s
 => => transferring dockerfile: 43B                                                           0.1s
 => [internal] load .dockerignore                                                             0.0s
 => => transferring context: 35B                                                              0.0s
 => [internal] load metadata for docker.io/library/ubuntu:latest                              2.5s
 => [internal] load build context                                                             3.0s
 => => transferring context: 1.54MB                                                           2.9s
 => CACHED [builder 1/4] FROM docker.io/library/ubuntu@sha256:adf73ca014822ad8237623d388cedf  0.0s
 => CACHED [builder 2/4] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get instal  0.0s
 => CACHED [builder 3/4] COPY . /edgeware                                                     0.0s
 => ERROR [builder 4/4] RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh  137.6s
------                                                                                             
 > [builder 4/4] RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y &&     export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$HOME/.cargo/bin &&     git clone https://github.com/hicommonwealth/edgeware-node source &&     cd source &&     git checkout drew-erup-4 &&     git submodule update --init --recursive &&     rustup default nightly-2020-10-06 &&     rustup toolchain install nightly-2020-10-06 &&     rustup target add wasm32-unknown-unknown --toolchain nightly-2020-10-06 &&     cargo +nightly-2020-10-06 build -p edgeware-cli --release &&     cp target/release/edgeware /node:
#7 1.253 info: downloading installer
#7 3.273 info: profile set to 'default'
#7 3.274 info: default host triple is x86_64-unknown-linux-gnu
#7 3.276 info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
#7 3.457 info: latest update on 2021-05-10, rust version 1.52.1 (9bc8c42bb 2021-05-09)
#7 3.458 info: downloading component 'cargo'
#7 3.972 info: downloading component 'clippy'
#7 4.134 info: downloading component 'rust-docs'
#7 5.362 info: downloading component 'rust-std'
#7 6.815 info: downloading component 'rustc'
#7 10.24 info: downloading component 'rustfmt'
#7 10.52 info: installing component 'cargo'
#7 11.20 info: installing component 'clippy'
#7 11.53 info: installing component 'rust-docs'
#7 15.73 info: installing component 'rust-std'
#7 18.48 info: installing component 'rustc'
#7 23.26 info: installing component 'rustfmt'
#7 23.78 info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
#7 23.78 
#7 23.80   stable-x86_64-unknown-linux-gnu installed - rustc 1.52.1 (9bc8c42bb 2021-05-09)
#7 23.80 
#7 23.80 
#7 23.80 Rust is installed now. Great!
#7 23.80 
#7 23.80 To get started you may need to restart your current shell.
#7 23.80 This would reload your PATH environment variable to include
#7 23.81 Cargo's bin directory ($HOME/.cargo/bin).
#7 23.81 
#7 23.81 To configure your current shell, run:
#7 23.81 source $HOME/.cargo/env
#7 23.83 Cloning into 'source'...
#7 31.40 Switched to a new branch 'drew-erup-4'
#7 31.40 Branch 'drew-erup-4' set up to track remote branch 'drew-erup-4' from 'origin'.
#7 31.52 info: syncing channel updates for 'nightly-2020-10-06-x86_64-unknown-linux-gnu'
#7 31.80 info: latest update on 2020-10-06, rust version 1.49.0-nightly (a1dfd2490 2020-10-05)
#7 31.80 info: downloading component 'cargo'
#7 32.08 info: downloading component 'clippy'
#7 32.21 info: downloading component 'rust-docs'
#7 32.88 info: downloading component 'rust-std'
#7 34.22 info: downloading component 'rustc'
#7 36.96 info: downloading component 'rustfmt'
#7 37.19 info: installing component 'cargo'
#7 37.79 info: installing component 'clippy'
#7 38.13 info: installing component 'rust-docs'
#7 41.79 info: installing component 'rust-std'
#7 44.38 info: installing component 'rustc'
#7 49.57 info: installing component 'rustfmt'
#7 50.07 info: default toolchain set to 'nightly-2020-10-06-x86_64-unknown-linux-gnu'
#7 50.06 
#7 50.08   nightly-2020-10-06-x86_64-unknown-linux-gnu installed - rustc 1.49.0-nightly (a1dfd2490 2020-10-05)
#7 50.08 
#7 50.18 info: syncing channel updates for 'nightly-2020-10-06-x86_64-unknown-linux-gnu'
#7 50.23 
#7 50.26   nightly-2020-10-06-x86_64-unknown-linux-gnu unchanged - rustc 1.49.0-nightly (a1dfd2490 2020-10-05)
#7 50.26 
#7 50.26 info: checking for self-updates
#7 50.34 info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
#7 51.99 info: installing component 'rust-std' for 'wasm32-unknown-unknown'
#7 53.93     Updating git repository `https://github.com/webb-tools/frontier.git`
#7 55.49     Updating git repository `https://github.com/webb-tools/substrate.git`
#7 72.65     Updating crates.io index
#7 96.42     Updating git repository `https://github.com/webb-tools/anon`
#7 134.3  Downloading crates ...
#7 136.6   Downloaded kvdb v0.9.0
#7 136.8   Downloaded cranelift-frontend v0.71.0
#7 136.8   Downloaded async-std v1.9.0
#7 137.1   Downloaded cfg-if v1.0.0
#7 137.2   Downloaded chacha20poly1305 v0.6.0
#7 137.2   Downloaded minicbor-derive v0.6.3
#7 137.4   Downloaded libp2p-swarm-derive v0.23.0
#7 137.5 error: failed to parse manifest at `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/libp2p-swarm-derive-0.23.0/Cargo.toml`
#7 137.5 
#7 137.5 Caused by:
#7 137.5   feature `resolver` is required
#7 137.5 
#7 137.5   consider adding `cargo-features = ["resolver"]` to the manifest
------
executor failed running [/bin/sh -c curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y &&     export PATH=$PATH:$HOME/.cargo/bin &&     git clone ${GIT_REPO} source &&     cd source &&     git checkout ${GIT_BRANCH} &&     git submodule update --init --recursive &&     rustup default ${RUST_VERSION} &&     rustup toolchain install ${RUST_VERSION} &&     rustup target add wasm32-unknown-unknown --toolchain ${RUST_VERSION} &&     cargo +${RUST_VERSION} build -p ${PACKAGE_NAME} --${PROFILE} &&     cp target/${PROFILE}/${BINARY_NAME} /node]: exit code: 101
joris@joriss-MacBook-Pro edgeware-node %
@nymkappa nymkappa closed this as completed Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant