I'm trying to create a very simple docker image, it must have lua, luarocks, and a few other executables pre-installed on it, dockerfile below:
FROM busybox AS builder
WORKDIR /usr/local/bin
# installs curl (reliable alternative to wget)
RUN wget -O curl https://github.com/moparisthebest/static-curl/releases/download/v7.79.1/curl-amd64 && \
chmod +x curl
# installs luaformatter
RUN wget -O lua-format https://github.com/Koihik/vscode-lua-format/raw/master/bin/linux/lua-format && \
chmod +x lua-format
# installs stylua
RUN wget -O stylua-0.11.0-linux.zip https://github.com/JohnnyMorganz/StyLua/releases/download/v0.11.0/stylua-0.11.0-linux.zip && \
unzip stylua-0.11.0-linux.zip && \
rm stylua-0.11.0-linux.zip && \
chmod +x stylua
# installs selene
RUN wget -O selene-light-0.14.0-linux.zip https://github.com/Kampfkarren/selene/releases/download/0.14.0/selene-light-0.14.0-linux.zip && \
unzip selene-light-0.14.0-linux.zip && \
rm selene-light-0.14.0-linux.zip && \
chmod +x selene
# installs lua (standalone binary)
RUN curl -k -o lua-5.4.2_Linux54_64_bin.tar.gz -L https://sourceforge.net/projects/luabinaries/files/5.4.2/Tools%20Executables/lua-5.4.2_Linux54_64_bin.tar.gz && \
tar xvf lua-5.4.2_Linux54_64_bin.tar.gz && \
mv lua54 lua && \
rm -rf lua-5.4.2_Linux54_64_bin.tar.gz luac54
# installs luarocks (standalone binary)
RUN wget -O luarocks-3.7.0-linux-x86_64.zip https://luarocks.github.io/luarocks/releases/luarocks-3.7.0-linux-x86_64.zip && \
unzip luarocks-3.7.0-linux-x86_64.zip && \
mv luarocks-3.7.0-linux-x86_64/luarocks . && \
rm -rf luarocks-3.7.0-linux-x86_64*
FROM busybox
COPY --from=builder /usr/local/bin /usr/local/bin
WORKDIR /ataraxis
RUN luarocks install luacheck
CMD stylua lua/ataraxis && \
lua-format -i lua/ataraxis/*.lua && \
luacheck --config .luacheckrc lua/ataraxis/*.lua && \
selene lua/ataraxis
I tried using both Alpine and Busybox as base images for my Dockerfile, but had no success on running those executables, even though they are located on a directory that is included on $PATH by default (/usr/local/bin), whenever i try to run any of them, the following error is displayed:
$ lua
/bin/sh: lua: not found
I already searched and tried every single possible solution that i could think of, but still no luck