Lazarus

Announcements => Third party => Topic started by: Signum Temporis on January 12, 2022, 10:01:51 am

Title: Lightweight Docker images for Free Pascal Compiler
Post by: Signum Temporis on January 12, 2022, 10:01:51 am
Hi,

I've crated lightweight (Alpine based) Docker images for Free Pascal Compiler.

Docker Hub:https://hub.docker.com/r/signumtemporis/fpc (https://hub.docker.com/r/signumtemporis/fpc)
Source Repository:https://gitlab.com/SignumTemporis/docker-fpc (https://gitlab.com/SignumTemporis/docker-fpc)
More info:README.md (https://gitlab.com/SignumTemporis/docker-fpc/-/blob/master/README.md)

Currently supported image variants:

Image sizes:
Target CPU/OSSize variantCompressed size
x86_64-linuxslim~29 MB
x86_64-linuxfull~78 MB
x86_64-win64slim~32 MB
x86_64-win64full~93 MB

Sample usage:
hello.pas
Code: Pascal  [Select][+][-]
  1. begin
  2.   writeln('Hello world!');
  3. end.
Code: Bash  [Select][+][-]
  1. docker run --rm -v $(pwd):/workspace signumtemporis/fpc:slim hello.pas

See README.md (https://gitlab.com/SignumTemporis/docker-fpc/-/blob/master/README.md) for more samples.

Comments are welcome.

Regards
Title: Re: Lightweight Docker images for Free Pascal Compiler
Post by: Thaddy on January 12, 2022, 11:47:16 am
Experimenting now. Nice. Great effort.
Title: Re: Lightweight Docker images for Free Pascal Compiler
Post by: Imants on January 17, 2022, 08:27:36 am
I usually include lazbuild (so I can compile Lazarus projects) with Lazarus source too in my docker builds and it goes more than 1 Gb in size :D
Title: Re: Lightweight Docker images for Free Pascal Compiler
Post by: Signum Temporis on February 01, 2022, 09:07:17 pm
I've added simple Bats (https://github.com/bats-core/bats-core)-based tests (https://gitlab.com/SignumTemporis/docker-fpc/-/tree/master/test) so that one can easily verify the images after building them on one's own.

Sample test output:
Code: Text  [Select][+][-]
  1.  ✓ [fpc-cross-win64-slim] reports version 3.2.2
  2.  ✓ [fpc-cross-win64-slim] builds x86-64 Windows executable
  3.  ✓ [fpc-cross-win64-slim] has tag signumtemporis/fpc:cross.x86_64-win64.slim
  4.  ✓ [fpc-cross-win64-slim] has tag signumtemporis/fpc:3.2.2-cross.x86_64-win64.slim
Title: Re: Lightweight Docker images for Free Pascal Compiler
Post by: Signum Temporis on February 16, 2022, 12:40:53 pm
As I can see, a couple of days ago Free Pascal lived to see its own official Docker images.  That's great!  At long last!
TinyPortal © 2005-2018