Skip to content

Commit

Permalink
Wasm-wc: Dockerfile changed to pull sources from the right repository
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Stark <[email protected]>
[ Updated for module name 'wasm-wasi-component' - Andrew ]
Signed-off-by: Andrew Clayton <[email protected]>
  • Loading branch information
Timo Stark authored and ac000 committed Feb 9, 2024
1 parent 2619c91 commit df7a530
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM debian:bullseye-slim

LABEL org.opencontainers.image.title="Unit (wasm)"
LABEL org.opencontainers.image.description="Official build of Unit for Docker."
LABEL org.opencontainers.image.title="Unit Preview (wasm-wasi-component)"
LABEL org.opencontainers.image.description="Official preview build of Unit for Docker."
LABEL org.opencontainers.image.url="https://unit.nginx.org"
LABEL org.opencontainers.image.source="https://github.com/nginx/unit"
LABEL org.opencontainers.image.documentation="https://unit.nginx.org/installation/#docker-images"
Expand All @@ -15,7 +15,7 @@ RUN set -ex \
&& mkdir -p /usr/lib/unit/modules /usr/lib/unit/debug-modules \
&& mkdir -p /usr/src/unit \
&& cd /usr/src/unit \
&& git clone https://github.com/alexcrichton/unit --branch wasmtime \
&& git clone https://github.com/ac000/unit --branch wasm-cm \
&& cd unit \
&& NCPU="$(getconf _NPROCESSORS_ONLN)" \
&& DEB_HOST_MULTIARCH="$(dpkg-architecture -q DEB_HOST_MULTIARCH)" \
Expand Down Expand Up @@ -66,9 +66,9 @@ RUN set -ex \
&& rustc --version \
&& ./configure $CONFIGURE_ARGS_MODULES --cc-opt="$CC_OPT" --modulesdir=/usr/lib/unit/modules \
&& make build/src/nxt_unit.o \
&& cargo build --release --manifest-path wasmtime/Cargo.toml \
&& install -pm755 wasmtime/target/release/libnxt_wasmtime.so /usr/lib/unit/modules/wasmtime.unit.so \
&& rm -rf wasmtime/target \
&& cargo build --release --manifest-path src/wasm-wasi-component/Cargo.toml \
&& install -pm755 src/wasm-wasi-component/target/release/libnxt_wasmtime.so /usr/lib/unit/modules/wasm_wasi_component.unit.so \
&& rm -rf src/wasm-wasi-component/target \
&& rm -rf /usr/src/unit \
&& for f in /usr/sbin/unitd /usr/lib/unit/modules/*.unit.so; do \
ldd $f | awk '/=>/{print $(NF-1)}' | while read n; do dpkg-query -S $n; done | sed 's/^\([^:]\+\):.*$/\1/' | sort | uniq >> /requirements.apt; \
Expand Down

0 comments on commit df7a530

Please sign in to comment.