Files
eric a10b048968
build / Build Docker Image (push) Canceled after 0s
eom.dev customization
2026-10-24 18:49:03 -04:00

62 lines
1.5 KiB
Docker

FROM node:24-bookworm-slim AS node
FROM ubuntu:22.04 AS build
COPY --from=node /usr/local/bin/node /usr/local/bin/node
# install deps
RUN \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \
wget \
python3 \
git \
build-essential \
patch \
cmake \
tclsh \
zip \
zstd \
gettext
WORKDIR /luanti-wasm
COPY install_emsdk.sh apply_patches.sh emsdk*.patch ./
RUN ./install_emsdk.sh
# Keep completed dependencies cached independently of the Lua menu and website.
COPY common.sh fetch_sources.sh ./
COPY sources/ ./sources/
RUN ./fetch_sources.sh
COPY build_zstd.sh ./
RUN ./build_zstd.sh
COPY build_libarchive.sh ./
RUN ./build_libarchive.sh
COPY build_webshims.sh ./
RUN ./build_webshims.sh
COPY build_openssl.sh openssl.patch ./
RUN ./build_openssl.sh
COPY build_curl.sh ./
RUN ./build_curl.sh
COPY build_libzip.sh ./
RUN ./build_libzip.sh
COPY build_luanti.sh ./
COPY patches/pwdfield-background-v3.patch ./patches/
RUN ./build_luanti.sh
ARG LUANTI_SERVER_ADDRESS=luanti.eom.dev
ARG LUANTI_SERVER_PORT=30000
COPY build_fsroot.sh build_www.sh fetch_xterm.sh ./
COPY menu/ ./menu/
COPY static/ ./static/
RUN ./build_fsroot.sh && ./build_www.sh
# Compose uses this small runtime target; no compiler or source tree is served.
FROM nginx:stable-alpine AS web
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY --from=build /luanti-wasm/www /usr/share/nginx/html
USER nginx
EXPOSE 8080
ENTRYPOINT ["nginx", "-g", "daemon off;"]
# Preserve the original image's build artifacts and existing CI extraction flow.
FROM build AS artifacts