1
Fork 0
ci-images/lua-clib/Dockerfile

78 lines
2.3 KiB
Docker

FROM debian:bullseye-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN set -e; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
curl \
gcc \
g++ \
libc-dev \
libreadline-dev \
make \
stow \
sudo \
unzip \
wget \
xz-utils; \
rm -rf /var/cache/apt/*
WORKDIR /build
RUN set -e; \
wget https://nodejs.org/dist/v16.17.0/node-v16.17.0-linux-x64.tar.xz; \
mkdir -p /usr/local/stow/node; \
tar -xJf node-v16.17.0-linux-x64.tar.xz -C /usr/local/stow/node --strip-components=1; \
stow -d /usr/local/stow -t /usr/local -S node; \
wget http://www.lua.org/ftp/lua-5.1.5.tar.gz; \
tar -xzf lua-5.1.5.tar.gz; \
cd lua-5.1.5/src; \
make -j $(nproc) all MYCFLAGS="-DLUA_USE_LINUX -fPIC" MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"; \
cd ..; \
make INSTALL_TOP=/usr/local/stow/lua5.1 install; \
cd /build; \
wget http://www.lua.org/ftp/lua-5.2.4.tar.gz; \
tar -xzf lua-5.2.4.tar.gz; \
cd lua-5.2.4/src; \
make -j $(nproc) linux MYCFLAGS="-fPIC"; \
cd ..; \
make INSTALL_TOP=/usr/local/stow/lua5.2 install; \
cd /build; \
wget http://www.lua.org/ftp/lua-5.3.6.tar.gz; \
tar -xzf lua-5.3.6.tar.gz; \
cd lua-5.3.6/src; \
make -j $(nproc) linux MYCFLAGS="-fPIC"; \
cd ..; \
make INSTALL_TOP=/usr/local/stow/lua5.3 install; \
cd /build; \
wget http://www.lua.org/ftp/lua-5.4.4.tar.gz; \
tar -xzf lua-5.4.4.tar.gz; \
cd lua-5.4.4/src; \
make -j $(nproc) linux MYCFLAGS="-fPIC"; \
cd ..; \
make INSTALL_TOP=/usr/local/stow/lua5.4 install; \
cd /build; \
wget https://luarocks.org/releases/luarocks-3.9.1.tar.gz; \
tar -xzf luarocks-3.9.1.tar.gz; \
cd luarocks-3.9.1; \
./configure --prefix=/usr --with-lua=/usr/local/stow/lua5.4; \
make -j $(nproc); \
make install; \
cd /build; \
wget https://github.com/sass/dart-sass/releases/download/1.54.4/dart-sass-1.54.4-linux-x64.tar.gz; \
tar -xzf dart-sass-1.54.4-linux-x64.tar.gz; \
mv dart-sass/sass /usr/bin/sass; \
cd /; \
rm -r /build
RUN set -e; \
luarocks install ldoc; \
luarocks install lua-discount
WORKDIR /
COPY pkgconfig/*.pc /usr/lib/pkgconfig/
COPY enable-lua disable-lua run-with-lua /usr/bin/