Skip to content

Commit

Permalink
feat: add dockerfile (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: Frank Bell <[email protected]>
  • Loading branch information
peterwht and evilrobot-01 authored Feb 23, 2024
1 parent fc894bf commit 04b56e7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.git
**/target/
**/*.txt
**/*.md
/docker/

# dotfiles in the repo root
/.*
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is sourced from https://github.com/paritytech/polkadot-sdk/blob/master/docker/dockerfiles/polkadot/polkadot_builder.Dockerfile
FROM docker.io/paritytech/ci-linux:production as builder
# Require the current commit hash to be provided as an argument
ARG SUBSTRATE_CLI_GIT_COMMIT_HASH
RUN test -n "$SUBSTRATE_CLI_GIT_COMMIT_HASH" || (echo "SUBSTRATE_CLI_GIT_COMMIT_HASH not set, provide via --build-arg SUBSTRATE_CLI_GIT_COMMIT_HASH=(git rev-parse --short=11 HEAD)" && false)
ENV SUBSTRATE_CLI_GIT_COMMIT_HASH=$SUBSTRATE_CLI_GIT_COMMIT_HASH
WORKDIR /pop
COPY . /pop
RUN cargo build --release

# Build image
FROM debian:bullseye-slim as collator
COPY --from=builder /pop/target/release/pop-node /usr/bin/pop-node
CMD ["/usr/bin/pop-node"]

0 comments on commit 04b56e7

Please sign in to comment.