Skip to content

Commit

Permalink
fix dockerfile subkey compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
branciard committed Feb 13, 2021
1 parent 0328245 commit bfaf978
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 3 additions & 2 deletions chain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ RUN ./target/release/archipel build-spec --disable-default-bootnode --chain loca
###########################
# Build subkey tool step
###########################
RUN cargo +nightly-2020-10-06 install --force --git https://github.com/paritytech/substrate subkey
RUN git clone https://github.com/paritytech/substrate
RUN cd substrate && git checkout v2.0.1 && cargo build -p subkey --release

####################################
# Create Archipel chain docker image
Expand All @@ -31,7 +32,7 @@ RUN mkdir chain
COPY --from=builder /root/target/release/archipel ./chain
COPY --from=builder /root/archipelTemplateSpec.json ./chain
COPY --from=builder /root/archipelTemplateSpecRaw.json ./chain
COPY --from=builder /root/.cargo/bin/subkey /usr/local/bin/
COPY --from=builder /root/substrate/target/release/subkey /usr/local/bin/
RUN apt-get -y update; \
apt-get install -y --no-install-recommends \
libssl-dev curl jq
Expand Down
10 changes: 8 additions & 2 deletions cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup toolchain install nightly-2020-10-06
RUN rustup default nightly-2020-10-06
RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2020-10-06
RUN cargo +nightly-2020-10-06 install --force --git https://github.com/paritytech/substrate subkey

###########################
# Build subkey tool step
###########################
RUN git clone https://github.com/paritytech/substrate
RUN cd substrate && git checkout v2.0.1 && cargo build -p subkey --release


FROM node:10-buster

Expand All @@ -32,7 +38,7 @@ RUN apt-get -y update && \
apt clean

# Copy subkey
COPY --from=builder-subkey /root/.cargo/bin/subkey /usr/local/bin/
COPY --from=builder-subkey /root/substrate/target/release/subkey /usr/local/bin/

RUN mkdir /home/$user/app
COPY . /home/$user/app/
Expand Down
5 changes: 3 additions & 2 deletions deployer/archipel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ RUN ./target/release/archipel build-spec --disable-default-bootnode --chain loca
###########################
# Build subkey tool step
###########################
RUN cargo +nightly-2020-10-06 install --force --git https://github.com/paritytech/substrate subkey
RUN git clone https://github.com/paritytech/substrate
RUN cd substrate && git checkout v2.0.1 && cargo build -p subkey --release

####################################
# Create Archipel docker image
Expand All @@ -34,7 +35,7 @@ RUN mkdir chain
COPY --from=builder-chain /root/target/release/archipel ./chain
COPY --from=builder-chain /root/archipelTemplateSpec.json ./chain
COPY --from=builder-chain /root/archipelTemplateSpecRaw.json ./chain
COPY --from=builder-chain /root/.cargo/bin/subkey /usr/local/bin/
COPY --from=builder-chain /root/substrate/target/release/subkey /usr/local/bin/

# Add debian unstable repo for wireguard packages
RUN echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable-wireguard.list && \
Expand Down

0 comments on commit bfaf978

Please sign in to comment.