[Blog Post] PoC Alpine Linux Minimal Stateless Pharo
Hi all, I've written a blog post on the topic. https://www.samadhiweb.com/blog/2019.07.20.alpine.pharo.minimal.html TL;DR: - Built pharo.cog.spur.minheadless on Alpine Linux. - Built Docker image of same: 12.5MB. - Using 7-minimal as base, built a stateless Pharo image with SUnit and SQLite: ~16MB. - Ran the SQLite unit tests from the command line using said image statelessly. - Built Docker image of Alpine Pharo VM and a/m SQLite Pharo image: 46.8MB. - Ran said Docker image which ran the SQLite unit tests. Pierce
Hi Pierce, Cross posting my answer from VM to here, sorry for the duplicate. This is very interesting. I have been playing with docker too [1] [2] [3] and indeed I also tried to make it work with alpine [4]. But it was complicated because alpine doesn't come with `glibc` but instead `musl`. And there are differences between them. So for example for VA Smalltalk I had to install `glibc`. I succeeded but the final size of the docker image with alpine + glibc was almost the same size as the debian lite... so it didn't make much sense to me. The support for glic is not official and as you can see I reported it [5] Anyway, I will be curious to know your progress. Would cog VM work correctly with musl instead of glibc? Best, [1] https://dev.to/martinezpeck/getting-started-with-docker-and-smalltalk-4po1 [2] https://dev.to/martinezpeck/step-2-single-node-docker-swarm-and-smalltalk-46... [3] https://dev.to/martinezpeck/docker-swarm-cloud-on-a-arm64-diy-sbc-cluster-ru... <https://dev.to/martinezpeck/docker-swarm-cloud-on-a-arm64-diy-sbc-cluster-ru...> [4] https://github.com/vasmalltalk/docker-examples/blob/master/source/SeasideTra... [5] https://github.com/sgerrand/alpine-pkg-glibc/issues/113 On Sat, Jul 20, 2019 at 5:39 AM Pierce Ng <pierce@samadhiweb.com> wrote:
Hi all,
I've written a blog post on the topic.
https://www.samadhiweb.com/blog/2019.07.20.alpine.pharo.minimal.html
TL;DR:
- Built pharo.cog.spur.minheadless on Alpine Linux.
- Built Docker image of same: 12.5MB.
- Using 7-minimal as base, built a stateless Pharo image with SUnit and SQLite: ~16MB.
- Ran the SQLite unit tests from the command line using said image statelessly.
- Built Docker image of Alpine Pharo VM and a/m SQLite Pharo image: 46.8MB.
- Ran said Docker image which ran the SQLite unit tests.
Pierce
-- Mariano Martinez Peck Email: marianopeck@gmail.com Twitter: @MartinezPeck LinkedIn: www.linkedin.com/in/mariano-martinez-peck <https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/> Blog: https://marianopeck.wordpress.com/
On Sat, Jul 20, 2019 at 10:58:36AM -0300, Mariano Martinez Peck wrote:
This is very interesting. I have been playing with docker too [1] [2] [3] and indeed I also tried to make it work with alpine [4]. But it was
Hi Mariano, Fun stuff!
Anyway, I will be curious to know your progress. Would cog VM work correctly with musl instead of glibc?
That's what I'll find out. :-) I built the Cog VM from source on Alpine. As written in my post said Cog VM successfully runs a minimal Pharo image doing FFI and Fuel. I'll be testing it with the regular image running some kind of webapp. Pierce
On Sat, Jul 20, 2019 at 9:05 PM Pierce Ng <pierce@samadhiweb.com> wrote:
On Sat, Jul 20, 2019 at 10:58:36AM -0300, Mariano Martinez Peck wrote:
This is very interesting. I have been playing with docker too [1] [2] [3] and indeed I also tried to make it work with alpine [4]. But it was
Hi Mariano,
Fun stuff!
Yes, I think it was very fun but useful at the same time :)
Anyway, I will be curious to know your progress. Would cog VM work correctly with musl instead of glibc?
That's what I'll find out. :-) I built the Cog VM from source on Alpine. As written in my post said Cog VM successfully runs a minimal Pharo image doing FFI and Fuel.
I'll be testing it with the regular image running some kind of webapp.
That sounds cool. Please keep us posted on your progress. Even if a "development" image cannot run on Alpine (because of whatever external lib), having a reduced/runtime/minima/production/whatever that would, is a great achievement. If I were you, I would also try to run the whole Pharo Test Suite on top of that minimal image (the test suite for that image, obviously). That may give you a better idea than just testing by using a webapp. Best, -- Mariano Martinez Peck Email: marianopeck@gmail.com Twitter: @MartinezPeck LinkedIn: www.linkedin.com/in/mariano-martinez-peck <https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/> Blog: https://marianopeck.wordpress.com/
participants (2)
-
Mariano Martinez Peck -
Pierce Ng