https://github.com/megahertz/fpc-trunk
Free Pascal Compiler built from trunk repository
https://github.com/megahertz/fpc-trunk
Last synced: about 1 year ago
JSON representation
Free Pascal Compiler built from trunk repository
- Host: GitHub
- URL: https://github.com/megahertz/fpc-trunk
- Owner: megahertz
- License: mit
- Created: 2018-07-18T19:17:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-03T17:52:36.000Z (over 6 years ago)
- Last Synced: 2025-03-16T19:55:24.929Z (about 1 year ago)
- Language: Shell
- Homepage: https://hub.docker.com/r/megahertz/fpc-trunk/
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fpc-trunk
[](https://microbadger.com/images/megahertz/fpc-trunk "Get your own image badge on microbadger.com")

Free Pascal Compiler built weekly from trunk repository using
[alpine linux image](https://hub.docker.com/_/alpine/).
This image is built from trunk repository which contains all fixes and
improvements since the last official release, so please try it if
you have any problems. Of course, it may also contain new bugs.
If you need the latest stable FPC image instead of dev build, try the
[frolvlad's image](https://hub.docker.com/r/frolvlad/alpine-fpc/).
## Usage
1. Create a program, for example:
```pascal
{ app.pas }
program app;
begin
WriteLn('Hi from docker');
end.
```
2. Create a Dockerfile
```dockerfile
# Dockerfile
FROM megahertz/fpc-trunk:3.1.1-39472
COPY app.pas /src/my-program/app.pas
RUN fpc /src/my-program/app.pas
CMD /src/my-program/app
```
3. Build the image and run
```bash
docker build . -t app
docker run app
```
### Troubleshooting
#### My app can't be run on another alpine image
In most cases, the app can't find ld-linux-x86-64.so.2. There are two
ways to fix that:
- Add to your Dockerfile for the target image:
```dockerfile
RUN ln -s /lib /lib64 && \
ln -s /lib/ld-musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2
```
- Compile your app with the following FPC flag:
`-FL/lib/libc.musl-x86_64.so.1`