curl missing from Docker image -> install-modules does not work

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

On 10 Apr 2025, at 13:14, Marco Riggirello
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_contain... 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

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
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_contain... 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

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
participants (3)
-
Aditya Mahajan
-
Bruce Horrocks
-
Marco Riggirello