El lun., 14 oct. 2019 a las 5:23, Pierce Ng (<pie...@samadhiweb.com>)
escribió:

> On Mon, Oct 14, 2019 at 04:07:49AM -0300, Hernán Morales Durand wrote:
> > Because I am lazy and want to avoid searching through all DockerHub
> > repository pages... Do you know a Dockerfile to generate the smallest
> > possible docker image for Pharo?
> > Anyone could make it work Pharo on Alpine since it uses different libc?
>
> Hi Hernán,
>
> Please see following links:
>
> - https://github.com/pharo-contributions/Docker-Alpine
> - https://hub.docker.com/r/pierceng/pharovm-alpine
> - https://hub.docker.com/r/pierceng/pharo7-alpine
> - https://www.samadhiweb.com/blog/2019.07.20.alpine.pharo.minimal.html
> - https://www.samadhiweb.com/blog/2019.08.11.minimizing.pharo.html
>
>
Nice! It works with latest minimal 7.0.4 too.

BTW you used .sources whith seem to be for Pharo 7
(Pharo7.0-32bit-0903ade.sources), but when I tried with latest stable
minimal and for some reason requires the V60 sources:

$ docker run --rm --ulimit rtprio=2 pharo7_docker_alpine printVersion
Pharo cannot locate the sources file named /pkg/image/PharoV60.sources.

I found also another approach using rtprio=2:2 suggested from
https://github.com/ba-st/docker-pharo/blob/master/docs/rtprio.md (soft:hard
ulimits).

The Alpine-based VM can be made smaller by removing unused/irrelevant
> modules.
>
> Image-wise, currently I am using Pharo 7 minimal, which is just under
> 30MB, and that forms the lower bound of the Pharo image size.
>
>
The built image here is aprox. 99 Mbytes

REPOSITORY               TAG                 IMAGE ID            CREATED
          SIZE
pharo7_docker_alpine     latest              595b9ece2625        3 hours
ago         99.4MB

but I think you didn't sumed the .sources.


> However there is also the Pharo Candle effort that aims to make really
> small images, which I hope to try out soon.
>
> > I am also interested in which stage you use to install packages into the
> > image, and why? Do you copy the contained image into docker already
> built?
>
> For Pharo, I start with the regular or minimal image, then load my
> packages.
>
> For Docker, I first build a container image for the VM only. Using that
> I build a new container image from the Pharo image and other required
> files.
>
>
Thank you for sharing Pierce.

Hernán

Reply via email to