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

Base on alpine linux instead of ubuntu #3

Closed
eliasbagley opened this issue Dec 7, 2017 · 3 comments
Closed

Base on alpine linux instead of ubuntu #3

eliasbagley opened this issue Dec 7, 2017 · 3 comments

Comments

@eliasbagley
Copy link

eliasbagley commented Dec 7, 2017

Any possibility for this? I'm using this image as part of a Gitlab CI workflow, and quite a big chunk of time is spent downloading the image each time. This could be sped up quite a bit if the base image were as minimal and small as possible. It would cut the base image size from about 188 MB to 5 MB.

@thyrlian
Copy link
Owner

thyrlian commented Dec 7, 2017

Totally agree with you - SIZE matters! It's crucial for the speed of deployment.

To be honest, the reason why I use ubuntu instead of alpine as the base image, is because that I don't think alpine would meet all the complicated dependencies. Of course, that is only my presumption, I was too lazy to prove it.

Thanks for your advice, I'll try it out this weekend. Currently I could think of 3 possible outcome:

  1. It works out of the box - happy ending :)
  2. It doesn't meet the dependencies at first try, but would work after install the missing dependencies.
  3. It doesn't meet the dependencies, even with them being installed later. This is the worst case - not easy to figure out the missing transitive dependencies installation.

@thyrlian
Copy link
Owner

thyrlian commented Dec 8, 2017

Forgot to ask one thing @eliasbagley - apart from trying alpine image, can't you also try to always use the pulled image locally, instead of downloading it every time?

  • The image is not updated frequently;
  • You could pull the update by hand (or by some job) when there is a update available;
  • As long as current image version works fine for you, you don't have to update to the latest version.

@thyrlian
Copy link
Owner

thyrlian commented Dec 10, 2017

@eliasbagley I've tried using alpine base image, but with no luck, here is why.

From the first RUN command in the Dockerfile, it does enabling multiarch:

dpkg --add-architecture i386
apt-get update -y
apt-get install -y libncurses5:i386 libc6:i386 libstdc++6:i386 lib32gcc1 lib32ncurses5 lib32z1 zlib1g:i386

Which in fact is trying to solve the problem described here:

Some users using the Android SDK might encounter problems when trying to run build-tools or platform-tools on amd64 bit platform. As replacement for ia32-libs, users should be fine just installing the following libraries:

dpkg --add-architecture i386
apt-get update
apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386

While unfortunately according to here, you'll find that alpine doesn't have ia32-libs package so far.

As a result, the answer would be "sorry, we can't use alpine as the base image at the moment".

Thank you for your understanding.

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

No branches or pull requests

2 participants