deno_docker
deno_docker copied to clipboard
Latest image (1.40.5) missing unzip
Using this dockerfile:
FROM denoland/deno
WORKDIR /app
ADD . /app
RUN deno compile --allow-net server.ts
FROM gcr.io/distroless/cc-debian12:nonroot
COPY --from=0 /app/server /home/nonroot/server
ENTRYPOINT ["./server"]
Give me this error:
1.970 Check file:///app/server.ts
3.351 Compile file:///app/server.ts to server
3.351 Download https://dl.deno.land/release/v1.40.5/denort-x86_64-unknown-linux-gnu.zip
15.84 error: Writing server
15.84
15.84 Caused by:
15.84 `unzip` was not found in your PATH, please install `unzip`
------
Dockerfile:4
--------------------
2 | WORKDIR /app
3 | ADD . /app
4 | >>> RUN deno compile --allow-net server.ts
5 |
6 | FROM gcr.io/distroless/cc-debian12:nonroot
--------------------
ERROR: failed to solve: process "/bin/sh -c deno compile --allow-net server.ts" did not complete successfully: exit code: 1
It works with tag 1.40.4
Having the same issue with deno:1.41.0
.
Still failing with denoland/deno:1.41.3
Without the unzip the compile does not work.
Is it a valid MR to be done?
Since deno use unzip, I would think it should be in the image. On the other hand, it is not welcome at runtime, so I don't know, but in my case I dit this:
FROM denoland/deno
WORKDIR /app
ADD . /app
RUN : \
&& apt-get update \
&& apt-get install -y unzip \
&& deno compile --allow-net server.ts
FROM gcr.io/distroless/cc-debian12:nonroot
COPY --from=0 /app/server /home/nonroot/server
ENTRYPOINT ["./server"]
Maybe I could just use the denoland/deno:distroless variant tho