From 551b637a7fe907b66c1611f344db1b5d48ae0f70 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Fri, 18 Aug 2023 23:07:59 +0000 Subject: [PATCH] add entrypoint and remove commands in workload.yaml Signed-off-by: jiaxiao zhou --- images/slight/Dockerfile | 5 +++-- tests/workloads/workload.yaml | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/slight/Dockerfile b/images/slight/Dockerfile index a44bdde1..b66bea3e 100644 --- a/images/slight/Dockerfile +++ b/images/slight/Dockerfile @@ -5,6 +5,7 @@ RUN rustup target add wasm32-wasi && cargo build --target wasm32-wasi --release RUN apt-get update && apt-get install ca-certificates -y FROM scratch -COPY --from=build /opt/build/target/wasm32-wasi/release/http_server_lib.wasm ./app.wasm +COPY --from=build --chmod=0755 /opt/build/target/wasm32-wasi/release/http_server_lib.wasm ./app.wasm COPY --from=build /opt/build/slightfile.toml . -COPY --from=build /etc/ssl /etc/ssl \ No newline at end of file +COPY --from=build /etc/ssl /etc/ssl +ENTRYPOINT ["/app.wasm"] \ No newline at end of file diff --git a/tests/workloads/workload.yaml b/tests/workloads/workload.yaml index 9df958ac..611cae26 100644 --- a/tests/workloads/workload.yaml +++ b/tests/workloads/workload.yaml @@ -17,7 +17,6 @@ spec: - name: testwasm image: docker.io/library/slight-hello-world:latest imagePullPolicy: Never # prevent k8s from pulling the image from a registry - command: ["/"] resources: # limit the resources to 128Mi of memory and 100m of CPU limits: cpu: 100m