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

Optimizing the wekan Dockerfile #1560

Closed
gotjoshua opened this Issue Mar 31, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@gotjoshua
Copy link

gotjoshua commented Mar 31, 2018

I am in the process of dividing and reordering the single jumbo command currently in the wekan Dockerfile to allow for some caching in the build process.

I am making good progress - 23 of 31 steps caching when i change a file in the app
(available for review in my fork: Dockerfile )

I have some questions:

  1. Why is the Alpine Linux "paxctl fix" needed if the container is "FROM debian:buster-slim" ?

  2. Would it be possible to clean up some of the build dependencies earlier in the process - before the actual app build (eg curl and wget once they are not needed anymore) ?

  • I guess the question here is which build dependencies are needed in which stages of the process?
  1. Why are we tracing "meteor -- help;" during build?

Has optimization been considered at all yet?
I am using these resources so far:
https://medium.com/@esotericmeans/optimizing-your-dockerfile-dc4b7b527756

http://bitjudo.com/blog/2014/03/13/building-efficient-dockerfiles-node-dot-js/

@xet7

This comment has been minimized.

Copy link
Member

xet7 commented Mar 31, 2018

@gotjoshua

  1. Because if fix is not there, when using Alpine Linux at host, and running Wekan Docker container on top of Alpine Linux, there is a crash.

  2. You can clean up etc, if build still keeps working.

  3. I don't know, you could check does it work without it.

  4. Yes, as you see from Roadmap ss+ did have some optimizations for Dockerfile, but not had time to contribute changes yet. So please continue, because you seem to have some of optimizations done already.

There is also wekan-dev Dockerfile for development, you can also check that.

Thanks!

@gotjoshua

This comment has been minimized.

Copy link
Author

gotjoshua commented Mar 31, 2018

Ok, Ok... Thanks for the pointer to wekan-dev...
Can you describe the differences and reasons for them?
How long does it take to build and see changes?

I managed to get Docker to cache 26 of 31 steps - but a build still takes over 20minutes.

Not knowing that it exists, I recreated something quite similar but without submodule hocus pokus.

So, I'll keep at it... and update this issue with progress and more questions as they arise.

@andresmanelli

This comment has been minimized.

Copy link
Contributor

andresmanelli commented Mar 31, 2018

@gotjoshua if it helps, see also Dockerfile at https://github.com/andresmanelli/wekan-dev

@xet7

This comment has been minimized.

Copy link
Member

xet7 commented Mar 31, 2018

@gotjoshua

wekan/wekan dockerfile is tried to make of small image size, I think. If you can make it smaller, it would nice.

wekan/wekan-dev is made for development and faster rebuilds, but could be made better.
There are still unchecked pull requests at https://github.com/wekan/wekan-dev/pulls

If these approaches could be combined, that would be even better.

@gotjoshua

This comment has been minimized.

Copy link
Author

gotjoshua commented Mar 31, 2018

Very appealing:

changes made under src/ will automatically trigger a refresh of the interface.

Yes, I will see about combining the approaches...
I am no expert in Docker yet, but this is a great learning challenge!

Cheers!

@xet7

This comment has been minimized.

Copy link
Member

xet7 commented Mar 31, 2018

@andresmanelli @gotjoshua @whodafly

I added direct commit access to you to https://github.com/wekan/wekan-dev . Please go ahead and test changes and merge issues there. I don't currently have time for Docker.

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