mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
improve docker build caching (#1045)
* docker: add Dockerfile and .dockerignore to .dockerignore * docker: install cargo deps before copying code
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
doc
|
||||
target
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
|
||||
@@ -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 ======
|
||||
|
||||
|
||||
Reference in New Issue
Block a user