diff --git a/.dockerignore b/.dockerignore index 2b0e81eaf0a60..fd7da032abd33 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,2 +1,4 @@ doc target +Dockerfile +.dockerignore diff --git a/Dockerfile b/Dockerfile index 87c33c859f593..0388c7298a25f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,15 +5,15 @@ LABEL description="This is the build stage for Substrate. Here we create the bin ARG PROFILE=release WORKDIR /substrate -COPY . /substrate - RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y cmake pkg-config libssl-dev git -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ - export PATH=$PATH:$HOME/.cargo/bin && \ - cargo build --$PROFILE +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y + +COPY . /substrate + +RUN export PATH=$PATH:$HOME/.cargo/bin && cargo build --$PROFILE # ===== SECOND STAGE ======