This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ao-upgrade-ethereum-types
- Loading branch information
Showing
9 changed files
with
140 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,47 @@ | ||
FROM ubuntu:xenial | ||
LABEL MAINTAINER="Parity Technologies <devops-team@parity.io>" | ||
|
||
# install tools and dependencies | ||
RUN apt update && apt install -y --no-install-recommends openssl file curl jq | ||
# metadata | ||
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="Parity Ethereum. The Fastest and most Advanced Ethereum Client." \ | ||
io.parity.image.source="https://github.com/paritytech/parity-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}" | ||
|
||
# show backtraces | ||
ENV RUST_BACKTRACE 1 | ||
|
||
# cleanup Docker image | ||
RUN apt autoremove -y \ | ||
&& apt clean -y \ | ||
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* | ||
|
||
RUN groupadd -g 1000 parity \ | ||
&& useradd -m -u 1000 -g parity -s /bin/sh parity | ||
# install tools and dependencies | ||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
file curl jq; \ | ||
# apt cleanup | ||
apt-get autoremove -y; \ | ||
apt-get clean; \ | ||
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 | ||
|
||
WORKDIR /home/parity | ||
|
||
# add parity-ethereum to docker image | ||
# add parity-ethereum binary to docker image | ||
COPY artifacts/x86_64-unknown-linux-gnu/parity /bin/parity | ||
|
||
COPY scripts/docker/hub/check_sync.sh /check_sync.sh | ||
COPY tools/check_sync.sh /check_sync.sh | ||
|
||
# switch to user parity here | ||
USER parity | ||
|
||
# check if executable works in this container | ||
RUN parity --version | ||
|
||
EXPOSE 5001 8080 8082 8083 8545 8546 8180 30303/tcp 30303/udp | ||
|
||
ENTRYPOINT ["/bin/parity"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/sh | ||
|
||
set -e # fail on any error | ||
|
||
VERSION=$(cat ./tools/VERSION) | ||
echo "Parity Ethereum version = ${VERSION}" | ||
|
||
test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" \ | ||
|| ( echo "no docker credentials provided"; exit 1 ) | ||
docker login -u "$Docker_Hub_User_Parity" -p "$Docker_Hub_Pass_Parity" | ||
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}'"; | ||
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}" \ | ||
--file tools/Dockerfile .; | ||
docker push "parity/parity:${SCHEDULE_TAG}";; | ||
"beta") | ||
echo "Docker TAGs - 'parity/parity:beta', 'parity/parity:latest', \ | ||
'parity/parity:${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:beta" \ | ||
--tag "parity/parity:latest" \ | ||
--tag "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}" \ | ||
--file tools/Dockerfile .; | ||
docker push "parity/parity:beta"; | ||
docker push "parity/parity:latest"; | ||
docker push "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}";; | ||
"stable") | ||
echo "Docker TAGs - 'parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}', 'parity/parity: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:stable" \ | ||
--file tools/Dockerfile .; | ||
docker push "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}"; | ||
docker push "parity/parity:stable";; | ||
*) | ||
echo "Docker TAG - 'parity/parity:${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}" \ | ||
--file tools/Dockerfile .; | ||
docker push "parity/parity:${VERSION}-${CI_COMMIT_REF_NAME}";; | ||
esac | ||
|
||
docker logout |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters