From 99c60e9689abf1c78a17ecfcf6b719e0408ead6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Fern=C3=A1ndez=20L=C3=B3pez?= Date: Thu, 20 Jul 2023 17:08:51 +0200 Subject: [PATCH] chore: place wws under /opt/wws and keep /app in prebuilt images too --- image/Prebuilt.dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/image/Prebuilt.dockerfile b/image/Prebuilt.dockerfile index a1e2e500..1c715d79 100644 --- a/image/Prebuilt.dockerfile +++ b/image/Prebuilt.dockerfile @@ -3,7 +3,8 @@ # GitHub actions # Retrieve the certificates to install runtimes later on. -FROM --platform=$TARGETPLATFORM bitnami/minideb:latest AS certs +FROM --platform=$TARGETPLATFORM bitnami/minideb:latest AS sysroot +RUN mkdir -p /target/app /target/opt RUN install_packages ca-certificates # Build the final image @@ -14,9 +15,10 @@ LABEL org.opencontainers.image.source=https://github.com/vmware-labs/wasm-worker LABEL org.opencontainers.image.description="Wasm Workers Server is a blazing-fast self-contained server that routes HTTP requests to workers in your filesystem. Everything run in a WebAssembly sandbox." LABEL org.opencontainers.image.licenses="Apache-2.0" -COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY --chmod=755 ./wws-$TARGETARCH /wws +COPY --from=sysroot /target/app /app +COPY --from=sysroot /target/opt /opt +COPY --from=sysroot /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --chmod=755 ./wws-$TARGETARCH /opt/wws -ENTRYPOINT ["/wws"] +ENTRYPOINT ["/opt/wws"] CMD ["/app/", "--host", "0.0.0.0"] -