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

Fix building container images #186

Merged
merged 1 commit into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
!/.git/config
!/.git/HEAD
!/crates
!/cumulus
!/polkadot
!/substrate
!/Cargo.lock
!/Cargo.toml
10 changes: 8 additions & 2 deletions Dockerfile-farmer
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@ RUN /root/.cargo/bin/rustup target add wasm32-unknown-unknown
COPY Cargo.lock /code/Cargo.lock
COPY Cargo.toml /code/Cargo.toml

# Up until this line all Rust images in this repo should be the same to share the same layers

# Just enough files for `git rev-parse --short HEAD` to work (used in Substrate node build)
COPY .git /code/.git
# Just an empty directory for Git to recognize it is indeed a Git repository
RUN mkdir /code/.git/objects
COPY crates /code/crates
COPY cumulus /code/cumulus
COPY polkadot /code/polkadot
COPY substrate /code/substrate

# Up until this line all Rust images in this repo should be the same to share the same layers

RUN \
/root/.cargo/bin/cargo build --release --bin subspace-farmer && \
mv target/release/subspace-farmer subspace-farmer && \
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile-node
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ RUN /root/.cargo/bin/rustup target add wasm32-unknown-unknown
COPY Cargo.lock /code/Cargo.lock
COPY Cargo.toml /code/Cargo.toml

# Up until this line all Rust images in this repo should be the same to share the same layers

# Just enough files for `git rev-parse --short HEAD` to work (used in Substrate node build)
COPY .git /code/.git
# Just an empty directory for Git to recognize it is indeed a Git repository
RUN mkdir /code/.git/objects
COPY crates /code/crates
COPY cumulus /code/cumulus
COPY polkadot /code/polkadot
COPY substrate /code/substrate

# Up until this line all Rust images in this repo should be the same to share the same layers

RUN \
/root/.cargo/bin/cargo build --release --bin subspace-node && \
mv target/release/subspace-node subspace-node && \
Expand Down