FROM emscripten/emsdk:latest 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 # Install vcpkg # Note: we are using my fork of the repository with a libmagic patch RUN git clone https://github.com/iTrooz/vcpkg --branch libmagic /vcpkg RUN /vcpkg/bootstrap-vcpkg.sh # Patch vcpkg build instructions to add -pthread RUN <> /emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake EOF # Install dependencies with vcpkg RUN /vcpkg/vcpkg install --triplet=wasm32-emscripten libmagic RUN /vcpkg/vcpkg install --triplet=wasm32-emscripten freetype RUN /vcpkg/vcpkg install --triplet=wasm32-emscripten josuttis-jthread RUN /vcpkg/vcpkg install --triplet=wasm32-emscripten mbedtls # Build ImHex ARG JOBS=4 ENV CCACHE_DIR /cache/ccache RUN mkdir /build WORKDIR /build RUN --mount=type=cache,target=/cache \ --mount=type=bind,source=.,target=/imhex <