Fix project name, links, rename the binaries (#11580)

* Fix project name, links, rename binary

* Update util/version/Cargo.toml

Co-Authored-By: David <dvdplm@gmail.com>

* Update updater/Cargo.toml

Co-Authored-By: David <dvdplm@gmail.com>

* Update util/version/Cargo.toml

Co-Authored-By: David <dvdplm@gmail.com>

Co-authored-by: David <dvdplm@gmail.com>
This commit is contained in:
Artem Vorotnikov
2020-03-25 19:16:51 +03:00
committed by GitHub
parent 0ac15a0883
commit 4f26ffd447
138 changed files with 6321 additions and 6324 deletions

View File

@@ -1,34 +1,34 @@
## Usage
```docker build -f docker/ubuntu/Dockerfile --tag ethcore/parity:branch_or_tag_name .```
```docker build -f docker/ubuntu/Dockerfile --tag ethcore/openethereum:branch_or_tag_name .```
## Usage - CentOS
Builds a lightweight non-root Parity docker image:
Builds a lightweight non-root OpenEthereum docker image:
```
git clone https://github.com/OpenEthereum/open-ethereum.git
cd open-ethereum
git clone https://github.com/openethereum/openethereum.git
cd openethereum
./scripts/docker/centos/build.sh
```
Fully customised build:
```
PARITY_IMAGE_REPO=my-personal/parity \
PARITY_BUILDER_IMAGE_TAG=build-latest \
PARITY_RUNNER_IMAGE_TAG=centos-parity-experimental \
OPENETHEREUM_IMAGE_REPO=my-personal/openethereum \
OPENETHEREUM_BUILDER_IMAGE_TAG=build-latest \
OPENETHEREUM_RUNNER_IMAGE_TAG=centos-openethereum-experimental \
./scripts/docker/centos/build.sh
```
Default values:
```
# The image name
PARITY_IMAGE_REPO - parity/parity
OPENETHEREUM_IMAGE_REPO - openethereum/openethereum
# The tag to be used for builder image, git commit sha will be appended
PARITY_BUILDER_IMAGE_TAG - build
OPENETHEREUM_BUILDER_IMAGE_TAG - build
# The tag to be used for runner image
PARITY_RUNNER_IMAGE_TAG - latest
OPENETHEREUM_RUNNER_IMAGE_TAG - latest
```
All default ports you might use will be exposed:

View File

@@ -14,11 +14,11 @@ RUN apk add --no-cache \
clang-dev \
llvm-dev
WORKDIR /parity
COPY . /parity
WORKDIR /openethereum
COPY . /openethereum
ENV C=clang CXX=clang++
RUN cargo build --release --features final --target x86_64-alpine-linux-musl --verbose
RUN strip target/x86_64-alpine-linux-musl/release/parity
RUN strip target/x86_64-alpine-linux-musl/release/openethereum
FROM alpine:edge
@@ -30,16 +30,16 @@ RUN apk add --no-cache \
eudev-libs \
libgcc
RUN addgroup -g 1000 parity \
&& adduser -u 1000 -G parity -s /bin/sh -D parity
RUN addgroup -g 1000 openethereum \
&& adduser -u 1000 -G openethereum -s /bin/sh -D openethereum
USER parity
USER openethereum
EXPOSE 8080 8545 8180
WORKDIR /home/parity
WORKDIR /home/openethereum
RUN mkdir -p /home/parity/.local/share/io.parity.ethereum/
COPY --chown=parity:parity --from=builder /parity/target/x86_64-alpine-linux-musl/release/parity ./
RUN mkdir -p /home/openethereum/.local/share/io.parity.ethereum/
COPY --chown=openethereum:openethereum --from=builder /openethereum/target/x86_64-alpine-linux-musl/release/openethereum ./
ENTRYPOINT ["./parity"]
ENTRYPOINT ["./openethereum"]

View File

@@ -1,12 +1,12 @@
FROM centos:latest
RUN mkdir -p /opt/parity/data && \
chmod g+rwX /opt/parity/data && \
mkdir -p /opt/parity/release
RUN mkdir -p /opt/openethereum/data && \
chmod g+rwX /opt/openethereum/data && \
mkdir -p /opt/openethereum/release
COPY parity/parity /opt/parity/release
COPY openethereum/openethereum /opt/openethereum/release
WORKDIR /opt/parity/data
WORKDIR /opt/openethereum/data
# exposing default ports
#
@@ -20,9 +20,4 @@ USER 1001
#if no base path provided, assume it's current workdir
CMD ["--base-path","."]
ENTRYPOINT ["/opt/parity/release/parity"]
ENTRYPOINT ["/opt/openethereum/release/openethereum"]

View File

@@ -2,7 +2,7 @@ FROM centos:latest
WORKDIR /build
ADD . /build/open-ethereum
ADD . /build/openethereum
RUN yum -y update && \
yum install -y systemd-devel git make gcc-c++ gcc file binutils && \
@@ -17,9 +17,9 @@ RUN yum -y update && \
gcc -v && \
g++ -v && \
cmake --version && \
cd open-ethereum && \
cd openethereum && \
cargo build --verbose --release --features final && \
strip /build/open-ethereum/target/release/parity && \
file /build/open-ethereum/target/release/parity
strip /build/openethereum/target/release/openethereum && \
file /build/openethereum/target/release/openethereum

View File

@@ -1,29 +1,29 @@
#!/usr/bin/env sh
# The image name
PARITY_IMAGE_REPO=${PARITY_IMAGE_REPO:-parity/parity}
OPENETHEREUM_IMAGE_REPO=${OPENETHEREUM_IMAGE_REPO:-openethereum/openethereum}
# The tag to be used for builder image
PARITY_BUILDER_IMAGE_TAG=${PARITY_BUILDER_IMAGE_TAG:-build}
OPENETHEREUM_BUILDER_IMAGE_TAG=${OPENETHEREUM_BUILDER_IMAGE_TAG:-build}
# The tag to be used for runner image
PARITY_RUNNER_IMAGE_TAG=${PARITY_RUNNER_IMAGE_TAG:-latest}
OPENETHEREUM_RUNNER_IMAGE_TAG=${OPENETHEREUM_RUNNER_IMAGE_TAG:-latest}
echo Building $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
docker build --no-cache -t $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H") . -f scripts/docker/centos/Dockerfile.build
echo Building $OPENETHEREUM_IMAGE_REPO:$OPENETHEREUM_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
docker build --no-cache -t $OPENETHEREUM_IMAGE_REPO:$OPENETHEREUM_BUILDER_IMAGE_TAG-$(git log -1 --format="%H") . -f scripts/docker/centos/Dockerfile.build
echo Creating $PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H"), extracting binary
docker create --name extract $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
mkdir scripts/docker/centos/parity
docker cp extract:/build/open-ethereum/target/release/parity scripts/docker/centos/parity
echo Creating $OPENETHEREUM_BUILDER_IMAGE_TAG-$(git log -1 --format="%H"), extracting binary
docker create --name extract $OPENETHEREUM_IMAGE_REPO:$OPENETHEREUM_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
mkdir scripts/docker/centos/openethereum
docker cp extract:/build/openethereum/target/release/openethereum scripts/docker/centos/openethereum
echo Building $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG
docker build --no-cache -t $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG scripts/docker/centos/ -f scripts/docker/centos/Dockerfile
echo Building $OPENETHEREUM_IMAGE_REPO:$OPENETHEREUM_RUNNER_IMAGE_TAG
docker build --no-cache -t $OPENETHEREUM_IMAGE_REPO:$OPENETHEREUM_RUNNER_IMAGE_TAG scripts/docker/centos/ -f scripts/docker/centos/Dockerfile
echo Cleaning up ...
rm -rf scripts/docker/centos/parity
rm -rf scripts/docker/centos/openethereum
docker rm -f extract
docker rmi -f $PARITY_IMAGE_REPO:$PARITY_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
docker rmi -f $OPENETHEREUM_IMAGE_REPO:$OPENETHEREUM_BUILDER_IMAGE_TAG-$(git log -1 --format="%H")
echo Echoing Parity version:
docker run $PARITY_IMAGE_REPO:$PARITY_RUNNER_IMAGE_TAG --version
echo Echoing OpenEthereum version:
docker run $OPENETHEREUM_IMAGE_REPO:$OPENETHEREUM_RUNNER_IMAGE_TAG --version
echo Done.

View File

@@ -4,15 +4,15 @@ FROM ubuntu:xenial
ARG VCS_REF
ARG BUILD_DATE
LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/parity" \
io.parity.image.description="Open Ethereum. The Fastest and most Advanced Ethereum Client." \
io.parity.image.source="https://github.com/OpenEthereum/open-ethereum/blob/${VCS_REF}/\
scripts/docker/hub/Dockerfile" \
io.parity.image.documentation="https://wiki.parity.io/Parity-Ethereum" \
io.parity.image.revision="${VCS_REF}" \
io.parity.image.created="${BUILD_DATE}"
LABEL openethereum.image.authors="devops-team@parity.io" \
openethereum.image.vendor="OpenEthereum project" \
openethereum.image.title="openethereum/openethereum" \
openethereum.image.description="Fast and feature-rich multi-network Ethereum client." \
openethereum.image.source="https://github.com/openethereum/openethereum/blob/${VCS_REF}/\
scripts/docker/hub/Dockerfile" \
openethereum.image.documentation="https://wiki.parity.io/Parity-Ethereum" \
openethereum.image.revision="${VCS_REF}" \
openethereum.image.created="${BUILD_DATE}"
# show backtraces
ENV RUST_BACKTRACE 1
@@ -21,28 +21,28 @@ ENV RUST_BACKTRACE 1
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
file curl jq ca-certificates; \
# apt cleanup
file curl jq ca-certificates; \
# apt cleanup
apt-get autoremove -y; \
apt-get clean; \
update-ca-certificates; \
update-ca-certificates; \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; \
# add user
groupadd -g 1000 parity; \
useradd -m -u 1000 -g parity -s /bin/sh parity
# add user
groupadd -g 1000 openethereum; \
useradd -m -u 1000 -g openethereum -s /bin/sh openethereum
WORKDIR /home/parity
WORKDIR /home/openethereum
# add open-ethereum binary to docker image
COPY artifacts/x86_64-unknown-linux-gnu/parity /bin/parity
# add openethereum binary to docker image
COPY artifacts/x86_64-unknown-linux-gnu/openethereum /bin/openethereum
COPY tools/check_sync.sh /check_sync.sh
# switch to user parity here
USER parity
# switch to user openethereum here
USER openethereum
# check if executable works in this container
RUN parity --version
RUN openethereum --version
EXPOSE 5001 8080 8082 8083 8545 8546 8180 30303/tcp 30303/udp
ENTRYPOINT ["/bin/parity"]
ENTRYPOINT ["/bin/openethereum"]

View File

@@ -1,13 +1,13 @@
#!/bin/bash
# checks if parity has a fully synced blockchain
# checks if OpenEthereum has a fully synced blockchain
ETH_SYNCING=$(curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' http://localhost:8545 -H 'Content-Type: application/json')
RESULT=$(echo "$ETH_SYNCING" | jq -r .result)
if [ "$RESULT" == "false" ]; then
echo "Parity is ready to start accepting traffic"
echo "OpenEthereum is ready to start accepting traffic"
exit 0
else
echo "Parity is still syncing the blockchain"
echo "OpenEthereum is still syncing the blockchain"
exit 1
fi

View File

@@ -4,53 +4,53 @@ set -e # fail on any error
VERSION=$(cat ./tools/VERSION)
TRACK=$(cat ./tools/TRACK)
echo "Open Ethereum version = ${VERSION}"
echo "Open Ethereum track = ${TRACK}"
echo "OpenEthereum version = ${VERSION}"
echo "OpenEthereum track = ${TRACK}"
test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" \
test "$Docker_Hub_User_OpenEthereum" -a "$Docker_Hub_Pass_OpenEthereum" \
|| ( echo "no docker credentials provided"; exit 1 )
docker login -u "$Docker_Hub_User_Parity" -p "$Docker_Hub_Pass_Parity"
docker login -u "$Docker_Hub_User_OpenEthereum" -p "$Docker_Hub_Pass_OpenEthereum"
echo "__________Docker info__________"
docker info
# we stopped pushing nightlies to dockerhub, will push to own registry prb.
case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in
"$SCHEDULE_TAG")
echo "Docker TAG - 'parity/parity:${SCHEDULE_TAG}'";
echo "Docker TAG - 'openethereum/openethereum:${SCHEDULE_TAG}'";
docker build --no-cache \
--build-arg VCS_REF="${CI_COMMIT_SHA}" \
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
--tag "parity/parity:${SCHEDULE_TAG}" \
--tag "openethereum/openethereum:${SCHEDULE_TAG}" \
--file tools/Dockerfile .;
docker push "parity/parity:${SCHEDULE_TAG}";;
docker push "openethereum/openethereum:${SCHEDULE_TAG}";;
"stable")
echo "Docker TAGs - 'parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}', 'parity/parity:stable'";
echo "Docker TAGs - 'openethereum/openethereum:${VERSION}-${CI_COMMIT_REF_NAME}', 'openethereum/openethereum:stable'";
docker build --no-cache \
--build-arg VCS_REF="${CI_COMMIT_SHA}" \
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
--tag "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}" \
--tag "parity/parity:latest" \
--tag "parity/parity:stable" \
--tag "openethereum/openethereum:${VERSION}-${CI_COMMIT_REF_NAME}" \
--tag "openethereum/openethereum:latest" \
--tag "openethereum/openethereum:stable" \
--file tools/Dockerfile .;
docker push "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}";
docker push "parity/parity:stable";
docker push "parity/parity:latest";;
docker push "openethereum/openethereum:${VERSION}-${CI_COMMIT_REF_NAME}";
docker push "openethereum/openethereum:stable";
docker push "openethereum/openethereum:latest";;
v[0-9]*.[0-9]*)
echo "Docker TAG - 'parity/parity:${VERSION}-${TRACK}'"
echo "Docker TAG - 'openethereum/openethereum:${VERSION}-${TRACK}'"
docker build --no-cache \
--build-arg VCS_REF="${CI_COMMIT_SHA}" \
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
--tag "parity/parity:${VERSION}-${TRACK}" \
--tag "openethereum/openethereum:${VERSION}-${TRACK}" \
--file tools/Dockerfile .;
docker push "parity/parity:${VERSION}-${TRACK}";;
docker push "openethereum/openethereum:${VERSION}-${TRACK}";;
*)
echo "Docker TAG - 'parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}'"
echo "Docker TAG - 'openethereum/openethereum:${VERSION}-${CI_COMMIT_REF_NAME}'"
docker build --no-cache \
--build-arg VCS_REF="${CI_COMMIT_SHA}" \
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
--tag "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}" \
--tag "openethereum/openethereum:${VERSION}-${CI_COMMIT_REF_NAME}" \
--file tools/Dockerfile .;
docker push "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}";;
docker push "openethereum/openethereum:${VERSION}-${CI_COMMIT_REF_NAME}";;
esac
docker logout

View File

@@ -19,10 +19,10 @@ RUN echo '# source urls for arm64 \n\
RUN apt-get -y update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
curl make cmake file ca-certificates \
g++ gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
libc6-dev-arm64-cross binutils-aarch64-linux-gnu \
&& \
curl make cmake file ca-certificates \
g++ gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
libc6-dev-arm64-cross binutils-aarch64-linux-gnu \
&& \
apt-get clean
# install rustup
@@ -42,19 +42,19 @@ ENV RUST_BACKTRACE 1
# show tools
RUN rustc -vV && cargo -V
# build parity
ADD . /build/parity
RUN cd parity && \
# build OpenEthereum
ADD . /build/openethereum
RUN cd openethereum && \
mkdir -p .cargo && \
echo '[target.aarch64-unknown-linux-gnu]\n\
linker = "aarch64-linux-gnu-gcc"\n'\
>>.cargo/config && \
cat .cargo/config && \
cargo build --target aarch64-unknown-linux-gnu --release --verbose && \
ls /build/parity/target/aarch64-unknown-linux-gnu/release/parity && \
/usr/bin/aarch64-linux-gnu-strip /build/parity/target/aarch64-unknown-linux-gnu/release/parity
ls /build/openethereum/target/aarch64-unknown-linux-gnu/release/openethereum && \
/usr/bin/aarch64-linux-gnu-strip /build/openethereum/target/aarch64-unknown-linux-gnu/release/openethereum
RUN file /build/parity/target/aarch64-unknown-linux-gnu/release/parity
RUN file /build/openethereum/target/aarch64-unknown-linux-gnu/release/openethereum
EXPOSE 8080 8545 8180
ENTRYPOINT ["/build/parity/target/aarch64-unknown-linux-gnu/release/parity"]
ENTRYPOINT ["/build/openethereum/target/aarch64-unknown-linux-gnu/release/openethereum"]

View File

@@ -8,7 +8,7 @@ RUN apt-get -y update && \
libc6-dev-armhf-cross wget file ca-certificates \
binutils-arm-linux-gnueabihf cmake3 \
&& \
apt-get clean
apt-get clean
# install rustup
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
@@ -27,19 +27,19 @@ ENV RUST_BACKTRACE 1
# show tools
RUN rustc -vV && cargo -V
# build parity
ADD . /build/parity
RUN cd parity && \
# build OpenEthereum
ADD . /build/openethereum
RUN cd openethereum && \
mkdir -p .cargo && \
echo '[target.armv7-unknown-linux-gnueabihf]\n\
linker = "arm-linux-gnueabihf-gcc"\n'\
>>.cargo/config && \
cat .cargo/config && \
cargo build --target armv7-unknown-linux-gnueabihf --release --verbose && \
ls /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity && \
/usr/bin/arm-linux-gnueabihf-strip /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity
ls /build/openethereum/target/armv7-unknown-linux-gnueabihf/release/openethereum && \
/usr/bin/arm-linux-gnueabihf-strip /build/openethereum/target/armv7-unknown-linux-gnueabihf/release/openethereum
RUN file /build/parity/target/armv7-unknown-linux-gnueabihf/release/parity
RUN file /build/openethereum/target/armv7-unknown-linux-gnueabihf/release/openethereum
EXPOSE 8080 8545 8180
ENTRYPOINT ["/build/parity/target/armv7-unknown-linux-gnueabihf/release/parity"]
ENTRYPOINT ["/build/openethereum/target/armv7-unknown-linux-gnueabihf/release/openethereum"]