Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest image (1.40.5) missing unzip #344

Open
Guillaume-Mayer opened this issue Feb 21, 2024 · 4 comments
Open

Latest image (1.40.5) missing unzip #344

Guillaume-Mayer opened this issue Feb 21, 2024 · 4 comments
Assignees

Comments

@Guillaume-Mayer
Copy link

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

@catuhana
Copy link

catuhana commented Feb 23, 2024

Having the same issue with deno:1.41.0.

@Guillaume-Mayer
Copy link
Author

Still failing with denoland/deno:1.41.3

@fabricionaweb
Copy link

Without the unzip the compile does not work.

Is it a valid MR to be done?

@Guillaume-Mayer
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants