Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using docker multi staging #132

Open
iham opened this issue Apr 10, 2020 · 2 comments
Open

using docker multi staging #132

iham opened this issue Apr 10, 2020 · 2 comments

Comments

@iham
Copy link
Member

iham commented Apr 10, 2020

is there any approach towards using multi staging as docker supports?

as far as i understand the concept, it would be possilbe to split the created images into

  • 1st stage: a basic python (with zc.buildout and setuptools installed based on requirements.txt)
  • 2nd stage: a basic plone buildout (basic system packages and all the default eggs)
  • 3rd stage: a custom plone buildout (extended system packages and additional eggs)
  • 4th stage: the running instance (system build deps removed)

and for zeo purpose separate stages using the basic python stage:

  • 2nd stage: a basic zeo buildout (basic system packages and all the default eggs only needed for zeo)
  • 3rd stage: the running zeo (system build deps removed)

i see some advantages here:

  • faster docker builds, as previous unchanged stages will not compile over and over again
  • each stage can handle its own entrypoints and commands
    • while the basic plone buildout hat entrypoint "buildout" and CMD could be "-vvv" or such, the running instance has ENTRYPOINT "./bin/instance" and CMD "start"
  • the docker-initialize.py and entrypoint.sh would be gone
    • switching inside the docker what might happen could be achieved more explicit
    • customising the docker image you want to build might become more handy
  • in docker-compose you can select a stage you want to use "target"

as i don't see disadvantages i am ... in doubt ;)

any comments on that?
anybody already tried but failed horribly?
any concerns?

please share your thoughts.

thanks

@avoinea
Copy link
Sponsor Member

avoinea commented Apr 24, 2020

@iham

As I have almost no experience with multi staging builds, don't fully rely on my opinion, but I tend to like your proposal.

I also think that this will work best when we will use pip to install Plone #89

I think we also had an earlier discussion about moving to build stages within #90, but nothing materialized.

Thus, I would love to see a pull-request on this and/or some working examples.

@iham
Copy link
Member Author

iham commented Apr 28, 2020

thanks for pointing out @avoinea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants