Conversation
|
Now there's directory for core libs but there's no Instead of that probably including some preinstalled core libs to keep it lightweight, |
|
Here's also
Instead of installing Mineunit from Luarocks it will build directly from source directory therefore including latest / local changes to Docker image. FROM alpine:latest as build
USER root
ENV USER=root
RUN apk add --no-cache build-base git lua-dev luarocks5.1 lua5.1-sec
RUN luarocks-5.1 install luasocket
RUN luarocks-5.1 install luacov
RUN luarocks-5.1 install busted 2.0.0-1
COPY . /build/mineunit
RUN cd /build/mineunit && luarocks-5.1 make
# Mineunit base
FROM alpine:latest
COPY --from=build /usr/local /usr/local
RUN adduser -D mineunit
RUN mkdir /usr/local/share/lua/5.1/mineunit/core
RUN chown mineunit /usr/local/share/lua/5.1/mineunit/core
RUN apk add --no-cache lua5.1
USER mineunit
WORKDIR /home/mineunit
#ENTRYPOINT ["mineunit"]
ENTRYPOINT ["sh", "-l"] |
|
Tested latest with GitHub actions using slightly modified image (includes git) here: https://github.com/S-S-X/mineunit-test This should allow simplest resolution for broken luarocks package manager which currently causes most GitHub Mineunit workflows actions to fail. DockerHub image is ssxx/mineunit:latest this will probably include git (which makes image a lot larger). |
|
Pushed latest to https://hub.docker.com/r/mineunit/mineunit with custom built luassert that includes mentioned patch, seems to work without issues. (see: mt-mods/mineunit-actions#12) For command line exec: For bash script: #!/bin/bash
cmd=("cd" "mod;" "mineunit" "${@}")
docker run --rm -it \
--mount 'type=bind,source=./,target=/home/mineunit/mod' \
--entrypoint /bin/sh mineunit/mineunit:latest \
-lc "${cmd[*]}" |
To build switch to directory where Dockerfile is and run docker build:
To run temporary container mounting your mods in read only mode to run tests
Adjust
$HOME/.minetest/modsas needed, this is host directory for mods.Possibly closes #71