mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +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
+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 && \
|
||||
@@ -0,0 +1,7 @@
|
||||
# Self built Docker image
|
||||
|
||||
The Polkadot repo contains several options to build Docker images for Polkadot.
|
||||
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 Polkadot inside Docker. That also means that no Rust toolchain is required on the host
|
||||
machine for the build to succeed.
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
pushd .
|
||||
|
||||
# The following line ensure we run from the project root
|
||||
PROJECT_ROOT=`git rev-parse --show-toplevel`
|
||||
cd $PROJECT_ROOT
|
||||
|
||||
# Find the current version from Cargo.toml
|
||||
VERSION=`grep "^version" ./Cargo.toml | egrep -o "([0-9\.]+)"`
|
||||
GITUSER=parity
|
||||
GITREPO=polkadot
|
||||
|
||||
# Build the image
|
||||
echo "Building ${GITUSER}/${GITREPO}:latest docker image, hang on!"
|
||||
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"
|
||||
docker images | grep ${GITREPO}
|
||||
|
||||
echo -e "\nIf you just built version ${VERSION}, you may want to update your tag:"
|
||||
echo " $ docker tag ${GITUSER}/${GITREPO}:$VERSION ${GITUSER}/${GITREPO}:${VERSION}"
|
||||
|
||||
popd
|
||||
@@ -0,0 +1,46 @@
|
||||
version: '3'
|
||||
services:
|
||||
node_alice:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: polkadot_builder.Dockerfile
|
||||
ports:
|
||||
- "30333:30333"
|
||||
- "9933:9933"
|
||||
- "9944:9944"
|
||||
image: chevdor/polkadot:latest
|
||||
volumes:
|
||||
- "polkadot-data-alice:/data"
|
||||
command: polkadot --chain=polkadot-local --alice -d /data --node-key 0000000000000000000000000000000000000000000000000000000000000001
|
||||
networks:
|
||||
testing_net:
|
||||
ipv4_address: 172.28.1.1
|
||||
|
||||
node_bob:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: polkadot_builder.Dockerfile
|
||||
ports:
|
||||
- "30344:30344"
|
||||
- "9935:9935"
|
||||
- "9945:9945"
|
||||
image: chevdor/polkadot:latest
|
||||
volumes:
|
||||
- "polkadot-data-bob:/data"
|
||||
links:
|
||||
- "node_alice:alice"
|
||||
command: polkadot --chain=polkadot-local --bob -d /data --port 30344 --rpc-port 9935 --ws-port 9945 --bootnodes '/ip4/172.28.1.1/tcp/30333/p2p/QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR'
|
||||
networks:
|
||||
testing_net:
|
||||
ipv4_address: 172.28.1.2
|
||||
|
||||
volumes:
|
||||
polkadot-data-alice:
|
||||
polkadot-data-bob:
|
||||
|
||||
networks:
|
||||
testing_net:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.28.0.0/16
|
||||
@@ -0,0 +1,16 @@
|
||||
version: '3'
|
||||
services:
|
||||
polkadot:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: polkadot_builder.Dockerfile
|
||||
ports:
|
||||
- "127.0.0.1:30333:30333/tcp"
|
||||
- "127.0.0.1:9933:9933/tcp"
|
||||
image: chevdor/polkadot:latest
|
||||
volumes:
|
||||
- "polkadot-data:/data"
|
||||
command: polkadot
|
||||
|
||||
volumes:
|
||||
polkadot-data:
|
||||
@@ -0,0 +1,28 @@
|
||||
FROM docker.io/paritytech/ci-linux:production as builder
|
||||
LABEL io.parity.image.description="This is the build stage for Polkadot. Here we create the binary."
|
||||
|
||||
WORKDIR /polkadot
|
||||
|
||||
COPY . /polkadot
|
||||
|
||||
RUN cargo build --release --locked
|
||||
|
||||
# ===== SECOND STAGE ======
|
||||
|
||||
FROM docker.io/library/ubuntu:20.04
|
||||
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 && \
|
||||
mkdir /data && \
|
||||
chown -R polkadot:polkadot /data && \
|
||||
ln -s /data /polkadot/.local/share/polkadot && \
|
||||
rm -rf /usr/bin /usr/sbin
|
||||
|
||||
USER polkadot
|
||||
EXPOSE 30333 9933 9944 9615
|
||||
VOLUME ["/data"]
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user