FROM emscripten/emsdk:3.1.51 as build # Used to invalidate layer cache but not mount cache # See https://github.com/moby/moby/issues/41715#issuecomment-733976493 ARG UNIQUEKEY 1 RUN apt update RUN apt install -y git ccache autoconf automake libtool cmake pkg-config ninja-build RUN <> /emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake EOF ENV VCPKG_DEFAULT_BINARY_CACHE /cache/vcpkg RUN --mount=type=cache,target=/cache < imhex.wasm.size FROM scratch as raw COPY --from=build [ \ # ImHex \ "/build/imhex.wasm", \ "/build/imhex.wasm.size", \ "/build/imhex.js", \ "/build/imhex.worker.js", \ \ # Static files \ "/build/index.html", \ "/build/style.css", \ "/build/wasm-config.js", \ "/build/enable-threads.js", \ "/build/favicon.ico", \ "/build/icon.png", \ "/build/manifest.json", \ "/build/robots.txt", \ "/build/sitemap.xml", \ \ # Destination \ "./" \ ] FROM nginx COPY --from=raw . /usr/share/nginx/html