Forum > Third party

Lightweight Docker images for Free Pascal Compiler

(1/1)

Signum Temporis:
Hi,

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

Docker Hub:https://hub.docker.com/r/signumtemporis/fpcSource Repository:https://gitlab.com/SignumTemporis/docker-fpcMore info:README.md
Currently supported image variants:

* By target CPU / OS
* x86_64-linux
* x86_64-win64 (cross compile)
* By size
* full -- images containing all units
* slim -- images containing basic units only (see README.md for details)
Image sizes:
Target CPU/OSSize variantCompressed sizex86_64-linuxslim~29 MBx86_64-linuxfull~78 MBx86_64-win64slim~32 MBx86_64-win64full~93 MB
Sample usage:
hello.pas
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---begin  writeln('Hello world!');end.
--- Code: Bash  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---docker run --rm -v $(pwd):/workspace signumtemporis/fpc:slim hello.pas
See README.md for more samples.

Comments are welcome.

Regards

Thaddy:
Experimenting now. Nice. Great effort.

Imants:
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

Signum Temporis:
I've added simple Bats-based tests so that one can easily verify the images after building them on one's own.

Sample test output:

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- ✓ [fpc-cross-win64-slim] reports version 3.2.2 ✓ [fpc-cross-win64-slim] builds x86-64 Windows executable ✓ [fpc-cross-win64-slim] has tag signumtemporis/fpc:cross.x86_64-win64.slim ✓ [fpc-cross-win64-slim] has tag signumtemporis/fpc:3.2.2-cross.x86_64-win64.slim

Signum Temporis:
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!

Navigation

[0] Message Index

Go to full version