ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] curl missing from Docker image -> install-modules does not work
@ 2025-04-10 12:14 Marco Riggirello
  2025-04-10 20:49 ` [NTG-context] " Bruce Horrocks
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Riggirello @ 2025-04-10 12:14 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 5543 bytes --]

Hello,

installing modules into the docker image is not possible since the curl 
command is not part of the image. If I run

    $ docker run --rm --entrypoint "" contextgarden/context:lmtx /bin/sh
    -c "cd /context/tex/ && mtxrun --script install-module --install filter"

I get (see line 4)

mtx-install-modules | loading entries from file 
'/context/tex/texmf-context/tex/context/modules/third/mtx-install-imp-modules.lua'
mtx-install-modules | loading entries from file 
'/context/tex/texmf-context/tex/context/modules/third/mtx-install-imp-tikz.lua'
mtx-install-modules |
sh: 1: curl: not found
mtx-install-modules | unknown 
'https://modules.contextgarden.net/dl/t-filter.zip'
mtx-install-modules |
mtx-install-modules | renewing file database
mtx-install-modules |
system          | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/71c82419867f9a0df8a150196c03c86f.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/71c82419867f9a0df8a150196c03c86f.lud'
system          | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/71c82419867f9a0df8a150196c03c86f.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/71c82419867f9a0df8a150196c03c86f.lud' 
stripped
system          | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f406286dc3075cdfb044f836920f46a.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f406286dc3075cdfb044f836920f46a.lud'
system          | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f406286dc3075cdfb044f836920f46a.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f406286dc3075cdfb044f836920f46a.lud' 
stripped
system          | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/73630a261795d9c53610a28af4550cbc.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/73630a261795d9c53610a28af4550cbc.lud'
system          | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/73630a261795d9c53610a28af4550cbc.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/73630a261795d9c53610a28af4550cbc.lud' 
stripped
system          | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3952aa25b6a1b9f9f8d3eeb6e65f0039.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3952aa25b6a1b9f9f8d3eeb6e65f0039.lud'
system          | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3952aa25b6a1b9f9f8d3eeb6e65f0039.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3952aa25b6a1b9f9f8d3eeb6e65f0039.lud' 
stripped
system          | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/fb39a92c95ceca857c3f2d0ee48a2ad3.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/fb39a92c95ceca857c3f2d0ee48a2ad3.lud'
system          | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/fb39a92c95ceca857c3f2d0ee48a2ad3.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/fb39a92c95ceca857c3f2d0ee48a2ad3.lud' 
stripped
system          | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f6978edf9feb817ad6c1f21fc262031.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f6978edf9feb817ad6c1f21fc262031.lud'
system          | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f6978edf9feb817ad6c1f21fc262031.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/3f6978edf9feb817ad6c1f21fc262031.lud' 
stripped
system          | lua | compiling 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud'
system          | lua | dumping 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' 
into 
'/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' 
stripped
mtx-install-modules |
mtx-install-modules | installed: filter
mtx-install-modules |

This affects also installations outside docker if the user has a system 
without curl the mtxrun script end without throwing a very evident error.

I hope it helps. Thanks to all the contributors for the their work.

Best regards

MR

[-- Attachment #1.2: Type: text/html, Size: 6446 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: curl missing from Docker image -> install-modules does not work
  2025-04-10 12:14 [NTG-context] curl missing from Docker image -> install-modules does not work Marco Riggirello
@ 2025-04-10 20:49 ` Bruce Horrocks
  2025-04-29  8:30   ` Marco Riggirello
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Horrocks @ 2025-04-10 20:49 UTC (permalink / raw)
  To: ntg-context mailing list; +Cc: Marco Riggirello


> On 10 Apr 2025, at 13:14, Marco Riggirello <marco.riggirello.98@gmail.com> wrote:
> 
> installing modules into the docker image is not possible since the curl command is not part of the image. If I run
> $ docker run --rm --entrypoint "" contextgarden/context:lmtx /bin/sh -c "cd /context/tex/ && mtxrun --script install-module --install filter"

Hi Marco,

I don't know who produces the contextgarden/context:lmtx build (presumably it's now part of the build farm?) but according to <https://hub.docker.com/r/contextgarden/context> it is supposed to have all modules already installed.

However, running 

 $ docker run --rm --entrypoint "" contextgarden/context:lmtx /bin/sh -c "cd /context/tex && mtxrun --script install-modules --installed"

suggests that there aren't any installed. So maybe Hans could prod whoever supports the build farm to look into it?

In the meantime, if you build your own container image using the Dockerfile on the Wiki <https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_into_a_Docker_container> it is easy to include 'curl' - just add it after 'unzip' - however that doesn't seem to fix your problem since:

$ docker build -t context .
$ docker run --rm --entrypoint "" context /bin/sh -c "cd /opt/context/tex/ && mtxrun --script install-module --install filter"

appears to do something and there is no obvious error message in the visible output, but

$ docker run --rm --entrypoint "" context /bin/sh -c "cd /opt/context/tex && mtxrun --script install-modules --installed"

shows that the filter module still wasn't installed.

Sorry I can't help you any further right now - I'm not familiar enough with the install script to be able to quickly zero in on the problem

Regards,


—
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: curl missing from Docker image -> install-modules does not work
  2025-04-10 20:49 ` [NTG-context] " Bruce Horrocks
@ 2025-04-29  8:30   ` Marco Riggirello
  2025-05-08  2:16     ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Riggirello @ 2025-04-29  8:30 UTC (permalink / raw)
  To: Bruce Horrocks, ntg-context mailing list

Hi Bruce,

thanks for your suggestions. Since I wanted to play with a solution 
similar to the one posted by Adityam on his blog

https://adityam.github.io/context-blog/post/markdown-with-gpp/

I ended up with a custom Docker image to have gpp, pandoc and context in 
the same environment. Here's the Dockerfile, if one wants to try it out 
(or to improve it!)

> FROM pandoc/core:latest
>
> # Build GPP
> ARG GPP_VERSION=2.28
> WORKDIR /build
>
> RUN apk -U upgrade && \
>     apk add build-base wget && \
>     wget -q 
> https://github.com/logological/gpp/releases/download/${GPP_VERSION}/gpp-${GPP_VERSION}.tar.bz2 
> && \
>     tar -xvjf gpp-${GPP_VERSION}.tar.bz2 && \
>     cd gpp-${GPP_VERSION} && \
>     ./configure && \
>     make && \
>     make install
>
>
> # Install ConTeXt LMTX
> WORKDIR /opt
>
> ENV PATH=/opt/context/tex/texmf-linuxmusl-64/bin:opt/context/bin:$PATH
>
> RUN apk add unzip curl libc6-compat ca-certificates rsync && \
>     wget -q 
> https://lmtx.pragma-ade.com/install-lmtx/context-linux-64.zip && \
>     unzip context-linux-64.zip -d context && \
>     cd context && \
>     chmod 755 install.sh && \
>     ./install.sh && \
>     cd tex && \
>     mtxrun --script install-modules --install filter && \
>     context --generate
>
> ENTRYPOINT ["/opt/context/tex/texmf-linuxmusl-64/bin/context"]
>
> WORKDIR /data
>
> # Quick test
> RUN gpp --version && \
>     pandoc --version && \
>     context --version
>
> # Last cleanup
> RUN apk del unzip curl wget build-base libc6-compat ca-certificates rsync
>
In the spirit of the context world, I think a good name for this image 
could be context-gppd ;)

Best regards,

MR

On 4/10/25 22:49, Bruce Horrocks wrote:
>> On 10 Apr 2025, at 13:14, Marco Riggirello <marco.riggirello.98@gmail.com> wrote:
>>
>> installing modules into the docker image is not possible since the curl command is not part of the image. If I run
>> $ docker run --rm --entrypoint "" contextgarden/context:lmtx /bin/sh -c "cd /context/tex/ && mtxrun --script install-module --install filter"
> Hi Marco,
>
> I don't know who produces the contextgarden/context:lmtx build (presumably it's now part of the build farm?) but according to <https://hub.docker.com/r/contextgarden/context> it is supposed to have all modules already installed.
>
> However, running
>
>   $ docker run --rm --entrypoint "" contextgarden/context:lmtx /bin/sh -c "cd /context/tex && mtxrun --script install-modules --installed"
>
> suggests that there aren't any installed. So maybe Hans could prod whoever supports the build farm to look into it?
>
> In the meantime, if you build your own container image using the Dockerfile on the Wiki <https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_into_a_Docker_container> it is easy to include 'curl' - just add it after 'unzip' - however that doesn't seem to fix your problem since:
>
> $ docker build -t context .
> $ docker run --rm --entrypoint "" context /bin/sh -c "cd /opt/context/tex/ && mtxrun --script install-module --install filter"
>
> appears to do something and there is no obvious error message in the visible output, but
>
> $ docker run --rm --entrypoint "" context /bin/sh -c "cd /opt/context/tex && mtxrun --script install-modules --installed"
>
> shows that the filter module still wasn't installed.
>
> Sorry I can't help you any further right now - I'm not familiar enough with the install script to be able to quickly zero in on the problem
>
> Regards,
>
>
> —
> Bruce Horrocks
> Hampshire, UK
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: curl missing from Docker image -> install-modules does not work
  2025-04-29  8:30   ` Marco Riggirello
@ 2025-05-08  2:16     ` Aditya Mahajan
  0 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2025-05-08  2:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2008 bytes --]

On Tue, 29 Apr 2025, Marco Riggirello wrote:

> Hi Bruce,
> 
> thanks for your suggestions. Since I wanted to play with a solution similar
> to the one posted by Adityam on his blog
> 
> https://adityam.github.io/context-blog/post/markdown-with-gpp/
> 
> I ended up with a custom Docker image to have gpp, pandoc and context in the
> same environment. Here's the Dockerfile, if one wants to try it out (or to
> improve it!)
> 
> > FROM pandoc/core:latest
> >
> > # Build GPP
> > ARG GPP_VERSION=2.28
> > WORKDIR /build
> >
> > RUN apk -U upgrade && \
> >     apk add build-base wget && \
> >     wget -q
> > https://github.com/logological/gpp/releases/download/${GPP_VERSION}/gpp-${GPP_VERSION}.tar.bz2
> > && \
> >     tar -xvjf gpp-${GPP_VERSION}.tar.bz2 && \
> >     cd gpp-${GPP_VERSION} && \
> >     ./configure && \
> >     make && \
> >     make install
> >
> >
> > # Install ConTeXt LMTX
> > WORKDIR /opt
> >
> > ENV PATH=/opt/context/tex/texmf-linuxmusl-64/bin:opt/context/bin:$PATH
> >
> > RUN apk add unzip curl libc6-compat ca-certificates rsync && \
> >     wget -q https://lmtx.pragma-ade.com/install-lmtx/context-linux-64.zip
> > && \
> >     unzip context-linux-64.zip -d context && \
> >     cd context && \
> >     chmod 755 install.sh && \
> >     ./install.sh && \
> >     cd tex && \
> >     mtxrun --script install-modules --install filter && \
> >     context --generate
> >
> > ENTRYPOINT ["/opt/context/tex/texmf-linuxmusl-64/bin/context"]
> >
> > WORKDIR /data
> >
> > # Quick test
> > RUN gpp --version && \
> >     pandoc --version && \
> >     context --version
> >
> > # Last cleanup
> > RUN apk del unzip curl wget build-base libc6-compat ca-certificates rsync
> >
> In the spirit of the context world, I think a good name for this image could
> be context-gppd ;)

If it is okay with you, I can add this to the blog post (and credit that it is from you)

Aditya

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-08  2:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-10 12:14 [NTG-context] curl missing from Docker image -> install-modules does not work Marco Riggirello
2025-04-10 20:49 ` [NTG-context] " Bruce Horrocks
2025-04-29  8:30   ` Marco Riggirello
2025-05-08  2:16     ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).