feat: initialize Kurdistan SDK - independent fork of Polkadot SDK
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
FROM docker.io/paritytech/base-bin
|
||||
|
||||
# This file allows building a Generic container image
|
||||
# based on one or multiple pre-built Linux binaries.
|
||||
# Some defaults are set to polkadot but all can be overridden.
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME
|
||||
|
||||
# That can be a single one or a comma separated list
|
||||
ARG BINARY=polkadot
|
||||
|
||||
ARG BIN_FOLDER=.
|
||||
ARG DOC_URL=https://github.com/pezkuwichain/pezkuwichain-sdk
|
||||
ARG DESCRIPTION="Polkadot: a platform for web3"
|
||||
ARG AUTHORS="devops-team@parity.io"
|
||||
ARG VENDOR="Parity Technologies"
|
||||
|
||||
LABEL io.parity.image.authors=${AUTHORS} \
|
||||
io.parity.image.vendor="${VENDOR}" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.title="${IMAGE_NAME}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="${DOC_URL}" \
|
||||
io.parity.image.description="${DESCRIPTION}" \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/binary_injected.Dockerfile"
|
||||
|
||||
USER root
|
||||
WORKDIR /app
|
||||
|
||||
# add binary to docker image
|
||||
# sample for polkadot: COPY ./polkadot ./polkadot-*-worker /usr/local/bin/
|
||||
COPY entrypoint.sh .
|
||||
COPY "bin/*" "/usr/local/bin/"
|
||||
RUN chmod -R a+rx "/usr/local/bin"
|
||||
|
||||
USER parity
|
||||
ENV BINARY=${BINARY}
|
||||
|
||||
# ENTRYPOINT
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
|
||||
# We call the help by default
|
||||
CMD ["--help"]
|
||||
@@ -0,0 +1,59 @@
|
||||
# this image is built on top of existing Zombienet image
|
||||
ARG ZOMBIENET_IMAGE
|
||||
# this image uses substrate-relay image built elsewhere
|
||||
ARG SUBSTRATE_RELAY_IMAGE=docker.io/paritytech/substrate-relay:v1.8.0
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME
|
||||
|
||||
# we need `substrate-relay` binary, built elsewhere
|
||||
FROM ${SUBSTRATE_RELAY_IMAGE} as relay-builder
|
||||
|
||||
# the base image is the zombienet image - we are planning to run zombienet tests using native
|
||||
# provider here
|
||||
FROM ${ZOMBIENET_IMAGE}
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="${IMAGE_NAME}" \
|
||||
io.parity.image.description="Bridges Zombienet tests." \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/bridges/testing"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
USER root
|
||||
|
||||
# for native provider to work (TODO: fix in zn docker?)
|
||||
RUN apt-get update && apt-get install -y procps sudo
|
||||
RUN yarn global add @polkadot/api-cli
|
||||
|
||||
# add polkadot binary to the docker image
|
||||
COPY ./artifacts/polkadot /usr/local/bin/
|
||||
COPY ./artifacts/polkadot-execute-worker /usr/local/bin/
|
||||
COPY ./artifacts/polkadot-prepare-worker /usr/local/bin/
|
||||
# add polkadot-parachain binary to the docker image
|
||||
COPY ./artifacts/polkadot-parachain /usr/local/bin
|
||||
# copy substrate-relay to the docker image
|
||||
COPY --from=relay-builder /home/user/substrate-relay /usr/local/bin/
|
||||
# we need bridges zombienet runner and tests
|
||||
RUN mkdir -p /home/nonroot/bridges-polkadot-sdk
|
||||
COPY ./artifacts/bridges-polkadot-sdk /home/nonroot/bridges-polkadot-sdk
|
||||
# also prepare `generate_hex_encoded_call` for running
|
||||
RUN set -eux; \
|
||||
cd /home/nonroot/bridges-polkadot-sdk/bridges/testing/framework/utils/generate_hex_encoded_call; \
|
||||
npm install
|
||||
|
||||
# use the non-root user
|
||||
USER node
|
||||
# check if executable works in this container
|
||||
RUN /usr/local/bin/polkadot --version
|
||||
RUN /usr/local/bin/polkadot-parachain --version
|
||||
RUN /usr/local/bin/substrate-relay --version
|
||||
|
||||
# https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:{PORT}#/explorer
|
||||
EXPOSE 9942 9910 8943 9945 9010 8945
|
||||
@@ -0,0 +1,49 @@
|
||||
# this file copies from scripts/ci/dockerfiles/Dockerfile and changes only the binary name
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="${IMAGE_NAME}" \
|
||||
io.parity.image.description="Injected adder-collator Docker image" \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/collator_injected.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
libssl1.1 \
|
||||
ca-certificates && \
|
||||
# apt cleanup
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean && \
|
||||
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
|
||||
# add user and link ~/.local/share/adder-collator to /data
|
||||
useradd -m -u 1000 -U -s /bin/sh -d /adder-collator adder-collator && \
|
||||
mkdir -p /data /adder-collator/.local/share && \
|
||||
chown -R adder-collator:adder-collator /data && \
|
||||
ln -s /data /adder-collator/.local/share/polkadot
|
||||
|
||||
# add adder-collator binary to docker image
|
||||
COPY ./artifacts/adder-collator /usr/local/bin
|
||||
COPY ./artifacts/undying-collator /usr/local/bin
|
||||
|
||||
USER adder-collator
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/local/bin/adder-collator --version
|
||||
RUN /usr/local/bin/undying-collator --version
|
||||
|
||||
EXPOSE 30333 9933 9944
|
||||
VOLUME ["/adder-collator"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/adder-collator"]
|
||||
@@ -0,0 +1,129 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
node_alice:
|
||||
image: "pezkuwi:${BRANCH:-cumulus-branch}"
|
||||
ports:
|
||||
- "30333:30333"
|
||||
- "9933:9933"
|
||||
- "9944:9944"
|
||||
volumes:
|
||||
- "pezkuwi-data-alice:/data"
|
||||
- type: bind
|
||||
source: ./test/teyrchain/chain-specs/pezkuwi_chainspec.json
|
||||
target: /chainspec.json
|
||||
read_only: true
|
||||
command: >
|
||||
pezkuwi
|
||||
--chain=/chainspec.json
|
||||
--base-path=/data
|
||||
--port 30333
|
||||
--rpc-port 9933
|
||||
--ws-port 9944
|
||||
--rpc-external
|
||||
--rpc-cors all
|
||||
--ws-external
|
||||
--alice
|
||||
networks:
|
||||
testing_net:
|
||||
ipv4_address: 172.28.1.1
|
||||
aliases:
|
||||
- alice
|
||||
|
||||
node_bob:
|
||||
image: "pezkuwi:${BRANCH:-cumulus-branch}"
|
||||
ports:
|
||||
- "30344:30333"
|
||||
- "9935:9933"
|
||||
- "9945:9944"
|
||||
volumes:
|
||||
- "pezkuwi-data-bob:/data"
|
||||
- type: bind
|
||||
source: ./test/teyrchain/chain-specs/pezkuwi_chainspec.json
|
||||
target: /chainspec.json
|
||||
read_only: true
|
||||
command: >
|
||||
pezkuwi
|
||||
--chain=/chainspec.json
|
||||
--base-path=/data
|
||||
--port 30333
|
||||
--rpc-port 9933
|
||||
--ws-port 9944
|
||||
--rpc-external
|
||||
--ws-external
|
||||
--rpc-cors all
|
||||
--bob
|
||||
networks:
|
||||
testing_net:
|
||||
ipv4_address: 172.28.1.2
|
||||
aliases:
|
||||
- bob
|
||||
|
||||
genesis_state:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/dockerfiles/test-teyrchain-collator.Dockerfile
|
||||
image: "ctpc:latest"
|
||||
volumes:
|
||||
- "genesis-state:/data"
|
||||
command: >
|
||||
pezkuwi-teyrchain
|
||||
export-genesis-state
|
||||
/data/genesis-state
|
||||
|
||||
collator:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/dockerfiles/test-teyrchain-collator.Dockerfile
|
||||
target: collator
|
||||
image: "ctpc:collator"
|
||||
volumes:
|
||||
- "collator-data:/data"
|
||||
depends_on:
|
||||
- node_alice
|
||||
- node_bob
|
||||
command: >
|
||||
inject_bootnodes.sh
|
||||
--base-path=/data
|
||||
networks:
|
||||
testing_net:
|
||||
|
||||
runtime:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/dockerfiles/test-teyrchain-collator.Dockerfile
|
||||
target: runtime
|
||||
image: "ctpc:runtime"
|
||||
volumes:
|
||||
- "teyrchain-runtime:/runtime"
|
||||
|
||||
|
||||
registrar:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/dockerfiles/teyrchain-registrar.Dockerfile
|
||||
image: para-reg:latest
|
||||
volumes:
|
||||
- "genesis-state:/genesis"
|
||||
- "teyrchain-runtime:/runtime"
|
||||
depends_on:
|
||||
- node_alice
|
||||
- runtime
|
||||
- genesis_state
|
||||
networks:
|
||||
testing_net:
|
||||
|
||||
|
||||
volumes:
|
||||
pezkuwi-data-alice:
|
||||
pezkuwi-data-bob:
|
||||
collator-data:
|
||||
genesis-state:
|
||||
teyrchain-runtime:
|
||||
|
||||
|
||||
networks:
|
||||
testing_net:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.28.0.0/16
|
||||
@@ -0,0 +1,50 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="${IMAGE_NAME}" \
|
||||
io.parity.image.description="Malus - the nemesis of polkadot" \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/malus_injected.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libssl1.1 \
|
||||
tini && \
|
||||
# apt cleanup
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean && \
|
||||
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
|
||||
# add user
|
||||
groupadd --gid 10000 nonroot && \
|
||||
useradd --home-dir /home/nonroot \
|
||||
--create-home \
|
||||
--shell /bin/bash \
|
||||
--gid nonroot \
|
||||
--groups nonroot \
|
||||
--uid 10000 nonroot
|
||||
|
||||
|
||||
# add adder-collator binary to docker image
|
||||
COPY ./artifacts/malus ./artifacts/polkadot-execute-worker ./artifacts/polkadot-prepare-worker /usr/local/bin
|
||||
|
||||
USER nonroot
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/local/bin/malus --version
|
||||
|
||||
# Tini allows us to avoid several Docker edge cases, see https://github.com/krallin/tini.
|
||||
ENTRYPOINT ["tini", "--", "/bin/bash"]
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="${IMAGE_NAME}" \
|
||||
io.parity.image.description="Cumulus, the Polkadot collator." \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/polkadot-parachain/polkadot-parachain-debug_unsigned_injected.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/tree/master/cumulus"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
libssl1.1 \
|
||||
ca-certificates \
|
||||
curl && \
|
||||
# apt cleanup
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean && \
|
||||
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
|
||||
# add user and link ~/.local/share/polkadot-parachain to /data
|
||||
useradd -m -u 1000 -U -s /bin/sh -d /polkadot-parachain polkadot-parachain && \
|
||||
mkdir -p /data /polkadot-parachain/.local/share && \
|
||||
chown -R polkadot-parachain:polkadot-parachain /data && \
|
||||
ln -s /data /polkadot-parachain/.local/share/polkadot-parachain && \
|
||||
mkdir -p /specs
|
||||
|
||||
# add polkadot-parachain binary to the docker image
|
||||
COPY ./artifacts/polkadot-parachain /usr/local/bin
|
||||
COPY ./cumulus/parachains/chain-specs/*.json /specs/
|
||||
|
||||
USER polkadot-parachain
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/local/bin/polkadot-parachain --version
|
||||
|
||||
EXPOSE 30333 9933 9944
|
||||
VOLUME ["/polkadot-parachain"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/polkadot-parachain"]
|
||||
@@ -0,0 +1,36 @@
|
||||
# This file is sourced from https://github.com/pezkuwichain/pezkuwichain-sdk/blob/master/docker/dockerfiles/polkadot-parachain/polkadot-parachain_builder.Dockerfile
|
||||
# This is the build stage for polkadot-parachain. Here we create the binary in a temporary image.
|
||||
FROM docker.io/paritytech/ci-linux:production as builder
|
||||
|
||||
WORKDIR /cumulus
|
||||
COPY . /cumulus
|
||||
|
||||
RUN cargo build --release --locked -p polkadot-parachain
|
||||
|
||||
# This is the 2nd stage: a very small image where we copy the Polkadot binary."
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
|
||||
LABEL io.parity.image.type="builder" \
|
||||
io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.description="Multistage Docker image for polkadot-parachain" \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/polkadot-parachain/polkadot-parachain_builder.Dockerfile" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/tree/master/cumulus"
|
||||
|
||||
COPY --from=builder /cumulus/target/release/polkadot-parachain /usr/local/bin
|
||||
|
||||
RUN useradd -m -u 1000 -U -s /bin/sh -d /cumulus polkadot-parachain && \
|
||||
mkdir -p /data /cumulus/.local/share && \
|
||||
chown -R polkadot-parachain:polkadot-parachain /data && \
|
||||
ln -s /data /cumulus/.local/share/polkadot-parachain && \
|
||||
# unclutter and minimize the attack surface
|
||||
rm -rf /usr/bin /usr/sbin && \
|
||||
# check if executable works in this container
|
||||
/usr/local/bin/polkadot-parachain --version
|
||||
|
||||
USER polkadot-parachain
|
||||
|
||||
EXPOSE 30333 9933 9944 9615
|
||||
VOLUME ["/data"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/polkadot-parachain"]
|
||||
@@ -0,0 +1,38 @@
|
||||
FROM docker.io/paritytech/base-bin
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="${IMAGE_NAME}" \
|
||||
io.parity.image.description="Cumulus, the Polkadot collator." \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/polkadot-parachain/polkadot-parachain_injected.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
USER root
|
||||
|
||||
RUN mkdir -p /specs
|
||||
|
||||
# add polkadot-parachain binary to the docker image
|
||||
COPY bin/* /usr/local/bin/
|
||||
COPY specs/* /specs/
|
||||
|
||||
RUN chmod -R a+rx "/usr/local/bin"
|
||||
|
||||
USER parity
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/local/bin/polkadot-parachain --version
|
||||
|
||||
EXPOSE 30333 9933 9944 9615
|
||||
VOLUME ["/polkadot", "/specs"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/polkadot-parachain"]
|
||||
@@ -0,0 +1,9 @@
|
||||
# Self built Docker image
|
||||
|
||||
The PezkuwiChain repo contains several options to build Docker images for PezkuwiChain.
|
||||
|
||||
This folder contains a self-contained image that does not require a Linux pre-built binary.
|
||||
|
||||
Instead, building the image is possible on any host having docker installed and will
|
||||
build PezkuwiChain inside Docker. That also means that no Rust toolchain is required on the host
|
||||
machine for the build to succeed.
|
||||
@@ -0,0 +1,50 @@
|
||||
version: '3'
|
||||
services:
|
||||
node_alice:
|
||||
ports:
|
||||
- "30333:30333"
|
||||
- "9933:9933"
|
||||
- "9944:9944"
|
||||
- "9615:9615"
|
||||
image: pezkuwichain/pezkuwi:latest
|
||||
volumes:
|
||||
- "pezkuwi-data-alice:/data"
|
||||
command: |
|
||||
--chain=pezkuwi-local
|
||||
--alice
|
||||
-d /data
|
||||
--node-key 0000000000000000000000000000000000000000000000000000000000000001
|
||||
networks:
|
||||
testing_net:
|
||||
ipv4_address: 172.28.1.1
|
||||
|
||||
node_bob:
|
||||
ports:
|
||||
- "30344:30333"
|
||||
- "9935:9933"
|
||||
- "9945:9944"
|
||||
- "29615:9615"
|
||||
image: pezkuwichain/pezkuwi:latest
|
||||
volumes:
|
||||
- "pezkuwi-data-bob:/data"
|
||||
links:
|
||||
- "node_alice:alice"
|
||||
command: |
|
||||
--chain=pezkuwi-local
|
||||
--bob
|
||||
-d /data
|
||||
--bootnodes '/ip4/172.28.1.1/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR'
|
||||
networks:
|
||||
testing_net:
|
||||
ipv4_address: 172.28.1.2
|
||||
|
||||
volumes:
|
||||
pezkuwi-data-alice:
|
||||
pezkuwi-data-bob:
|
||||
|
||||
networks:
|
||||
testing_net:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.28.0.0/16
|
||||
@@ -0,0 +1,22 @@
|
||||
version: '3'
|
||||
services:
|
||||
pezkuwi:
|
||||
image: pezkuwichain/pezkuwi:latest
|
||||
|
||||
ports:
|
||||
- "127.0.0.1:30333:30333/tcp"
|
||||
- "127.0.0.1:9933:9933/tcp"
|
||||
- "127.0.0.1:9944:9944/tcp"
|
||||
- "127.0.0.1:9615:9615/tcp"
|
||||
|
||||
volumes:
|
||||
- "pezkuwi-data:/data"
|
||||
|
||||
command: |
|
||||
--unsafe-rpc-external
|
||||
--unsafe-ws-external
|
||||
--rpc-cors all
|
||||
--prometheus-external
|
||||
|
||||
volumes:
|
||||
pezkuwi-data:
|
||||
@@ -0,0 +1,7 @@
|
||||
# Pezkuwi official Docker image
|
||||
|
||||
## [Pezkuwi](https://pezkuwichain.io/)
|
||||
|
||||
## [GitHub](https://github.com/paritytech/polkadot)
|
||||
|
||||
## [Pezkuwi Wiki](https://wiki.network.pezkuwichain.io/)
|
||||
@@ -0,0 +1,37 @@
|
||||
# This is the build stage for Polkadot. Here we create the binary in a temporary image.
|
||||
FROM docker.io/paritytech/ci-unified:bullseye-1.88.0-2025-06-27-v202507112050 as builder
|
||||
|
||||
WORKDIR /polkadot
|
||||
COPY . /polkadot
|
||||
|
||||
RUN cargo build --locked --release
|
||||
|
||||
# This is the 2nd stage: a very small image where we copy the Polkadot binary."
|
||||
FROM docker.io/paritytech/base-bin:latest
|
||||
|
||||
LABEL description="Multistage Docker image for Polkadot: a platform for web3" \
|
||||
io.parity.image.type="builder" \
|
||||
io.parity.image.authors="chevdor@gmail.com, devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.description="Polkadot: a platform for web3" \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/polkadot/polkadot_builder.Dockerfile" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/"
|
||||
|
||||
COPY --from=builder /polkadot/target/release/polkadot /usr/local/bin
|
||||
|
||||
USER root
|
||||
RUN useradd -m -u 1001 -U -s /bin/sh -d /polkadot polkadot && \
|
||||
mkdir -p /data /polkadot/.local/share && \
|
||||
chown -R polkadot:polkadot /data && \
|
||||
ln -s /data /polkadot/.local/share/polkadot && \
|
||||
# unclutter and minimize the attack surface
|
||||
rm -rf /usr/bin /usr/sbin && \
|
||||
# check if executable works in this container
|
||||
/usr/local/bin/polkadot --version
|
||||
|
||||
USER polkadot
|
||||
|
||||
EXPOSE 30333 9933 9944 9615
|
||||
VOLUME ["/data"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/polkadot"]
|
||||
@@ -0,0 +1,52 @@
|
||||
FROM docker.io/paritytech/base-bin
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME
|
||||
# That can be a single one or a comma separated list
|
||||
ARG BINARY=polkadot
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="parity/polkadot" \
|
||||
io.parity.image.description="Polkadot: a platform for web3. This is the official Parity image with an injected binary." \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/polkadot/polkadot_injected.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
USER root
|
||||
WORKDIR /app
|
||||
|
||||
# add polkadot and polkadot-*-worker binaries to the docker image
|
||||
COPY bin/* /usr/local/bin/
|
||||
COPY entrypoint.sh .
|
||||
|
||||
|
||||
RUN chmod -R a+rx "/usr/local/bin"; \
|
||||
mkdir -p /data /polkadot/.local/share && \
|
||||
chown -R parity:parity /data && \
|
||||
ln -s /data /polkadot/.local/share/polkadot
|
||||
|
||||
USER parity
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/local/bin/polkadot --version
|
||||
RUN /usr/local/bin/polkadot-prepare-worker --version
|
||||
RUN /usr/local/bin/polkadot-execute-worker --version
|
||||
|
||||
|
||||
EXPOSE 30333 9933 9944 9615
|
||||
VOLUME ["/polkadot"]
|
||||
|
||||
ENV BINARY=${BINARY}
|
||||
|
||||
# ENTRYPOINT
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
|
||||
# We call the help by default
|
||||
CMD ["--help"]
|
||||
@@ -0,0 +1,42 @@
|
||||
FROM docker.io/paritytech/base-bin
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG POLKADOT_VERSION
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="parity/polkadot" \
|
||||
io.parity.image.description="Polkadot: a platform for web3. This is the official Parity image with an injected binary." \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/scripts/ci/dockerfiles/polkadot/polkadot_injected_debian.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/"
|
||||
|
||||
USER root
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends polkadot=${POLKADOT_VERSION#?} && \
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* ; \
|
||||
mkdir -p /data /polkadot/.local/share && \
|
||||
chown -R parity:parity /data && \
|
||||
ln -s /data /polkadot/.local/share/polkadot
|
||||
|
||||
USER parity
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/bin/polkadot --version
|
||||
RUN /usr/lib/polkadot/polkadot-execute-worker --version
|
||||
RUN /usr/lib/polkadot/polkadot-prepare-worker --version
|
||||
|
||||
EXPOSE 30333 9933 9944 9615
|
||||
VOLUME ["/polkadot"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/polkadot"]
|
||||
@@ -0,0 +1,51 @@
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="${IMAGE_NAME}" \
|
||||
io.parity.image.description="Polkadot: a platform for web3" \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/polkadot/polkadot_injected_debug.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
libssl1.1 \
|
||||
ca-certificates && \
|
||||
# apt cleanup
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean && \
|
||||
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
|
||||
# add user and link ~/.local/share/polkadot to /data
|
||||
useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \
|
||||
mkdir -p /data /polkadot/.local/share /polkdot/runtimes && \
|
||||
chown -R polkadot:polkadot /data && \
|
||||
ln -s /data /polkadot/.local/share/polkadot
|
||||
|
||||
# add polkadot binaries to docker image
|
||||
COPY ./artifacts/polkadot ./artifacts/polkadot-execute-worker ./artifacts/polkadot-prepare-worker /usr/local/bin
|
||||
|
||||
# add runtime binaries to docker image
|
||||
COPY ./artifacts/runtimes /polkadot/runtimes/
|
||||
|
||||
USER polkadot
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/local/bin/polkadot --version
|
||||
RUN /usr/local/bin/polkadot-execute-worker --version
|
||||
RUN /usr/local/bin/polkadot-prepare-worker --version
|
||||
|
||||
EXPOSE 30333 9933 9944
|
||||
VOLUME ["/polkadot"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/polkadot"]
|
||||
@@ -0,0 +1,53 @@
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG POLKADOT_VERSION
|
||||
ARG POLKADOT_GPGKEY=9D4B2B6EB8F97156D19669A9FF0812D491B96798
|
||||
ARG GPG_KEYSERVER="keyserver.ubuntu.com"
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="parity/polkadot" \
|
||||
io.parity.image.description="Polkadot: a platform for web3. This is the official Parity image with an injected binary." \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/polkadot/polkadot_injected_release.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
libssl1.1 \
|
||||
ca-certificates \
|
||||
gnupg && \
|
||||
useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \
|
||||
# add repo's gpg keys and install the published polkadot binary
|
||||
gpg --keyserver ${GPG_KEYSERVER} --recv-keys ${POLKADOT_GPGKEY} && \
|
||||
gpg --export ${POLKADOT_GPGKEY} > /usr/share/keyrings/parity.gpg && \
|
||||
echo 'deb [signed-by=/usr/share/keyrings/parity.gpg] https://releases.parity.io/deb release main' > /etc/apt/sources.list.d/parity.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends polkadot=${POLKADOT_VERSION#?} && \
|
||||
# apt cleanup
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* ; \
|
||||
mkdir -p /data /polkadot/.local/share && \
|
||||
chown -R polkadot:polkadot /data && \
|
||||
ln -s /data /polkadot/.local/share/polkadot
|
||||
|
||||
USER polkadot
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/bin/polkadot --version
|
||||
RUN /usr/local/bin/polkadot-execute-worker --version
|
||||
RUN /usr/local/bin/polkadot-prepare-worker --version
|
||||
|
||||
EXPOSE 30333 9933 9944
|
||||
VOLUME ["/polkadot"]
|
||||
|
||||
ENTRYPOINT ["/usr/bin/polkadot"]
|
||||
@@ -0,0 +1,45 @@
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="${IMAGE_NAME}" \
|
||||
io.parity.image.description="Substrate: The platform for blockchain innovators." \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/substrate_injected.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://wiki.parity.io/Parity-Substrate"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
libssl1.1 \
|
||||
ca-certificates \
|
||||
curl && \
|
||||
# apt cleanup
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean && \
|
||||
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
|
||||
# add user
|
||||
useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate
|
||||
|
||||
# add substrate binary to docker image
|
||||
COPY ./artifacts/substrate /usr/local/bin
|
||||
|
||||
USER substrate
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/local/bin/substrate --version
|
||||
|
||||
EXPOSE 30333 9933 9944
|
||||
VOLUME ["/substrate"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/substrate"]
|
||||
@@ -0,0 +1,46 @@
|
||||
# This file is sourced from https://github.com/pezkuwichain/pezkuwichain-sdk/blob/master/docker/dockerfiles/test-parachain-collator.Dockerfile
|
||||
FROM docker.io/paritytech/ci-linux:production as builder
|
||||
|
||||
WORKDIR /cumulus
|
||||
COPY . /cumulus
|
||||
|
||||
RUN cargo build --release --locked -p polkadot-parachain
|
||||
|
||||
# the collator stage is normally built once, cached, and then ignored, but can
|
||||
# be specified with the --target build flag. This adds some extra tooling to the
|
||||
# image, which is required for a launcher script. The script simply adds two
|
||||
# arguments to the list passed in:
|
||||
#
|
||||
# --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/PEER_ID
|
||||
#
|
||||
# with the appropriate ip and ID for both Alice and Bob
|
||||
FROM debian:buster-slim as collator
|
||||
RUN apt-get update && apt-get install jq curl bash -y && \
|
||||
curl -sSo /wait-for-it.sh https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && \
|
||||
chmod +x /wait-for-it.sh && \
|
||||
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
npm install --global yarn && \
|
||||
yarn global add @polkadot/api-cli@0.10.0-beta.14
|
||||
COPY --from=builder \
|
||||
/paritytech/cumulus/target/release/polkadot-parachain /usr/bin
|
||||
COPY ./docker/scripts/inject_bootnodes.sh /usr/bin
|
||||
CMD ["/usr/bin/inject_bootnodes.sh"]
|
||||
COPY ./docker/scripts/healthcheck.sh /usr/bin/
|
||||
HEALTHCHECK --interval=300s --timeout=75s --start-period=30s --retries=3 \
|
||||
CMD ["/usr/bin/healthcheck.sh"]
|
||||
|
||||
# the runtime stage is normally built once, cached, and ignored, but can be
|
||||
# specified with the --target build flag. This just preserves one of the builder's
|
||||
# outputs, which can then be moved into a volume at runtime
|
||||
FROM debian:buster-slim as runtime
|
||||
COPY --from=builder \
|
||||
/paritytech/cumulus/target/release/wbuild/cumulus-test-parachain-runtime/cumulus_test_parachain_runtime.compact.wasm \
|
||||
/var/opt/
|
||||
CMD ["cp", "-v", "/var/opt/cumulus_test_parachain_runtime.compact.wasm", "/runtime/"]
|
||||
|
||||
FROM debian:buster-slim
|
||||
COPY --from=builder \
|
||||
/paritytech/cumulus/target/release/polkadot-parachain /usr/bin
|
||||
|
||||
CMD ["/usr/bin/polkadot-parachain"]
|
||||
@@ -0,0 +1,49 @@
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
|
||||
# metadata
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
ARG IMAGE_NAME
|
||||
|
||||
LABEL io.parity.image.authors="devops-team@parity.io" \
|
||||
io.parity.image.vendor="Parity Technologies" \
|
||||
io.parity.image.title="${IMAGE_NAME}" \
|
||||
io.parity.image.description="Test parachain for Zombienet" \
|
||||
io.parity.image.source="https://github.com/pezkuwichain/pezkuwichain-sdk/blob/${VCS_REF}/docker/dockerfiles/test-parachain_injected.Dockerfile" \
|
||||
io.parity.image.revision="${VCS_REF}" \
|
||||
io.parity.image.created="${BUILD_DATE}" \
|
||||
io.parity.image.documentation="https://github.com/pezkuwichain/pezkuwichain-sdk/tree/master/cumulus"
|
||||
|
||||
# show backtraces
|
||||
ENV RUST_BACKTRACE 1
|
||||
|
||||
# install tools and dependencies
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
libssl1.1 \
|
||||
ca-certificates \
|
||||
curl && \
|
||||
# apt cleanup
|
||||
apt-get autoremove -y && \
|
||||
apt-get clean && \
|
||||
find /var/lib/apt/lists/ -type f -not -name lock -delete; \
|
||||
# add user and link ~/.local/share/test-parachain to /data
|
||||
useradd -m -u 10000 -U -s /bin/sh -d /test-parachain test-parachain && \
|
||||
mkdir -p /data /test-parachain/.local/share && \
|
||||
chown -R test-parachain:test-parachain /data && \
|
||||
ln -s /data /test-parachain/.local/share/test-parachain && \
|
||||
mkdir -p /specs
|
||||
|
||||
# add test-parachain binary to the docker image
|
||||
COPY ./artifacts/test-parachain /usr/local/bin
|
||||
COPY ./cumulus/parachains/chain-specs/*.json /specs/
|
||||
|
||||
USER test-parachain
|
||||
|
||||
# check if executable works in this container
|
||||
RUN /usr/local/bin/test-parachain --version
|
||||
|
||||
EXPOSE 30333 9933 9944
|
||||
VOLUME ["/test-parachain"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/test-parachain"]
|
||||
@@ -0,0 +1,27 @@
|
||||
FROM node:latest AS pjs
|
||||
|
||||
# It would be great to depend on a more stable tag, but we need some
|
||||
# as-yet-unreleased features.
|
||||
RUN yarn global add @polkadot/api-cli@0.10.0-beta.14
|
||||
|
||||
ENTRYPOINT [ "polkadot-js-api" ]
|
||||
CMD [ "--version" ]
|
||||
|
||||
# To use the pjs build stage to access the blockchain from the host machine:
|
||||
#
|
||||
# docker build -f docker/dockerfiles/parachain-registrar.Dockerfile --target pjs -t parachain-registrar:pjs .
|
||||
# alias pjs='docker run --rm --net cumulus_testing_net parachain-registrar:pjs --ws ws://172.28.1.1:9944'
|
||||
#
|
||||
# Then, as long as the chain is running, you can use the polkadot-js-api CLI like:
|
||||
#
|
||||
# pjs query.sudo.key
|
||||
|
||||
FROM pjs
|
||||
RUN apt-get update && apt-get install curl netcat -y && \
|
||||
curl -sSo /wait-for-it.sh https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && \
|
||||
chmod +x /wait-for-it.sh
|
||||
# the only thing left to do is to actually run the transaction.
|
||||
COPY ./docker/scripts/register_para.sh /usr/bin
|
||||
# unset the previous stage's entrypoint
|
||||
ENTRYPOINT []
|
||||
CMD [ "/usr/bin/register_para.sh" ]
|
||||
Reference in New Issue
Block a user