Recent

Author Topic: Lightweight Docker images for Free Pascal Compiler  (Read 3135 times)

Signum Temporis

  • New member
  • *
  • Posts: 5
Lightweight Docker images for Free Pascal Compiler
« 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
Source Repository:https://gitlab.com/SignumTemporis/docker-fpc
More 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 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 for more samples.

Comments are welcome.

Regards
« Last Edit: January 12, 2022, 10:10:23 am by Signum Temporis »

Thaddy

  • Hero Member
  • *****
  • Posts: 11537
Re: Lightweight Docker images for Free Pascal Compiler
« Reply #1 on: January 12, 2022, 11:47:16 am »
Experimenting now. Nice. Great effort.
Путин преступник. Россияне дезинформированы.

Imants

  • Full Member
  • ***
  • Posts: 196
Re: Lightweight Docker images for Free Pascal Compiler
« Reply #2 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

Signum Temporis

  • New member
  • *
  • Posts: 5
Re: Lightweight Docker images for Free Pascal Compiler
« Reply #3 on: February 01, 2022, 09:07:17 pm »
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  [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
« Last Edit: February 02, 2022, 08:50:03 am by Signum Temporis »

Signum Temporis

  • New member
  • *
  • Posts: 5
Re: Lightweight Docker images for Free Pascal Compiler
« Reply #4 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