minimal docker to run fpc program lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Blestan · 2017-07-25 11:04 hi guys! does anyone have some experience and/or code to build minimal docker images to run fpc compiled program like go containers? ---------------------------------------------------------------------- Thaddy · 2017-07-25 13:13 I thoroughly do not understand what you mean... almost reported it as SPAM. ---------------------------------------------------------------------- tr_escape · 2017-07-25 13:16 Hello Blestan do you mean linux container? Like as: https://distrowatch.com/table.php?distribution=container ---------------------------------------------------------------------- Blestan · 2017-07-25 13:42 @thaddy: ooh please thaddy you know me i will never post a spam in the forum.. i need something like this https://blog.codeship.com/building-minimal-docker-containers-for-go- applications/ ---------------------------------------------------------------------- avra · 2017-07-25 13:49 Quote from: Thaddy on July 25, 2017, 03:13:31 pmI thoroughly do not understand what you mean... almost reported it as SPAM. He probably means this: https://www.docker.com/what-docker https://hub.docker.com/_/golang/ ---------------------------------------------------------------------- Blestan · 2017-07-25 13:55 @avra : i know what docker is i want minimal container like shown in the link to deploy fpc micro services in the cloud ---------------------------------------------------------------------- SymbolicFrank · 2017-07-25 13:56 It's like a Linux mini-VM that can run an FPC program. Which would be most of them, probably. Libc would have to be available. Or a mini-VM with FPC pre-installed. ---------------------------------------------------------------------- Blestan · 2017-07-25 14:00 yes is exacly that... minimal depeddencies ... not the fp compiler installed may be libc .... and the program it self "injected" in the image of the container... need some ideas/help on the toolchain to be used to buid the image ---------------------------------------------------------------------- Leledumbo · 2017-07-25 18:49 The same scratch container can be used, so the steps are the same too, even easier since fpc compiles statically already. Code: [Select]FROM scratch ADD yourcompiledprog / CMD ["/yourcompiledprog"] should be sufficient. Indeed it is: Code: [Select]$ sudo docker build -t hello -f hello.scratch . [sudo] password for leledumbo: Sending build context to Docker daemon  40.73MB Step 1/3 : FROM scratch  ---> Step 2/3 : ADD hello /  ---> 5479290cd757 Removing intermediate container e8000e26f899 Step 3/3 : CMD /hello  ---> Running in d862efdcf885  ---> e8004dc298a6 Removing intermediate container d862efdcf885 Successfully built e8004dc298a6 Successfully tagged hello:latest $ sudo docker run -it hello Hello, World ---------------------------------------------------------------------- Blestan · 2017-07-25 19:49 thank you very much ... after reading alot of doker and go code i came to the same conclusion and will try it asap ---------------------------------------------------------------------- avra · 2017-07-27 06:25 Quote from: Leledumbo on July 25, 2017, 08:49:11 pmThe same scratch container can be used, so the steps are the same too, even easier since fpc compiles statically already. Thank you for your effort