mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 19:01:08 +00:00
Docker files chore (#3880)
* Renamed staking-miner Dockerfiles * change readme stacking-miner * mv docker/ to scripts/docker/polkadot * renamed dockerfiles in scripts/docker * renamed Dockerfiles * Update scripts/docker/staking-miner/staking_miner_injected.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * renamed release.Dockerfile * renamed staking-miner dockerfiles * add label polkadot_builder.Dockerfile * Update scripts/docker/polkadot/polkadot_builder.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update scripts/docker/polkadot/polkadot_builder.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update scripts/docker/polkadot/polkadot_builder.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update scripts/docker/polkadot/polkadot_builder.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update scripts/docker/polkadot_injected_release.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update scripts/docker/collator_injected.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update scripts/docker/staking-miner/staking-miner_injected.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update scripts/docker/staking-miner/staking-miner_builder.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update scripts/docker/staking-miner/staking-miner_builder.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * Update scripts/docker/staking-miner/staking-miner_injected.Dockerfile Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * move gpg server as variable to GHA config * simplified polkadot_builder.Dockerfile * gitlab-ci modify cp command in test-build-linux-stable * fix tests * renamed scripts/docker to scripts/dockerfiles * fix spellcheck * fix spellcheck Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ab7f87a81a
commit
f29b6db6e4
+2
-1
@@ -29,7 +29,7 @@ jobs:
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
file: scripts/docker/release.Dockerfile
|
||||
file: scripts/docker/polkadot_injected_release.Dockerfile
|
||||
tags: |
|
||||
parity/polkadot:latest
|
||||
parity/polkadot:${{ github.event.release.tag_name }}
|
||||
@@ -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
|
||||
|
||||
@@ -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 -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/Dockerfile
|
||||
DOCKERFILE: 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.Dockerfile
|
||||
DOCKERFILE: collator.Dockerfile
|
||||
# scripts/dockerfiles/collator_injected.Dockerfile
|
||||
DOCKERFILE: dockerfiles/collator_injected.Dockerfile
|
||||
IMAGE_NAME: docker.io/paritypr/colander
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||
|
||||
@@ -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: _<http://[YOUR_DOCKER_HOST_IP>_
|
||||
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: _<http://[YOUR_DOCKER_HOST_IP>_
|
||||
|
||||
```bash
|
||||
version: '2'
|
||||
@@ -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
|
||||
```
|
||||
|
||||
|
||||
+3
-4
@@ -9,8 +9,8 @@ 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.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/collator.Dockerfile" \
|
||||
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}" \
|
||||
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 && \
|
||||
@@ -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/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"
|
||||
+2
@@ -3,6 +3,7 @@ services:
|
||||
node_alice:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: polkadot_builder.Dockerfile
|
||||
ports:
|
||||
- "30333:30333"
|
||||
- "9933:9933"
|
||||
@@ -18,6 +19,7 @@ services:
|
||||
node_bob:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: polkadot_builder.Dockerfile
|
||||
ports:
|
||||
- "30344:30344"
|
||||
- "9935:9935"
|
||||
+1
@@ -3,6 +3,7 @@ services:
|
||||
polkadot:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: polkadot_builder.Dockerfile
|
||||
ports:
|
||||
- "127.0.0.1:30333:30333/tcp"
|
||||
- "127.0.0.1:9933:9933/tcp"
|
||||
+7
-8
@@ -1,19 +1,18 @@
|
||||
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.description="This is the build stage for Polkadot. Here we create the binary."
|
||||
|
||||
ARG PROFILE=release
|
||||
WORKDIR /polkadot
|
||||
|
||||
COPY . /polkadot
|
||||
|
||||
RUN cargo build --$PROFILE
|
||||
RUN cargo build --release --locked
|
||||
|
||||
# ===== 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."
|
||||
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 && \
|
||||
@@ -23,7 +22,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"]
|
||||
ENTRYPOINT ["/usr/local/bin/polkadot"]
|
||||
+2
-3
@@ -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/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/"
|
||||
@@ -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 && \
|
||||
+6
-5
@@ -4,12 +4,14 @@ FROM docker.io/library/ubuntu:20.04
|
||||
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" \
|
||||
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.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}" \
|
||||
io.parity.image.documentation="https://github.com/paritytech/polkadot/"
|
||||
@@ -22,12 +24,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 ${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 && \
|
||||
apt-get install -y --no-install-recommends polkadot=${POLKADOT_VERSION#?} && \
|
||||
+2
-2
@@ -19,8 +19,8 @@ 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.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking_miner-builder.Dockerfile" \
|
||||
io.parity.image.description="${IMAGE_NAME} for substrate based chains" \
|
||||
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/"
|
||||
+2
-2
@@ -8,8 +8,8 @@ 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.source="https://github.com/paritytech/polkadot/blob/${VCS_REF}/scripts/docker/staking-miner/staking_miner-injected.Dockerfile" \
|
||||
io.parity.image.description="${IMAGE_NAME} for substrate based chains" \
|
||||
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/"
|
||||
@@ -198,6 +198,7 @@ proxy/G
|
||||
proxying
|
||||
PRs
|
||||
PVF/S
|
||||
p2p
|
||||
README/MS
|
||||
redhat/M
|
||||
register/CD
|
||||
@@ -227,6 +228,7 @@ spawn/SR
|
||||
spawner
|
||||
SS58
|
||||
sr25519
|
||||
SSL
|
||||
startup/MS
|
||||
stateful
|
||||
str
|
||||
@@ -283,6 +285,7 @@ versa
|
||||
version/DMSG
|
||||
versioned
|
||||
VMP/SM
|
||||
VPS
|
||||
VRF/SM
|
||||
w3f/MS
|
||||
wakeups
|
||||
@@ -293,9 +296,11 @@ Westend/M
|
||||
wildcard/MS
|
||||
WND/S
|
||||
Wococo
|
||||
WS
|
||||
XCM/S
|
||||
XCMP/M
|
||||
yeet
|
||||
yml
|
||||
decrement
|
||||
DM
|
||||
ParaId
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user