Skip to content

Instantly share code, notes, and snippets.

@AFCMS
Last active April 25, 2024 12:58
Show Gist options
  • Save AFCMS/41d708620d066be37368119b9e7d3f45 to your computer and use it in GitHub Desktop.
Save AFCMS/41d708620d066be37368119b9e7d3f45 to your computer and use it in GitHub Desktop.
LuaJIT Docker Image (Alpine Clang Musl)
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM alpine:3.19 AS dev
COPY --from=xx / /
WORKDIR /usr/src/LuaJIT
RUN apk add --no-cache \
build-base \
clang \
git \
make
RUN xx-apk add --no-cache \
musl-dev
COPY . .
RUN make CC="xx-clang" HOST_CC="xx-clang" amalg
RUN make install
RUN ls /usr/local/lib && xx-verify /usr/local/lib/libluajit*.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment