From 69af6b48fbb910831c54b840796cdcde71a6d2d2 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Wed, 28 May 2025 18:40:45 -0700 Subject: [PATCH] Use ARGs to reduce line lengths in Dockerfile --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index c4905b8..2976516 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,16 @@ FROM openresty/openresty:1.27.1.2-0-bookworm-buildpack WORKDIR /opt/app +ARG version=3.7.0.1 +ARG pkgname=pandoc-$version-1-amd64.deb +ARG pkgurl=https://github.com/jgm/pandoc/releases/download/$version/$pkgname + RUN apt-get update && apt-get install -y \ python3-pygments lua-inotify wget && \ - wget -q -O pandoc-3.7.0.1-1-amd64.deb https://github.com/jgm/pandoc/releases/download/3.7.0.1/pandoc-3.7.0.1-1-amd64.deb && \ - dpkg -i pandoc-3.7.0.1-1-amd64.deb && \ - rm pandoc-3.7.0.1-1-amd64.deb + wget -q -O $pkgname $pkgurl && dpkg -i $pkgname && rm $pkgname RUN luarocks install sitegen +RUN luarocks install busted RUN luarocks install inotify INOTIFY_INCDIR=/usr/include/x86_64-linux-gnu/ CMD ["sh", "-c", "openresty -p `pwd` -g 'daemon off;'"] -# CMD ["openresty", "-p", "/opt/app", "-g", "daemon off;"]