Article View: comp.lang.forth
Article #209Docker and Gforth (wasd: [ANN] Gforth 1.0.1 released)
From: Anton Ertl
Date: Mon, 02 Nov 2026 08:33
Date: Mon, 02 Nov 2026 08:33
59 lines
3674 bytes
3674 bytes
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
>In particular, gforth-1.0.0 for AMD64 and ARM64 already exists on
>Docker, and you can run it with
>
>docker run -it --rm forthy42/gforth gforth
>
>(or use gforth-fast or gforth-itc instead of the last "gforth").
>
>However, currently there is only the tag "latest" for gforth images on
>hub.docker.com, so when Bernd Paysan (forthy42) puts the next snapshot
>on hub.docker.com, you will get an upgrade to that. I hope he will
>add a tag for 1.0 or 1.0.1, and then the command above should look
>like
>
>docker run -it --rm forthy42/gforth:1.0 gforth
Bernd Paysan has now built docker images with tags 1.0.0 and 1.0.1, so
you can start, e.g., gforth-fast 1.0.1 with
docker run -it --rm forthy42/gforth:1.0.1 gforth-fast
One other aspect of Docker is: by default it does not allow the gforth
engine running in the container to access files outside the container.
I played around a little with the options --volume (-v), --mount, and
--user (-u), but could not get the gforth in the container to write
outside the container.
But at least I managed to get it to read files that everyone is
allowed to read:
docker run -v /nfs/nfstmp:/nfs/nfstmp -it --rm forthy42/gforth:1.0.1 \
gforth-fast /nfs/nfstmp/anton/gforth-amd64/onebench.fs
I happen to have a file at /nfs/nfstmp/anton/gforth-amd64/onebench.fs,
so the -v option mounted /nfs/nfstmp outside the container at
/nfs/nfstmp inside the container, and then gforth-fast could access
it. The following also works:
docker run -v /nfs/nfstmp:/mymount -it --rm forthy42/gforth:1.0.1 \
gforth-fast /mymount/anton/gforth-amd64/onebench.fs
and makes it clearer which directory is which: /nfs/nfstmp is the
directory outside the container, /mymount is the mount point inside
the container, and the gforth-fast inside the container them accesses
the file through that mount point.
The Gforth shorthands for your home directory (~) and the home
directories of other users (~<user>), or the working directory (~+) do
not work as intended when using gforth running in docker. Any shell
expansions that happen before docker passes the string to Gforth
inside the container are unaffected by this, though.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2026 CFP: http://www.euroforth.org/ef26/cfp.html
Technical Details
Message-ID:
<2026Nov2.093323@mips.complang.tuwien.ac.at>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<2026Nov1.110124@mips.complang.tuwien.ac.at>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: anton@mips.complang.tuwien.ac.at (Anton Ertl) Newsgroups: comp.lang.forth Subject: Docker and Gforth (wasd: [ANN] Gforth 1.0.1 released) Date: Mon, 02 Nov 2026 08:33:23 GMT Organization: Institut fuer Computersprachen, Technische Universitaet Wien Lines: 59 Message-ID: <2026Nov2.093323@mips.complang.tuwien.ac.at> References: <2026Nov1.110124@mips.complang.tuwien.ac.at> Injection-Date: Mon, 02 Nov 2026 10:18:22 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2904933"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XjGbjDgLRdkBgCNDIpBDX"; posting-host="e1a3a7e2decf1e89e183bf3e02cd337a" Cancel-Lock: sha1:qovYB10m7mMF0QfSmGSaWaJL9VM= sha256:NJBy/2kEr/RHIVAd6rBbpmsdR1wwon8BCCAxyb/KmWw= sha1:GYt9Ssfum8TzJ5WHofGSpVeTxwo= sha256:epbDo5yxZIv02dxexeW7R0EKKTLimzXSz/7OGO6EBlA= X-newsreader: xrn 10.11