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

Docker alpine: use multi-stage concept #9269

Merged
merged 2 commits into from
Aug 10, 2018

Conversation

fanatid
Copy link
Contributor

@fanatid fanatid commented Aug 2, 2018

This brings multi-stage concept and nonroot user.
Current image size is 1.42GB, with this Pull Request 58.2MB (20MB compressed on docker hub)

Thanks to @nbaksalyar for hint about --target flag, @ksemaev for testing

@parity-cla-bot
Copy link

It looks like @fanatid hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement at the following URL: https://cla.parity.io

Once you've signed, please reply to this thread with [clabot:check] to prove it.

Many thanks,

Parity Technologies CLA Bot

@fanatid
Copy link
Contributor Author

fanatid commented Aug 2, 2018

[clabot:check]

@parity-cla-bot
Copy link

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

Many thanks,

Parity Technologies CLA Bot

@sorpaas
Copy link
Collaborator

sorpaas commented Aug 2, 2018

@fanatid Merge #9270 would fix this CI build.

@fanatid
Copy link
Contributor Author

fanatid commented Aug 2, 2018

@sorpaas thanks, rebased

@JohnnySheffield
Copy link
Contributor

Do we care about supporting lower versions of Docker? For multistage builds one needs Docker 17.05.

@fanatid
Copy link
Contributor Author

fanatid commented Aug 2, 2018

Yes, multistage require Docker >= 17.05 :(
I can rewrite it without multistage without significant changes of image size, if this required.

@JohnnySheffield
Copy link
Contributor

JohnnySheffield commented Aug 2, 2018

I was kinda 50:50 with #9231 but then decided to go with supporting <17.05 I'm also not sure about different platform support. For instance, i think docker rpm package for RHEL is v1.13

I'm ready to rework #9231 to go with multistage builds if needed, but i think this is more of a question for Parity team what their plans are

edit: just tested the image size i get if i'm using multistage builds from docker, or doing it with a builder pattern -> the image size is the same.

@debris debris added A8-looksgood 🦄 Pull request is reviewed well. M0-build 🏗 Building and build system. labels Aug 7, 2018
@debris debris merged commit 65a1d88 into openethereum:master Aug 10, 2018
@fanatid fanatid deleted the docker-alpine-update branch August 10, 2018 08:49
ordian added a commit to ordian/parity that referenced this pull request Aug 10, 2018
…rp_sync_on_light_client

* 'master' of https://github.com/paritytech/parity:
  Allow setting the panic hook with parity-clib (openethereum#9292)
  Prevent blockchain & miner racing when accessing pending block. (openethereum#9310)
  Docker alpine: use multi-stage concept (openethereum#9269)
  Update `log` -> 0.4, `env_logger` -> 0.5. (openethereum#9294)
  Update tobalaba.json (openethereum#9313)
  Allow tx pool to be Send (openethereum#9315)
  Fix codecov.io badge in README (openethereum#9327)
  Move ethereum-specific H256FastMap type to own crate (openethereum#9307)
  ethcore sync decodes rlp less often (openethereum#9264)
@5chdn 5chdn added this to the 2.1 milestone Aug 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M0-build 🏗 Building and build system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants