Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

nonroot CentOS Dockerfile #9231

Closed

Conversation

JohnnySheffield
Copy link
Contributor

@JohnnySheffield JohnnySheffield commented Jul 26, 2018

Usage - CentOS

Builds a lightweight non-root Parity docker image:

git clone https://github.com/paritytech/parity-ethereum.git
cd parity-ethereum
./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 \
./docker/centos/build.sh

Default values:

# The image name
PARITY_IMAGE_REPO - parity/parity

# The tag to be used for builder image, git commit sha will be appended
PARITY_BUILDER_IMAGE_TAG - build

# The tag to be used for runner image
PARITY_RUNNER_IMAGE_TAG - latest

All default ports you might use will be exposed:

#           secret
#      ipfs store     ui   rpc  ws   listener  discovery
#      ↓    ↓         ↓    ↓    ↓    ↓         ↓
EXPOSE 5001 8082 8083 8180 8545 8546 30303/tcp 30303/udp

Related to #7374

@parity-cla-bot
Copy link

It looks like @JohnnySheffield signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@5chdn 5chdn added this to the 2.1 milestone Jul 27, 2018
@5chdn 5chdn added A0-pleasereview 🤓 Pull request needs code review. M1-ci 🙉 Continuous integration. labels Jul 27, 2018
@JohnnySheffield
Copy link
Contributor Author

JohnnySheffield commented Jul 30, 2018

on dcb5710 i've started to play around with builder pattern. It's a bit more demanding as there is 2 Dockerfiles and a .sh script, but resulting in a smaller final image (90 mb on dockerhub) vs official parity image 139 mb on dockerhub

Basic idea is to first build and start a "builder dockerfile", then extract the parity binary outside of the image, then build a "runner dockerfile" with the newly built binary.

@5chdn 5chdn requested a review from General-Beck July 30, 2018 09:11
tomusdrw and others added 2 commits July 30, 2018 11:19
* blockchain insert expects owned block instead of block reference

* reduce a number of times a block is deserialized

* removed cached uncle_bytes from block

* removed is_finalized from OpenBlock

* removed unused parity_machine::WithMetadata trait

* removed commented out code

* remove unused metadata from block

* remove unused metadata from block

* BlockDetails extras may have at most 5 elements
JohnnySheffield and others added 27 commits August 3, 2018 21:20
…ser and proper workdir, define fallback —base-path so if none passed image starts ok
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-pleasereview 🤓 Pull request needs code review. M1-ci 🙉 Continuous integration.
Projects
None yet
Development

Successfully merging this pull request may close these issues.