feat: Add images for Lua library testing
This commit is contained in:
parent
13e35a001f
commit
389804bc73
7 changed files with 118 additions and 0 deletions
10
Justfile
Normal file
10
Justfile
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
build image:
|
||||||
|
docker build -t {{image}} {{image}}
|
||||||
|
docker tag {{image}} {{image}}:dev
|
||||||
|
|
||||||
|
tag image version:
|
||||||
|
docker tag {{image}} {{image}}:{{version}}
|
||||||
|
|
||||||
|
push host image version:
|
||||||
|
docker tag {{image}}:{{version}} {{host}}/{{image}}:{{version}}
|
||||||
|
docker push {{host}}/{{image}}:{{version}}
|
9
lua-clib-pulse/Dockerfile
Normal file
9
lua-clib-pulse/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
FROM lua-clib
|
||||||
|
|
||||||
|
RUN set -e; \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
gobject-introspection \
|
||||||
|
libgirepository1.0-dev \
|
||||||
|
libpulse-dev; \
|
||||||
|
rm -rf /var/cache/apt/*
|
10
lua-clib-x11/Dockerfile
Normal file
10
lua-clib-x11/Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
FROM lua-clib
|
||||||
|
|
||||||
|
RUN set -e; \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
libx11-dev \
|
||||||
|
libx11-xcb-dev\
|
||||||
|
xauth \
|
||||||
|
xvfb; \
|
||||||
|
rm -rf /var/cache/apt/*
|
69
lua-clib/Dockerfile
Normal file
69
lua-clib/Dockerfile
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN set -e; \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
|
cmake \
|
||||||
|
gcc \
|
||||||
|
g++ \
|
||||||
|
libc-dev \
|
||||||
|
libreadline-dev \
|
||||||
|
nodejs \
|
||||||
|
npm \
|
||||||
|
make \
|
||||||
|
stow \
|
||||||
|
sudo \
|
||||||
|
unzip \
|
||||||
|
wget; \
|
||||||
|
rm -rf /var/cache/apt/*
|
||||||
|
|
||||||
|
WORKDIR /build
|
||||||
|
|
||||||
|
RUN set -e; \
|
||||||
|
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
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
COPY enable-lua disable-lua run-with-lua /usr/bin/
|
2
lua-clib/disable-lua
Executable file
2
lua-clib/disable-lua
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
stow -d /usr/local/stow -t /usr -D "lua$1"
|
5
lua-clib/enable-lua
Executable file
5
lua-clib/enable-lua
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/sh
|
||||||
|
stow -d /usr/local/stow -t /usr -S "lua$1"
|
||||||
|
# Sometimes, most often with 5.4, a build fails to install rocks claiming that this
|
||||||
|
# directory was missing/couldn't be created. Simply create it to avoid the error.
|
||||||
|
mkdir -p /usr/lib/luarocks/rock-$1
|
13
lua-clib/run-with-lua
Executable file
13
lua-clib/run-with-lua
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
LUA_VERSION="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
sudo enable-lua "$LUA_VERSION"
|
||||||
|
|
||||||
|
"$@"
|
||||||
|
ret=$!
|
||||||
|
|
||||||
|
sudo disable-lua "$LUA_VERSION"
|
||||||
|
|
||||||
|
exit $ret
|
Loading…
Add table
Reference in a new issue