Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Alpine docker #123

Closed
wants to merge 4 commits into from
Closed

Conversation

sysadmiral
Copy link

I've based the image on alpine to reduce the size of the image from ~800MB to ~300MB.

I've done some testing with the following repos:

  • ruby - jekyll
  • python - python-mysqltuner
  • javascript - You-Dont-Need-Lodash-Underscore
  • php - composer

Let me know if there are any issues with the Dockerfile/image.

Cheers,

Amo

@@ -1,23 +1,30 @@
FROM jruby:9.0.3-jdk
FROM alpine:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a latest tag runs the risk of non-reproducible builds as time goes on. Can you use the latest released tag, I think it's 3.4?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated! :)

@pbrisbin
Copy link
Contributor

pbrisbin commented Jul 5, 2016

Ping @mrb do you remember the historical context around the JRuby choice here? It's unclear if we had a concrete performance issue that was addressed by moving to JRuby.

@pbrisbin
Copy link
Contributor

pbrisbin commented Jul 5, 2016

I found the commit where we switched to JRuby: 4d34157 it includes some benchmarks for "a medium sized JavaScript project".

@sysadmiral
Copy link
Author

I see. I did wonder about the decision since most other engines Dockerfiles used alpine.

If it would be better to continue with a larger but faster engine then this PR can be closed?

@pbrisbin
Copy link
Contributor

pbrisbin commented Jul 5, 2016

If it would be better to continue with a larger but faster engine then this PR can be closed?

I'm not sure. We definitely appreciate your effort here, so we wanted to look into the performance implications before just closing the PR. That said, there may be a bit more effort involved in pinning down those performance questions, and living with the larger image is not a problem for us.

So, if you're willing to work on getting some performance metrics on various projects (especially larger ones) we'd be happy to evaluate that and (if the performance loss isn't great) work towards merging this. If you'd rather not though, we'll stick with the larger JRuby image for now.

@sysadmiral
Copy link
Author

sysadmiral commented Jul 5, 2016

I'd be happy to compare analysis results on a set of repos (top 50 trending repos on github?) but do I get the timings just using the --dev flag?

@pbrisbin
Copy link
Contributor

pbrisbin commented Jul 5, 2016

I think I would use this approach:

  • Build an image from master with a tag (e.g. :jruby)
  • Build an image from this branch with another tag (e.g. :alpine)
  • In each example project:
  • Tag the jruby image as codeclimate/codeclimate-duplication
  • Run time codeclimate analyze -e duplication
  • Tag the alpine image as codeclimate/codeclimate-duplication
  • Run time codeclimate analyze -e duplication

@sysadmiral
Copy link
Author

Great I will come back here when I have more information. Thanks for the help! 😄

@dblandin
Copy link
Contributor

Hey @sysadmiral,

Just checking in. :) Any update on this PR?

@sysadmiral
Copy link
Author

Sorry not yet. I should have time next week though to get some of this done. Would that be ok?

@dblandin
Copy link
Contributor

dblandin commented Oct 3, 2016

Sorry not yet. I should have time next week though to get some of this done. Would that be ok?

For sure! Ping us when you're ready for another review. Thanks!

@dblandin
Copy link
Contributor

dblandin commented Jan 31, 2017

Hey @sysadmiral! Any interest in finishing this up? If not, no worries. We can revisit this at a later time.

@sysadmiral
Copy link
Author

Hi @dblandin definitely got the interest just struggling to get the time right now.

I'm happy for you to close this if it helps your "housekeeping" but if you are ok to leave it open for me to work on it that would be great.

Let me know what works best for you.

@dblandin
Copy link
Contributor

Going to go ahead and close this PR for now. Feel free to reopen later!

@dblandin dblandin closed this Mar 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants