Last active
November 14, 2022 22:16
-
-
Save creationix/90e74a284ebca13a6c4fdc71159b7f85 to your computer and use it in GitHub Desktop.
Build luvit from source using alpine docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine AS build-luv | |
RUN apk add build-base cmake git | |
RUN git clone --recursive https://github.com/luvit/luvi.git | |
RUN make -C luvi/deps/luv | |
FROM alpine AS build-luvi | |
RUN apk add build-base cmake git | |
RUN git clone --recursive https://github.com/luvit/luvi.git | |
RUN apk add perl linux-headers | |
RUN make -C luvi regular-asm | |
RUN make -C luvi | |
FROM alpine AS build-lit | |
RUN apk add build-base cmake git | |
COPY --from=build-luvi /luvi/build/luvi /usr/bin/luvi | |
RUN echo "#!/usr/bin/luvi --" > prefix | |
RUN git clone --recursive https://github.com/luvit/lit.git | |
RUN /usr/bin/luvi lit -- make lit /usr/bin/lit prefix | |
FROM alpine AS build-luvit | |
RUN apk add build-base cmake git | |
COPY --from=build-luvi /luvi/build/luvi /usr/bin/luvi | |
RUN echo "#!/usr/bin/luvi --" > prefix | |
COPY --from=build-lit /usr/bin/lit /usr/bin/lit | |
RUN git clone --recursive https://github.com/luvit/luvit.git | |
RUN /usr/bin/lit make luvit /usr/bin/luvit prefix | |
FROM alpine | |
RUN apk add luajit | |
COPY --from=build-luv /luvi/deps/luv/build/luv.so /usr/lib/lua/5.1/luv.so | |
COPY --from=build-luvit /usr/bin/luvi /usr/bin/luvi | |
COPY --from=build-luvit /usr/bin/lit /usr/bin/lit | |
COPY --from=build-luvit /usr/bin/luvit /usr/bin/luvit | |
CMD ["/usr/bin/luvit"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment