Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #135296

Re: GForth in Docker.

From Nick P <nick.268@gmail.com>
Newsgroups comp.lang.forth
Subject Re: GForth in Docker.
Date 2026-08-04 23:20 +0100
Organization A noiseless patient Spider
Message-ID <0b4d65eb-5cb9-4b9d-9a54-df5f0a99b458@gmail.com> (permalink)
References <114tl3v$2fsah$1@dont-email.me> <ndf54bF762U1@mid.individual.net>

Show all headers | View raw


On 04/08/2026 22:50, jkn wrote:
> On 04/08/2026 22:21, Nick P wrote:
>> Hi all, Im new here.
>>
>> Having checked out the GForth.org webpage I have gone with the "use 
>> docker" option (on Ubuntu 22.04). As a result I'm having difficulty 
>> getting .fs files I have on one of my hard drives to run in it.
>>
>> I can get the docker image running, and use the command line without a 
>> problem, what I cant do is run a file that is in some arbitary 
>> directory on a disk.
>>
>> I strongly suspect its a docker issue rather than a Gforth issue as 
>> the Gforth site and documentation does not cover this so far as I can 
>> tell.
>>
>> Does anyone have a suggestion of a source of information, jargon lite 
>> hopefully, that will get me started using source files with GForth in 
>> a docker container?
> 
> What do you mean by 'can't run...'? What did you try, and what happened?
> 
> I would expect that your 'docker run' command should include parameters
> to map directory/ies on your host machine, to those in the running
> docker container. Then, the GForth running in the latter will be able to
> see your existing Forth files.
> 
> Does that help any?
> 
>      J^n
> 

Yes it does somewhat.

I initially tried:

$sudo docker run -it --rm forthy42/gforth filename.fs

in a terminal in the forth files folder, this was more in hope than 
expectation to be honest. It didn't work I got a number of directory not 
found errors, I forget exactly which.

Following your suggestion I did a bit of Duck Duck AI on the issue.

It came up with the suggestion of opening a terminal in the files 
directory and running the multiline:

  sudo docker run -it \
   -v "$PWD":/usr/src/myapp \
   -w /usr/src/myapp \
   forthy42/gforth gforth fac1.fs -e bye

which didn't give me any errors but closed Forth immediately. Losing the 
'-e bye' from the end kept it open, and I was able to use the colon 
definitions in the fac1.fs file at the command line.

So I seem to be able to run an arbitrary file now, but having pre-read 
through "Starting Forth" and "Forth Programmers Handbook" before setting 
out on learning Forth properly, it's clear that may not suffice.

So am I correct in thinking it's a Docker issue and I should try to 
understand that?

N.

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

GForth in Docker. Nick P <nick.268@gmail.com> - 2026-08-04 22:21 +0100
  Re: GForth in Docker. jkn <jkn+nin@nicorp.co.uk> - 2026-08-04 22:50 +0100
    Re: GForth in Docker. Nick P <nick.268@gmail.com> - 2026-08-04 23:20 +0100
      Re: GForth in Docker. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-05 06:35 +0000
        Re: GForth in Docker. Kragen Javier Sitaker <kragen@canonical.org> - 2026-09-02 14:26 -0300
  Re: GForth in Docker. albert@spenarnc.xs4all.nl - 2026-08-05 10:19 +0200
    Re: GForth in Docker. Colin Tree <treecolin@gmail.com> - 2026-08-06 08:47 +1000
      Re: GForth in Docker. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-08-06 05:08 +0000
        Re: GForth in Docker. albert@spenarnc.xs4all.nl - 2026-08-22 16:01 +0200

csiph-web