From 4e552084ceb34e3ca3f5705ae1fcef30610a07d9 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Fri, 17 Sep 2021 15:27:10 +0200 Subject: [PATCH 01/26] Renamed staking-miner Dockerfiles --- ...ng_miner-injected.Dockerfile => staking_miner-ci.Dockerfile} | 2 +- ...miner-builder.Dockerfile => staking_miner-manual.Dockerfile} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename scripts/docker/staking-miner/{staking_miner-injected.Dockerfile => staking_miner-ci.Dockerfile} (93%) rename scripts/docker/staking-miner/{staking_miner-builder.Dockerfile => staking_miner-manual.Dockerfile} (94%) diff --git a/scripts/docker/staking-miner/staking_miner-injected.Dockerfile b/scripts/docker/staking-miner/staking_miner-ci.Dockerfile similarity index 93% rename from scripts/docker/staking-miner/staking_miner-injected.Dockerfile rename to scripts/docker/staking-miner/staking_miner-ci.Dockerfile index 547fea747bfd..fc7b48181af0 100644 --- a/scripts/docker/staking-miner/staking_miner-injected.Dockerfile +++ b/scripts/docker/staking-miner/staking_miner-ci.Dockerfile @@ -9,7 +9,7 @@ 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="staking-miner for substrate based chains" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking_miner-injected.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking_miner-ci.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" diff --git a/scripts/docker/staking-miner/staking_miner-builder.Dockerfile b/scripts/docker/staking-miner/staking_miner-manual.Dockerfile similarity index 94% rename from scripts/docker/staking-miner/staking_miner-builder.Dockerfile rename to scripts/docker/staking-miner/staking_miner-manual.Dockerfile index 4903fccee561..1a2aef5f9271 100644 --- a/scripts/docker/staking-miner/staking_miner-builder.Dockerfile +++ b/scripts/docker/staking-miner/staking_miner-manual.Dockerfile @@ -20,7 +20,7 @@ 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="staking-miner for substrate based chains" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking_miner-builder.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking_miner-manual.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" From 977a2413c8fc146e397d14d5dfe9e920b6147bf8 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Fri, 17 Sep 2021 15:57:04 +0200 Subject: [PATCH 02/26] change readme stacking-miner --- utils/staking-miner/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/staking-miner/README.md b/utils/staking-miner/README.md index f5c68a648c45..baa3b9fb4029 100644 --- a/utils/staking-miner/README.md +++ b/utils/staking-miner/README.md @@ -30,7 +30,7 @@ There are 2 options to build a staking-miner Docker image: First build the binary as documented [above](#building). You may then inject the binary into a Docker base image usingfrom the root of the Polkadot repository: ``` -docker build -t staking-miner -f scripts/docker/staking-miner/staking_miner-injected.Dockerfile target/release +docker build -t staking-miner -f scripts/docker/staking-miner/staking_miner-ci.Dockerfile target/release ``` ### Building the multi-stage image @@ -39,7 +39,7 @@ Unlike the injected image that requires a Linux pre-built binary, this option do The trade-off however is that it takes a little longer to build and this option is less ideal for CI tasks. You may build the multi-stage image the root of the Polkadot repository with: ``` -docker build -t staking-miner -f scripts/docker/staking-miner/staking_miner-builder.Dockerfile . +docker build -t staking-miner -f scripts/docker/staking-miner/staking_miner-manual.Dockerfile . ``` ### Running From 546e6e98d3c27e8952f65b829daad5d7535b2f57 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Fri, 17 Sep 2021 15:58:06 +0200 Subject: [PATCH 03/26] mv docker/ to scripts/docker/polkadot --- {docker => scripts/docker/polkadot}/README.md | 0 {docker => scripts/docker/polkadot}/build.sh | 2 +- {docker => scripts/docker/polkadot}/docker-compose-local.yml | 2 ++ {docker => scripts/docker/polkadot}/docker-compose.yml | 1 + docker/Dockerfile => scripts/docker/polkadot/manual.Dockerfile | 0 5 files changed, 4 insertions(+), 1 deletion(-) rename {docker => scripts/docker/polkadot}/README.md (100%) rename {docker => scripts/docker/polkadot}/build.sh (81%) rename {docker => scripts/docker/polkadot}/docker-compose-local.yml (93%) rename {docker => scripts/docker/polkadot}/docker-compose.yml (88%) rename docker/Dockerfile => scripts/docker/polkadot/manual.Dockerfile (100%) diff --git a/docker/README.md b/scripts/docker/polkadot/README.md similarity index 100% rename from docker/README.md rename to scripts/docker/polkadot/README.md diff --git a/docker/build.sh b/scripts/docker/polkadot/build.sh similarity index 81% rename from docker/build.sh rename to scripts/docker/polkadot/build.sh index 6456383fcdea..b2177f958893 100755 --- a/docker/build.sh +++ b/scripts/docker/polkadot/build.sh @@ -14,7 +14,7 @@ GITREPO=polkadot # Build the image echo "Building ${GITUSER}/${GITREPO}:latest docker image, hang on!" -time docker build -f ./docker/Dockerfile --build-arg RUSTC_WRAPPER= --build-arg PROFILE=release -t ${GITUSER}/${GITREPO}:latest . +time docker build -f ./scripts/docker/polkadot/manual.Dockerfile --build-arg RUSTC_WRAPPER= --build-arg PROFILE=release -t ${GITUSER}/${GITREPO}:latest . # Show the list of available images for this repo echo "Image is ready" diff --git a/docker/docker-compose-local.yml b/scripts/docker/polkadot/docker-compose-local.yml similarity index 93% rename from docker/docker-compose-local.yml rename to scripts/docker/polkadot/docker-compose-local.yml index 079d73825227..95c7e8089578 100644 --- a/docker/docker-compose-local.yml +++ b/scripts/docker/polkadot/docker-compose-local.yml @@ -3,6 +3,7 @@ services: node_alice: build: context: . + dockerfile: manual.Dockerfile ports: - "30333:30333" - "9933:9933" @@ -18,6 +19,7 @@ services: node_bob: build: context: . + dockerfile: manual.Dockerfile ports: - "30344:30344" - "9935:9935" diff --git a/docker/docker-compose.yml b/scripts/docker/polkadot/docker-compose.yml similarity index 88% rename from docker/docker-compose.yml rename to scripts/docker/polkadot/docker-compose.yml index b76d41da1d03..d3cdb60cf3e2 100644 --- a/docker/docker-compose.yml +++ b/scripts/docker/polkadot/docker-compose.yml @@ -3,6 +3,7 @@ services: polkadot: build: context: . + dockerfile: manual.Dockerfile ports: - "127.0.0.1:30333:30333/tcp" - "127.0.0.1:9933:9933/tcp" diff --git a/docker/Dockerfile b/scripts/docker/polkadot/manual.Dockerfile similarity index 100% rename from docker/Dockerfile rename to scripts/docker/polkadot/manual.Dockerfile From ccc229de4e74aaff5525b0f216976e2721125d6e Mon Sep 17 00:00:00 2001 From: alvicsam Date: Fri, 17 Sep 2021 15:59:00 +0200 Subject: [PATCH 04/26] renamed dockerfiles in scripts/docker --- .gitlab-ci.yml | 8 ++++---- doc/docker.md | 2 +- .../{collator.Dockerfile => ci_collator.Dockerfile} | 5 ++--- scripts/docker/{Dockerfile => ci_debug.Dockerfile} | 5 ++--- scripts/docker/release.Dockerfile | 8 ++++---- 5 files changed, 13 insertions(+), 15 deletions(-) rename scripts/docker/{collator.Dockerfile => ci_collator.Dockerfile} (94%) rename scripts/docker/{Dockerfile => ci_debug.Dockerfile} (94%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3713d94f950b..96edf0d2bbeb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -358,8 +358,8 @@ publish-polkadot-image: <<: *build-push-image variables: <<: *image-variables - # scripts/docker/Dockerfile - DOCKERFILE: Dockerfile + # scripts/docker/ci_debug.Dockerfile + DOCKERFILE: ci_debug.Dockerfile IMAGE_NAME: docker.io/paritypr/synth-wave rules: # Don't run on releases - this is handled by the Github Action here: @@ -394,8 +394,8 @@ publish-adder-collator-image: <<: *build-push-image variables: <<: *image-variables - # scripts/docker/collator.Dockerfile - DOCKERFILE: collator.Dockerfile + # scripts/docker/ci_collator.Dockerfile + DOCKERFILE: ci_collator.Dockerfile IMAGE_NAME: docker.io/paritypr/colander rules: - if: $CI_PIPELINE_SOURCE == "schedule" diff --git a/doc/docker.md b/doc/docker.md index b5cafd7ef420..34e9e997520f 100644 --- a/doc/docker.md +++ b/doc/docker.md @@ -118,7 +118,7 @@ To get up and running with the smallest footprint on your system, you may use th You can build it yourself (it takes a while...) in the shell session of the daemon: ```bash -cd docker +cd scripts/docker/polkadot ./build.sh ``` diff --git a/scripts/docker/collator.Dockerfile b/scripts/docker/ci_collator.Dockerfile similarity index 94% rename from scripts/docker/collator.Dockerfile rename to scripts/docker/ci_collator.Dockerfile index 7053459d1a18..b48f6b82ba9d 100644 --- a/scripts/docker/collator.Dockerfile +++ b/scripts/docker/ci_collator.Dockerfile @@ -10,7 +10,7 @@ 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="adder-collator image" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/collator.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/ci_collator.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" @@ -22,8 +22,7 @@ ENV RUST_BACKTRACE 1 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ libssl1.1 \ - ca-certificates \ - curl && \ + ca-certificates && \ # apt cleanup apt-get autoremove -y && \ apt-get clean && \ diff --git a/scripts/docker/Dockerfile b/scripts/docker/ci_debug.Dockerfile similarity index 94% rename from scripts/docker/Dockerfile rename to scripts/docker/ci_debug.Dockerfile index 51f2b21b5fef..9ed4173d545d 100644 --- a/scripts/docker/Dockerfile +++ b/scripts/docker/ci_debug.Dockerfile @@ -9,7 +9,7 @@ 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/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/ci_debug.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" @@ -21,8 +21,7 @@ ENV RUST_BACKTRACE 1 RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ libssl1.1 \ - ca-certificates \ - curl && \ + ca-certificates && \ # apt cleanup apt-get autoremove -y && \ apt-get clean && \ diff --git a/scripts/docker/release.Dockerfile b/scripts/docker/release.Dockerfile index 9188d6b260c4..b53bbf20a6fd 100644 --- a/scripts/docker/release.Dockerfile +++ b/scripts/docker/release.Dockerfile @@ -4,12 +4,13 @@ FROM docker.io/library/ubuntu:20.04 ARG VCS_REF ARG BUILD_DATE ARG POLKADOT_VERSION +ARG POLKADOT_GPGKEY=9D4B2B6EB8F97156D19669A9FF0812D491B96798 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" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/release.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" @@ -22,12 +23,11 @@ RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ libssl1.1 \ ca-certificates \ - curl \ gnupg && \ useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \ # add repo's gpg keys and install the published polkadot binary - gpg --recv-keys --keyserver hkps://keys.mailvelope.com 9D4B2B6EB8F97156D19669A9FF0812D491B96798 && \ - gpg --export 9D4B2B6EB8F97156D19669A9FF0812D491B96798 > /usr/share/keyrings/parity.gpg && \ + gpg --recv-keys --keyserver hkps://keys.mailvelope.com ${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#?} && \ From b88a80e318a5b3c4b68cf29c31fcb448b494193d Mon Sep 17 00:00:00 2001 From: alvicsam Date: Tue, 21 Sep 2021 12:30:19 +0200 Subject: [PATCH 05/26] renamed Dockerfiles --- .github/workflows/publish-docker-release.yml | 2 +- .gitlab-ci.yml | 8 ++++---- ...i_collator.Dockerfile => collator_injected.Dockerfile} | 2 +- scripts/docker/polkadot/build.sh | 2 +- scripts/docker/polkadot/docker-compose-local.yml | 4 ++-- scripts/docker/polkadot/docker-compose.yml | 2 +- .../{manual.Dockerfile => polkadot_builder.Dockerfile} | 0 ...ease.Dockerfile => polkadot_builder_docker.Dockerfile} | 2 +- ...ebug.Dockerfile => polkadot_injected_debug.Dockerfile} | 2 +- ...manual.Dockerfile => staking_miner_builder.Dockerfile} | 2 +- ...er-ci.Dockerfile => staking_miner_injected.Dockerfile} | 0 utils/staking-miner/README.md | 4 ++-- 12 files changed, 15 insertions(+), 15 deletions(-) rename scripts/docker/{ci_collator.Dockerfile => collator_injected.Dockerfile} (95%) rename scripts/docker/polkadot/{manual.Dockerfile => polkadot_builder.Dockerfile} (100%) rename scripts/docker/{release.Dockerfile => polkadot_builder_docker.Dockerfile} (96%) rename scripts/docker/{ci_debug.Dockerfile => polkadot_injected_debug.Dockerfile} (95%) rename scripts/docker/staking-miner/{staking_miner-manual.Dockerfile => staking_miner_builder.Dockerfile} (94%) rename scripts/docker/staking-miner/{staking_miner-ci.Dockerfile => staking_miner_injected.Dockerfile} (100%) diff --git a/.github/workflows/publish-docker-release.yml b/.github/workflows/publish-docker-release.yml index 811849c561a5..9713f2233b44 100644 --- a/.github/workflows/publish-docker-release.yml +++ b/.github/workflows/publish-docker-release.yml @@ -29,7 +29,7 @@ jobs: uses: docker/build-push-action@v2 with: push: true - file: scripts/docker/release.Dockerfile + file: scripts/docker/polkadot_builder_docker.Dockerfile tags: | parity/polkadot:latest parity/polkadot:${{ github.event.release.tag_name }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 96edf0d2bbeb..4776703e9f8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -358,8 +358,8 @@ publish-polkadot-image: <<: *build-push-image variables: <<: *image-variables - # scripts/docker/ci_debug.Dockerfile - DOCKERFILE: ci_debug.Dockerfile + # scripts/docker/polkadot_injected_debug.Dockerfile + DOCKERFILE: polkadot_injected_debug.Dockerfile IMAGE_NAME: docker.io/paritypr/synth-wave rules: # Don't run on releases - this is handled by the Github Action here: @@ -394,8 +394,8 @@ publish-adder-collator-image: <<: *build-push-image variables: <<: *image-variables - # scripts/docker/ci_collator.Dockerfile - DOCKERFILE: ci_collator.Dockerfile + # scripts/docker/collator_injected.Dockerfile + DOCKERFILE: collator_injected.Dockerfile IMAGE_NAME: docker.io/paritypr/colander rules: - if: $CI_PIPELINE_SOURCE == "schedule" diff --git a/scripts/docker/ci_collator.Dockerfile b/scripts/docker/collator_injected.Dockerfile similarity index 95% rename from scripts/docker/ci_collator.Dockerfile rename to scripts/docker/collator_injected.Dockerfile index b48f6b82ba9d..239748d5b38f 100644 --- a/scripts/docker/ci_collator.Dockerfile +++ b/scripts/docker/collator_injected.Dockerfile @@ -10,7 +10,7 @@ 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="adder-collator image" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/ci_collator.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/collator_injected.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" diff --git a/scripts/docker/polkadot/build.sh b/scripts/docker/polkadot/build.sh index b2177f958893..ee4d29991a86 100755 --- a/scripts/docker/polkadot/build.sh +++ b/scripts/docker/polkadot/build.sh @@ -14,7 +14,7 @@ GITREPO=polkadot # Build the image echo "Building ${GITUSER}/${GITREPO}:latest docker image, hang on!" -time docker build -f ./scripts/docker/polkadot/manual.Dockerfile --build-arg RUSTC_WRAPPER= --build-arg PROFILE=release -t ${GITUSER}/${GITREPO}:latest . +time docker build -f ./scripts/docker/polkadot/polkadot_builder.Dockerfile --build-arg RUSTC_WRAPPER= --build-arg PROFILE=release -t ${GITUSER}/${GITREPO}:latest . # Show the list of available images for this repo echo "Image is ready" diff --git a/scripts/docker/polkadot/docker-compose-local.yml b/scripts/docker/polkadot/docker-compose-local.yml index 95c7e8089578..2c93799259ef 100644 --- a/scripts/docker/polkadot/docker-compose-local.yml +++ b/scripts/docker/polkadot/docker-compose-local.yml @@ -3,7 +3,7 @@ services: node_alice: build: context: . - dockerfile: manual.Dockerfile + dockerfile: polkadot_builder.Dockerfile ports: - "30333:30333" - "9933:9933" @@ -19,7 +19,7 @@ services: node_bob: build: context: . - dockerfile: manual.Dockerfile + dockerfile: polkadot_builder.Dockerfile ports: - "30344:30344" - "9935:9935" diff --git a/scripts/docker/polkadot/docker-compose.yml b/scripts/docker/polkadot/docker-compose.yml index d3cdb60cf3e2..54fe158735d8 100644 --- a/scripts/docker/polkadot/docker-compose.yml +++ b/scripts/docker/polkadot/docker-compose.yml @@ -3,7 +3,7 @@ services: polkadot: build: context: . - dockerfile: manual.Dockerfile + dockerfile: polkadot_builder.Dockerfile ports: - "127.0.0.1:30333:30333/tcp" - "127.0.0.1:9933:9933/tcp" diff --git a/scripts/docker/polkadot/manual.Dockerfile b/scripts/docker/polkadot/polkadot_builder.Dockerfile similarity index 100% rename from scripts/docker/polkadot/manual.Dockerfile rename to scripts/docker/polkadot/polkadot_builder.Dockerfile diff --git a/scripts/docker/release.Dockerfile b/scripts/docker/polkadot_builder_docker.Dockerfile similarity index 96% rename from scripts/docker/release.Dockerfile rename to scripts/docker/polkadot_builder_docker.Dockerfile index b53bbf20a6fd..3f98e7427954 100644 --- a/scripts/docker/release.Dockerfile +++ b/scripts/docker/polkadot_builder_docker.Dockerfile @@ -10,7 +10,7 @@ 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" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/release.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/polkadot_builder_dockerDockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" diff --git a/scripts/docker/ci_debug.Dockerfile b/scripts/docker/polkadot_injected_debug.Dockerfile similarity index 95% rename from scripts/docker/ci_debug.Dockerfile rename to scripts/docker/polkadot_injected_debug.Dockerfile index 9ed4173d545d..7ba312bf8b8f 100644 --- a/scripts/docker/ci_debug.Dockerfile +++ b/scripts/docker/polkadot_injected_debug.Dockerfile @@ -9,7 +9,7 @@ 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/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/ci_debug.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/polkadot_injected_debug.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" diff --git a/scripts/docker/staking-miner/staking_miner-manual.Dockerfile b/scripts/docker/staking-miner/staking_miner_builder.Dockerfile similarity index 94% rename from scripts/docker/staking-miner/staking_miner-manual.Dockerfile rename to scripts/docker/staking-miner/staking_miner_builder.Dockerfile index 1a2aef5f9271..a18dcd15f697 100644 --- a/scripts/docker/staking-miner/staking_miner-manual.Dockerfile +++ b/scripts/docker/staking-miner/staking_miner_builder.Dockerfile @@ -20,7 +20,7 @@ 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="staking-miner for substrate based chains" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking_miner-manual.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking_miner_builder.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" diff --git a/scripts/docker/staking-miner/staking_miner-ci.Dockerfile b/scripts/docker/staking-miner/staking_miner_injected.Dockerfile similarity index 100% rename from scripts/docker/staking-miner/staking_miner-ci.Dockerfile rename to scripts/docker/staking-miner/staking_miner_injected.Dockerfile diff --git a/utils/staking-miner/README.md b/utils/staking-miner/README.md index baa3b9fb4029..f017d39dc455 100644 --- a/utils/staking-miner/README.md +++ b/utils/staking-miner/README.md @@ -30,7 +30,7 @@ There are 2 options to build a staking-miner Docker image: First build the binary as documented [above](#building). You may then inject the binary into a Docker base image usingfrom the root of the Polkadot repository: ``` -docker build -t staking-miner -f scripts/docker/staking-miner/staking_miner-ci.Dockerfile target/release +docker build -t staking-miner -f scripts/docker/staking-miner/staking_miner_injected.Dockerfile target/release ``` ### Building the multi-stage image @@ -39,7 +39,7 @@ Unlike the injected image that requires a Linux pre-built binary, this option do The trade-off however is that it takes a little longer to build and this option is less ideal for CI tasks. You may build the multi-stage image the root of the Polkadot repository with: ``` -docker build -t staking-miner -f scripts/docker/staking-miner/staking_miner-manual.Dockerfile . +docker build -t staking-miner -f scripts/docker/staking-miner/staking_miner_builder.Dockerfile . ``` ### Running From 23c5c9d898b57bf2391f9095d3e8f2a626d80f2a Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Wed, 22 Sep 2021 09:22:18 +0200 Subject: [PATCH 06/26] Update scripts/docker/staking-miner/staking_miner_injected.Dockerfile Co-authored-by: Chevdor --- scripts/docker/staking-miner/staking_miner_injected.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/staking-miner/staking_miner_injected.Dockerfile b/scripts/docker/staking-miner/staking_miner_injected.Dockerfile index fc7b48181af0..9f22b51dba67 100644 --- a/scripts/docker/staking-miner/staking_miner_injected.Dockerfile +++ b/scripts/docker/staking-miner/staking_miner_injected.Dockerfile @@ -9,7 +9,7 @@ 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="staking-miner for substrate based chains" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking_miner-ci.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking-miner_injected.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" From eb9a1623c6dd97ceb8a2fa76b30bb7e3d5d3099f Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 22 Sep 2021 09:54:42 +0200 Subject: [PATCH 07/26] renamed release.Dockerfile --- .github/workflows/publish-docker-release.yml | 2 +- ...docker.Dockerfile => polkadot_injected_release.Dockerfile} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename scripts/docker/{polkadot_builder_docker.Dockerfile => polkadot_injected_release.Dockerfile} (91%) diff --git a/.github/workflows/publish-docker-release.yml b/.github/workflows/publish-docker-release.yml index 9713f2233b44..e3c555cc5e96 100644 --- a/.github/workflows/publish-docker-release.yml +++ b/.github/workflows/publish-docker-release.yml @@ -29,7 +29,7 @@ jobs: uses: docker/build-push-action@v2 with: push: true - file: scripts/docker/polkadot_builder_docker.Dockerfile + file: scripts/docker/polkadot_injected_release.Dockerfile tags: | parity/polkadot:latest parity/polkadot:${{ github.event.release.tag_name }} diff --git a/scripts/docker/polkadot_builder_docker.Dockerfile b/scripts/docker/polkadot_injected_release.Dockerfile similarity index 91% rename from scripts/docker/polkadot_builder_docker.Dockerfile rename to scripts/docker/polkadot_injected_release.Dockerfile index 3f98e7427954..f00df554140f 100644 --- a/scripts/docker/polkadot_builder_docker.Dockerfile +++ b/scripts/docker/polkadot_injected_release.Dockerfile @@ -9,8 +9,8 @@ ARG POLKADOT_GPGKEY=9D4B2B6EB8F97156D19669A9FF0812D491B96798 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" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/polkadot_builder_dockerDockerfile" \ + io.parity.image.description="Publish Polkadot Docker image for new releases" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/polkadot_injected_release.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" From 5e759afdfdf3a4057c7de8f0a67dc023559b03ec Mon Sep 17 00:00:00 2001 From: alvicsam Date: Thu, 23 Sep 2021 14:25:56 +0200 Subject: [PATCH 08/26] renamed staking-miner dockerfiles --- ...er_builder.Dockerfile => staking-miner_builder.Dockerfile} | 2 +- ..._injected.Dockerfile => staking-miner_injected.Dockerfile} | 0 utils/staking-miner/README.md | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename scripts/docker/staking-miner/{staking_miner_builder.Dockerfile => staking-miner_builder.Dockerfile} (95%) rename scripts/docker/staking-miner/{staking_miner_injected.Dockerfile => staking-miner_injected.Dockerfile} (100%) diff --git a/scripts/docker/staking-miner/staking_miner_builder.Dockerfile b/scripts/docker/staking-miner/staking-miner_builder.Dockerfile similarity index 95% rename from scripts/docker/staking-miner/staking_miner_builder.Dockerfile rename to scripts/docker/staking-miner/staking-miner_builder.Dockerfile index a18dcd15f697..1699ed783fdd 100644 --- a/scripts/docker/staking-miner/staking_miner_builder.Dockerfile +++ b/scripts/docker/staking-miner/staking-miner_builder.Dockerfile @@ -20,7 +20,7 @@ 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="staking-miner for substrate based chains" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking_miner_builder.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking-miner_builder.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" diff --git a/scripts/docker/staking-miner/staking_miner_injected.Dockerfile b/scripts/docker/staking-miner/staking-miner_injected.Dockerfile similarity index 100% rename from scripts/docker/staking-miner/staking_miner_injected.Dockerfile rename to scripts/docker/staking-miner/staking-miner_injected.Dockerfile diff --git a/utils/staking-miner/README.md b/utils/staking-miner/README.md index f017d39dc455..944f870d6dfc 100644 --- a/utils/staking-miner/README.md +++ b/utils/staking-miner/README.md @@ -30,7 +30,7 @@ There are 2 options to build a staking-miner Docker image: First build the binary as documented [above](#building). You may then inject the binary into a Docker base image usingfrom the root of the Polkadot repository: ``` -docker build -t staking-miner -f scripts/docker/staking-miner/staking_miner_injected.Dockerfile target/release +docker build -t staking-miner -f scripts/docker/staking-miner/staking-miner_injected.Dockerfile target/release ``` ### Building the multi-stage image @@ -39,7 +39,7 @@ Unlike the injected image that requires a Linux pre-built binary, this option do The trade-off however is that it takes a little longer to build and this option is less ideal for CI tasks. You may build the multi-stage image the root of the Polkadot repository with: ``` -docker build -t staking-miner -f scripts/docker/staking-miner/staking_miner_builder.Dockerfile . +docker build -t staking-miner -f scripts/docker/staking-miner/staking-miner_builder.Dockerfile . ``` ### Running From 91afb7eb42a767fc13fde1cbc86013605427713d Mon Sep 17 00:00:00 2001 From: alvicsam Date: Thu, 23 Sep 2021 14:33:37 +0200 Subject: [PATCH 09/26] add label polkadot_builder.Dockerfile --- .../docker/polkadot/polkadot_builder.Dockerfile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/docker/polkadot/polkadot_builder.Dockerfile b/scripts/docker/polkadot/polkadot_builder.Dockerfile index e068ec086f2f..aa794c6a6234 100644 --- a/scripts/docker/polkadot/polkadot_builder.Dockerfile +++ b/scripts/docker/polkadot/polkadot_builder.Dockerfile @@ -1,5 +1,10 @@ FROM docker.io/paritytech/ci-linux:production as builder -LABEL description="This is the build stage for Polkadot. Here we create the binary." +LABEL io.parity.image.authors="devops-team@parity.io" \ + io.parity.image.vendor="Parity Technologies" \ + io.parity.image.title="builder" \ + io.parity.image.description="This is the build stage for Polkadot. Here we create the binary." \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/master/scripts/docker/polkadot/polkadot_builder.Dockerfile" \ + io.parity.image.documentation="https://github.com/paritytech/polkadot/scripts/docker/polkadot/README.md" ARG PROFILE=release WORKDIR /polkadot @@ -11,7 +16,13 @@ RUN cargo build --$PROFILE # ===== SECOND STAGE ====== FROM docker.io/library/ubuntu:20.04 -LABEL description="This is the 2nd stage: a very small image where we copy the Polkadot binary." +LABEL io.parity.image.authors="devops-team@parity.io" \ + io.parity.image.vendor="Parity Technologies" \ + io.parity.image.title="builder" \ + io.parity.image.description="This is the 2nd stage: a very small image where we copy the Polkadot binary." \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/master/scripts/docker/polkadot/polkadot_builder.Dockerfile" \ + io.parity.image.documentation="https://github.com/paritytech/polkadot/scripts/docker/polkadot/README.md" + ARG PROFILE=release COPY --from=builder /polkadot/target/$PROFILE/polkadot /usr/local/bin From 95b2f9e86d6bd68c1c8d91390de85b138a894988 Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Thu, 23 Sep 2021 14:57:40 +0200 Subject: [PATCH 10/26] Update scripts/docker/polkadot/polkadot_builder.Dockerfile Co-authored-by: Chevdor --- scripts/docker/polkadot/polkadot_builder.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/polkadot/polkadot_builder.Dockerfile b/scripts/docker/polkadot/polkadot_builder.Dockerfile index aa794c6a6234..9ed5ccb8e259 100644 --- a/scripts/docker/polkadot/polkadot_builder.Dockerfile +++ b/scripts/docker/polkadot/polkadot_builder.Dockerfile @@ -34,7 +34,7 @@ RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \ rm -rf /usr/bin /usr/sbin USER polkadot -EXPOSE 30333 9933 9944 +EXPOSE 30333 9933 9944 9615 VOLUME ["/data"] CMD ["/usr/local/bin/polkadot"] From af8f2b207f33d5674a233d8219e231611c2dbc8a Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Thu, 23 Sep 2021 14:58:13 +0200 Subject: [PATCH 11/26] Update scripts/docker/polkadot/polkadot_builder.Dockerfile Co-authored-by: Chevdor --- scripts/docker/polkadot/polkadot_builder.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/polkadot/polkadot_builder.Dockerfile b/scripts/docker/polkadot/polkadot_builder.Dockerfile index 9ed5ccb8e259..45882abd95ba 100644 --- a/scripts/docker/polkadot/polkadot_builder.Dockerfile +++ b/scripts/docker/polkadot/polkadot_builder.Dockerfile @@ -37,4 +37,4 @@ USER polkadot EXPOSE 30333 9933 9944 9615 VOLUME ["/data"] -CMD ["/usr/local/bin/polkadot"] +ENTRYPOINT ["/usr/local/bin/polkadot"] From 77843b48ad13336c57fb4324e83faf8d6f8f8081 Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Thu, 23 Sep 2021 14:59:33 +0200 Subject: [PATCH 12/26] Update scripts/docker/polkadot/polkadot_builder.Dockerfile Co-authored-by: Chevdor --- scripts/docker/polkadot/polkadot_builder.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/polkadot/polkadot_builder.Dockerfile b/scripts/docker/polkadot/polkadot_builder.Dockerfile index 45882abd95ba..1404ebe120f5 100644 --- a/scripts/docker/polkadot/polkadot_builder.Dockerfile +++ b/scripts/docker/polkadot/polkadot_builder.Dockerfile @@ -11,7 +11,7 @@ WORKDIR /polkadot COPY . /polkadot -RUN cargo build --$PROFILE +RUN cargo build --$PROFILE --locked # ===== SECOND STAGE ====== From 78546fe5667ebca01964cedc4fdc0eabaf85149a Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Thu, 23 Sep 2021 15:00:42 +0200 Subject: [PATCH 13/26] Update scripts/docker/polkadot/polkadot_builder.Dockerfile Co-authored-by: Chevdor --- scripts/docker/polkadot/polkadot_builder.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/polkadot/polkadot_builder.Dockerfile b/scripts/docker/polkadot/polkadot_builder.Dockerfile index 1404ebe120f5..79e7b35a6e44 100644 --- a/scripts/docker/polkadot/polkadot_builder.Dockerfile +++ b/scripts/docker/polkadot/polkadot_builder.Dockerfile @@ -19,7 +19,7 @@ FROM docker.io/library/ubuntu:20.04 LABEL io.parity.image.authors="devops-team@parity.io" \ io.parity.image.vendor="Parity Technologies" \ io.parity.image.title="builder" \ - io.parity.image.description="This is the 2nd stage: a very small image where we copy the Polkadot binary." \ + io.parity.image.description="Polkadot: a platform for web3. This is a self-buit multistage image." \ io.parity.image.source="https://github.com/paritytech/polkadot/blob/master/scripts/docker/polkadot/polkadot_builder.Dockerfile" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/scripts/docker/polkadot/README.md" From 75c40419dbf49ca4d8770f2fd2184d99fba6d5a8 Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Thu, 23 Sep 2021 15:04:09 +0200 Subject: [PATCH 14/26] Update scripts/docker/polkadot_injected_release.Dockerfile Co-authored-by: Chevdor --- scripts/docker/polkadot_injected_release.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/polkadot_injected_release.Dockerfile b/scripts/docker/polkadot_injected_release.Dockerfile index f00df554140f..801feedf9dd1 100644 --- a/scripts/docker/polkadot_injected_release.Dockerfile +++ b/scripts/docker/polkadot_injected_release.Dockerfile @@ -9,7 +9,7 @@ ARG POLKADOT_GPGKEY=9D4B2B6EB8F97156D19669A9FF0812D491B96798 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="Publish Polkadot Docker image for new releases" \ + 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/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/polkadot_injected_release.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ From c92cf8e77c99b8a8de648a6b1e1bd8465f8efe4c Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Thu, 23 Sep 2021 15:08:17 +0200 Subject: [PATCH 15/26] Update scripts/docker/collator_injected.Dockerfile Co-authored-by: Chevdor --- scripts/docker/collator_injected.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/collator_injected.Dockerfile b/scripts/docker/collator_injected.Dockerfile index 239748d5b38f..12cc32220049 100644 --- a/scripts/docker/collator_injected.Dockerfile +++ b/scripts/docker/collator_injected.Dockerfile @@ -9,7 +9,7 @@ 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="adder-collator image" \ + io.parity.image.description="Injected adder-collator Docker image" \ io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/collator_injected.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ From bde4005dce1066d794fe5f0253303803424fec24 Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Thu, 23 Sep 2021 15:10:03 +0200 Subject: [PATCH 16/26] Update scripts/docker/staking-miner/staking-miner_injected.Dockerfile Co-authored-by: Chevdor --- scripts/docker/staking-miner/staking-miner_injected.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/staking-miner/staking-miner_injected.Dockerfile b/scripts/docker/staking-miner/staking-miner_injected.Dockerfile index 9f22b51dba67..413cae67679d 100644 --- a/scripts/docker/staking-miner/staking-miner_injected.Dockerfile +++ b/scripts/docker/staking-miner/staking-miner_injected.Dockerfile @@ -8,7 +8,7 @@ ARG IMAGE_NAME="staking-miner" 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="staking-miner for substrate based chains" \ + io.parity.image.description="${IMAGE_NAME} for substrate based chains" \ io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking-miner_injected.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ From d0f3b09875ff618812000c41f58cf80338a48683 Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Thu, 23 Sep 2021 15:10:30 +0200 Subject: [PATCH 17/26] Update scripts/docker/staking-miner/staking-miner_builder.Dockerfile Co-authored-by: Chevdor --- scripts/docker/staking-miner/staking-miner_builder.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/staking-miner/staking-miner_builder.Dockerfile b/scripts/docker/staking-miner/staking-miner_builder.Dockerfile index 1699ed783fdd..8b19fe5ca519 100644 --- a/scripts/docker/staking-miner/staking-miner_builder.Dockerfile +++ b/scripts/docker/staking-miner/staking-miner_builder.Dockerfile @@ -19,7 +19,7 @@ LABEL description="This is the 2nd stage: a very small image where we copy the b 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="staking-miner for substrate based chains" \ + io.parity.image.description="${IMAGE_NAME} for substrate based chains" \ io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking-miner_builder.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ From f74a965e8952719ade228efe20298895716713b2 Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Thu, 23 Sep 2021 15:12:49 +0200 Subject: [PATCH 18/26] Update scripts/docker/staking-miner/staking-miner_builder.Dockerfile Co-authored-by: Chevdor --- scripts/docker/staking-miner/staking-miner_builder.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/staking-miner/staking-miner_builder.Dockerfile b/scripts/docker/staking-miner/staking-miner_builder.Dockerfile index 8b19fe5ca519..5208dfb65f27 100644 --- a/scripts/docker/staking-miner/staking-miner_builder.Dockerfile +++ b/scripts/docker/staking-miner/staking-miner_builder.Dockerfile @@ -20,7 +20,7 @@ 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="${IMAGE_NAME} for substrate based chains" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking-miner_builder.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/${IMAGE_NAME}/${IMAGE_NAME}_builder.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" From a38854fa270317052aa1c51773082c50eaf11d16 Mon Sep 17 00:00:00 2001 From: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Date: Thu, 23 Sep 2021 15:15:00 +0200 Subject: [PATCH 19/26] Update scripts/docker/staking-miner/staking-miner_injected.Dockerfile Co-authored-by: Chevdor --- scripts/docker/staking-miner/staking-miner_injected.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker/staking-miner/staking-miner_injected.Dockerfile b/scripts/docker/staking-miner/staking-miner_injected.Dockerfile index 413cae67679d..2d98504b2c40 100644 --- a/scripts/docker/staking-miner/staking-miner_injected.Dockerfile +++ b/scripts/docker/staking-miner/staking-miner_injected.Dockerfile @@ -9,7 +9,7 @@ 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="${IMAGE_NAME} for substrate based chains" \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking-miner_injected.Dockerfile" \ + io.parity.image.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/${IMAGE_NAME}/${IMAGE_NAME}_injected.Dockerfile" \ io.parity.image.revision="${VCS_REF}" \ io.parity.image.created="${BUILD_DATE}" \ io.parity.image.documentation="https://github.com/paritytech/polkadot/" From fadc1fa182ab946c49e20a66cfcba76b65209f66 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Thu, 23 Sep 2021 16:16:55 +0200 Subject: [PATCH 20/26] move gpg server as variable to GHA config --- .github/workflows/publish-docker-release.yml | 1 + scripts/docker/polkadot_injected_release.Dockerfile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docker-release.yml b/.github/workflows/publish-docker-release.yml index e3c555cc5e96..1c5ae13caaa3 100644 --- a/.github/workflows/publish-docker-release.yml +++ b/.github/workflows/publish-docker-release.yml @@ -37,6 +37,7 @@ jobs: POLKADOT_VERSION=${{ github.event.release.tag_name }} VCS_REF=${{ github.ref }} BUILD_DATE=${{ github.event.release.published_at }} + GPG_KEYSERVER="hkps://keys.mailvelope.com" cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache - name: Image digest diff --git a/scripts/docker/polkadot_injected_release.Dockerfile b/scripts/docker/polkadot_injected_release.Dockerfile index 801feedf9dd1..c4c8aea182ed 100644 --- a/scripts/docker/polkadot_injected_release.Dockerfile +++ b/scripts/docker/polkadot_injected_release.Dockerfile @@ -5,6 +5,7 @@ ARG VCS_REF ARG BUILD_DATE ARG POLKADOT_VERSION ARG POLKADOT_GPGKEY=9D4B2B6EB8F97156D19669A9FF0812D491B96798 +ARG GPG_KEYSERVER="hkps://keys.mailvelope.com" LABEL io.parity.image.authors="devops-team@parity.io" \ io.parity.image.vendor="Parity Technologies" \ @@ -26,7 +27,7 @@ RUN apt-get update && \ gnupg && \ useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \ # add repo's gpg keys and install the published polkadot binary - gpg --recv-keys --keyserver hkps://keys.mailvelope.com ${POLKADOT_GPGKEY} && \ + gpg --recv-keys --keyserver ${GPG_KEYSERVER} ${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 && \ From f5e84facdc64231f59f07589bbfd4e00f0ba0dfc Mon Sep 17 00:00:00 2001 From: alvicsam Date: Fri, 24 Sep 2021 14:19:27 +0200 Subject: [PATCH 21/26] simplified polkadot_builder.Dockerfile --- .../polkadot/polkadot_builder.Dockerfile | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/scripts/docker/polkadot/polkadot_builder.Dockerfile b/scripts/docker/polkadot/polkadot_builder.Dockerfile index 79e7b35a6e44..2fc5787e6cb0 100644 --- a/scripts/docker/polkadot/polkadot_builder.Dockerfile +++ b/scripts/docker/polkadot/polkadot_builder.Dockerfile @@ -1,30 +1,18 @@ FROM docker.io/paritytech/ci-linux:production as builder -LABEL io.parity.image.authors="devops-team@parity.io" \ - io.parity.image.vendor="Parity Technologies" \ - io.parity.image.title="builder" \ - io.parity.image.description="This is the build stage for Polkadot. Here we create the binary." \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/master/scripts/docker/polkadot/polkadot_builder.Dockerfile" \ - io.parity.image.documentation="https://github.com/paritytech/polkadot/scripts/docker/polkadot/README.md" - -ARG PROFILE=release +LABEL io.parity.image.description="This is the build stage for Polkadot. Here we create the binary." + WORKDIR /polkadot COPY . /polkadot -RUN cargo build --$PROFILE --locked +RUN cargo build --release --locked # ===== SECOND STAGE ====== FROM docker.io/library/ubuntu:20.04 -LABEL io.parity.image.authors="devops-team@parity.io" \ - io.parity.image.vendor="Parity Technologies" \ - io.parity.image.title="builder" \ - io.parity.image.description="Polkadot: a platform for web3. This is a self-buit multistage image." \ - io.parity.image.source="https://github.com/paritytech/polkadot/blob/master/scripts/docker/polkadot/polkadot_builder.Dockerfile" \ - io.parity.image.documentation="https://github.com/paritytech/polkadot/scripts/docker/polkadot/README.md" - -ARG PROFILE=release -COPY --from=builder /polkadot/target/$PROFILE/polkadot /usr/local/bin +LABEL io.parity.image.description="Polkadot: a platform for web3. This is a self-buit multistage image." + +COPY --from=builder /polkadot/target/release/polkadot /usr/local/bin RUN useradd -m -u 1000 -U -s /bin/sh -d /polkadot polkadot && \ mkdir -p /polkadot/.local/share && \ From df1d25bfb6fffcbb04d07f4482f3c1846d75df58 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Mon, 27 Sep 2021 10:48:30 +0200 Subject: [PATCH 22/26] gitlab-ci modify cp command in test-build-linux-stable --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4776703e9f8c..60e30b069808 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -210,7 +210,7 @@ test-build-linux-stable: - echo "Polkadot version = ${VERSION} (EXTRATAG = ${EXTRATAG})" - echo -n ${VERSION} > ./artifacts/VERSION - echo -n ${EXTRATAG} > ./artifacts/EXTRATAG - - cp -r scripts/docker/* ./artifacts + - cp scripts/docker/* ./artifacts check-runtime-benchmarks: stage: test From 8864054d7fc84d09ca541f7f2d11444abfe31567 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Mon, 27 Sep 2021 13:56:16 +0200 Subject: [PATCH 23/26] fix tests --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 60e30b069808..34ac25fde5af 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -210,7 +210,7 @@ test-build-linux-stable: - echo "Polkadot version = ${VERSION} (EXTRATAG = ${EXTRATAG})" - echo -n ${VERSION} > ./artifacts/VERSION - echo -n ${EXTRATAG} > ./artifacts/EXTRATAG - - cp scripts/docker/* ./artifacts + - cp scripts/docker/*.Dockerfile ./artifacts check-runtime-benchmarks: stage: test From 89b08e116ed836bb3e675db07c55482a123ada16 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Tue, 28 Sep 2021 11:23:15 +0200 Subject: [PATCH 24/26] renamed scripts/docker to scripts/dockerfiles --- .gitlab-ci.yml | 12 ++++++------ .../collator_injected.Dockerfile | 0 scripts/{docker => dockerfiles}/polkadot/README.md | 0 scripts/{docker => dockerfiles}/polkadot/build.sh | 0 .../polkadot/docker-compose-local.yml | 0 .../polkadot/docker-compose.yml | 0 .../polkadot/polkadot_builder.Dockerfile | 0 .../polkadot_injected_debug.Dockerfile | 0 .../polkadot_injected_release.Dockerfile | 0 .../staking-miner/staking-miner_builder.Dockerfile | 0 .../staking-miner/staking-miner_injected.Dockerfile | 0 11 files changed, 6 insertions(+), 6 deletions(-) rename scripts/{docker => dockerfiles}/collator_injected.Dockerfile (100%) rename scripts/{docker => dockerfiles}/polkadot/README.md (100%) rename scripts/{docker => dockerfiles}/polkadot/build.sh (100%) rename scripts/{docker => dockerfiles}/polkadot/docker-compose-local.yml (100%) rename scripts/{docker => dockerfiles}/polkadot/docker-compose.yml (100%) rename scripts/{docker => dockerfiles}/polkadot/polkadot_builder.Dockerfile (100%) rename scripts/{docker => dockerfiles}/polkadot_injected_debug.Dockerfile (100%) rename scripts/{docker => dockerfiles}/polkadot_injected_release.Dockerfile (100%) rename scripts/{docker => dockerfiles}/staking-miner/staking-miner_builder.Dockerfile (100%) rename scripts/{docker => dockerfiles}/staking-miner/staking-miner_injected.Dockerfile (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 34ac25fde5af..15e69605cd8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -210,7 +210,7 @@ test-build-linux-stable: - echo "Polkadot version = ${VERSION} (EXTRATAG = ${EXTRATAG})" - echo -n ${VERSION} > ./artifacts/VERSION - echo -n ${EXTRATAG} > ./artifacts/EXTRATAG - - cp scripts/docker/*.Dockerfile ./artifacts + - cp -r scripts/* ./artifacts check-runtime-benchmarks: stage: test @@ -265,7 +265,7 @@ build-adder-collator: - echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION - echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG - echo "adder-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))" - - cp -r scripts/docker/* ./artifacts + - cp -r scripts/* ./artifacts #### stage: build @@ -358,8 +358,8 @@ publish-polkadot-image: <<: *build-push-image variables: <<: *image-variables - # scripts/docker/polkadot_injected_debug.Dockerfile - DOCKERFILE: polkadot_injected_debug.Dockerfile + # scripts/dockerfiles/polkadot_injected_debug.Dockerfile + DOCKERFILE: dockerfiles/polkadot_injected_debug.Dockerfile IMAGE_NAME: docker.io/paritypr/synth-wave rules: # Don't run on releases - this is handled by the Github Action here: @@ -394,8 +394,8 @@ publish-adder-collator-image: <<: *build-push-image variables: <<: *image-variables - # scripts/docker/collator_injected.Dockerfile - DOCKERFILE: collator_injected.Dockerfile + # scripts/dockerfiles/collator_injected.Dockerfile + DOCKERFILE: dockerfiles/collator_injected.Dockerfile IMAGE_NAME: docker.io/paritypr/colander rules: - if: $CI_PIPELINE_SOURCE == "schedule" diff --git a/scripts/docker/collator_injected.Dockerfile b/scripts/dockerfiles/collator_injected.Dockerfile similarity index 100% rename from scripts/docker/collator_injected.Dockerfile rename to scripts/dockerfiles/collator_injected.Dockerfile diff --git a/scripts/docker/polkadot/README.md b/scripts/dockerfiles/polkadot/README.md similarity index 100% rename from scripts/docker/polkadot/README.md rename to scripts/dockerfiles/polkadot/README.md diff --git a/scripts/docker/polkadot/build.sh b/scripts/dockerfiles/polkadot/build.sh similarity index 100% rename from scripts/docker/polkadot/build.sh rename to scripts/dockerfiles/polkadot/build.sh diff --git a/scripts/docker/polkadot/docker-compose-local.yml b/scripts/dockerfiles/polkadot/docker-compose-local.yml similarity index 100% rename from scripts/docker/polkadot/docker-compose-local.yml rename to scripts/dockerfiles/polkadot/docker-compose-local.yml diff --git a/scripts/docker/polkadot/docker-compose.yml b/scripts/dockerfiles/polkadot/docker-compose.yml similarity index 100% rename from scripts/docker/polkadot/docker-compose.yml rename to scripts/dockerfiles/polkadot/docker-compose.yml diff --git a/scripts/docker/polkadot/polkadot_builder.Dockerfile b/scripts/dockerfiles/polkadot/polkadot_builder.Dockerfile similarity index 100% rename from scripts/docker/polkadot/polkadot_builder.Dockerfile rename to scripts/dockerfiles/polkadot/polkadot_builder.Dockerfile diff --git a/scripts/docker/polkadot_injected_debug.Dockerfile b/scripts/dockerfiles/polkadot_injected_debug.Dockerfile similarity index 100% rename from scripts/docker/polkadot_injected_debug.Dockerfile rename to scripts/dockerfiles/polkadot_injected_debug.Dockerfile diff --git a/scripts/docker/polkadot_injected_release.Dockerfile b/scripts/dockerfiles/polkadot_injected_release.Dockerfile similarity index 100% rename from scripts/docker/polkadot_injected_release.Dockerfile rename to scripts/dockerfiles/polkadot_injected_release.Dockerfile diff --git a/scripts/docker/staking-miner/staking-miner_builder.Dockerfile b/scripts/dockerfiles/staking-miner/staking-miner_builder.Dockerfile similarity index 100% rename from scripts/docker/staking-miner/staking-miner_builder.Dockerfile rename to scripts/dockerfiles/staking-miner/staking-miner_builder.Dockerfile diff --git a/scripts/docker/staking-miner/staking-miner_injected.Dockerfile b/scripts/dockerfiles/staking-miner/staking-miner_injected.Dockerfile similarity index 100% rename from scripts/docker/staking-miner/staking-miner_injected.Dockerfile rename to scripts/dockerfiles/staking-miner/staking-miner_injected.Dockerfile From 4407296389365519d0d960f28267527155daeb34 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Tue, 28 Sep 2021 14:28:56 +0200 Subject: [PATCH 25/26] fix spellcheck --- doc/docker.md | 6 +++--- scripts/gitlab/lingua.dic | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/docker.md b/doc/docker.md index 34e9e997520f..0ffe6ef09aea 100644 --- a/doc/docker.md +++ b/doc/docker.md @@ -4,9 +4,9 @@ The easiest/faster option to run Polkadot in Docker is to use the latest release images. These are small images that use the latest official release of the Polkadot binary, pulled from our package repository. -**_Following examples are running on westend chain and without SSL. They can be used to quick start and learn how Polkadot needs to be configured. Please find out how to secure your node, if you want to operate it on the internet. Do not expose rpc and ws ports, if they are not correctly configured._** +**_Following examples are running on westend chain and without SSL. They can be used to quick start and learn how Polkadot needs to be configured. Please find out how to secure your node, if you want to operate it on the internet. Do not expose RPC and WS ports, if they are not correctly configured._** -Let´s first check the version we have. The first time you run this command, the Polkadot docker image will be downloaded. This takes a bit of time and bandwidth, be patient: +Let's first check the version we have. The first time you run this command, the Polkadot docker image will be downloaded. This takes a bit of time and bandwidth, be patient: ```bash docker run --rm -it parity/polkadot:latest --version @@ -65,7 +65,7 @@ services: ] ``` -With following docker-compose.yml you can set up a node and use polkadot-js-apps as the front end on port 80. After starting the node use a browser and enter your Docker host ip in the url field: __ +With following docker-compose.yml you can set up a node and use polkadot-js-apps as the front end on port 80. After starting the node use a browser and enter your Docker host IP in the URL field: __ ```bash version: '2' diff --git a/scripts/gitlab/lingua.dic b/scripts/gitlab/lingua.dic index 592dee567f72..e802fe0f1a93 100644 --- a/scripts/gitlab/lingua.dic +++ b/scripts/gitlab/lingua.dic @@ -226,6 +226,7 @@ Simnet/MS spawn/SR spawner sr25519 +SSL startup/MS stateful str @@ -281,6 +282,7 @@ versa version/DMSG versioned VMP/SM +VPS VRF/SM w3f/MS wakeups From eda4c65a662d671a0763c0299c1896d2b68ad9b8 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Tue, 28 Sep 2021 14:38:33 +0200 Subject: [PATCH 26/26] fix spellcheck --- scripts/gitlab/lingua.dic | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/gitlab/lingua.dic b/scripts/gitlab/lingua.dic index e802fe0f1a93..7a01bf570cb3 100644 --- a/scripts/gitlab/lingua.dic +++ b/scripts/gitlab/lingua.dic @@ -198,6 +198,7 @@ proxy/G proxying PRs PVF/S +p2p README/MS redhat/M register/CD @@ -293,9 +294,11 @@ Westend/M wildcard/MS WND/S Wococo +WS XCM/S XCMP/M yeet +yml decrement DM ParaId