Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 4162fd1

Browse files
committed
fix: Fix #375 errors by installing git, rustup in PATH and flags to accept defaults
1 parent 2e74219 commit 4162fd1

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

docker/Dockerfile

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
1+
# delete images - docker rmi $(docker images -q) -f
2+
# delete containers - docker rm $(docker ps -a -q) -f
3+
14
FROM phusion/baseimage:0.10.1
25
LABEL maintainer "[email protected]"
36

7+
ARG POLKADOT_VERSION=v0.2
48
RUN apt-get update && \
59
apt-get upgrade -y && \
610
apt-get install -y cmake pkg-config libssl-dev && \
7-
curl https://sh.rustup.rs -sSf | sh && \
11+
curl https://sh.rustup.rs -sSf | sh -s -- -y && \
12+
echo 'PATH="$/root/.cargo/bin:$PATH";' >> ~/.bash_profile && \
13+
. ~/.bash_profile && . /root/.cargo/env && \
14+
which rustup && which cargo && \
815
rustup update nightly && \
916
rustup target add wasm32-unknown-unknown --toolchain nightly && \
10-
rustup update stable && \
11-
cargo install --git https://github.com/alexcrichton/wasm-gc && \
12-
git clone https://github.com/paritytech/polkadot.git && \
13-
cd polkadot && \
14-
./build.sh && \
15-
cargo build
17+
rustup update stable && rustup default stable && \
18+
cargo install --git https://github.com/alexcrichton/wasm-gc --force && \
19+
cargo install --git https://github.com/pepyakin/wasm-export-table.git --force && \
20+
apt-get install -y git vim curl && \
21+
git clone https://github.com/paritytech/polkadot.git && cd polkadot && \
22+
git fetch origin ${POLKADOT_VERSION}:${POLKADOT_VERSION} && \
23+
git checkout ${POLKADOT_VERSION} && \
24+
./build.sh && cargo build
1625

1726
WORKDIR /polkadot
1827
CMD ["/bin/sh", "polkadot"]

docker/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/sh
22

3-
docker build -t polkadot:0.2 .
3+
docker build -t polkadot:0.2 .;
4+
docker run -it polkadot:0.2 bash;

0 commit comments

Comments
 (0)