DenoDDeno
Powered by
Robin LindnerR
Denoβ€’3y agoβ€’
2 replies
Robin Lindner

Running deno in distroless image does not work well

Hey, I have the following Dockerfile:

FROM node:lts AS build
WORKDIR /app
COPY .npmrc package.json pnpm-lock.yaml ./
RUN npm install -g pnpm \
    && pnpm fetch --prod
COPY . ./
RUN pnpm install -r --offline --prod \
    && pnpm build

# Run
FROM denoland/deno:distroless-1.34.2
USER deno
COPY --from=build --chown=deno:deno /app/dist/ /app/
WORKDIR /app/server
ENV HOST=0.0.0.0
ENV Port=3000
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl --fail http://localhost:3000 || exit 1 
CMD ["run", "--allow-net", "--allow-read", "--allow-env", "entry.mjs"]
FROM node:lts AS build
WORKDIR /app
COPY .npmrc package.json pnpm-lock.yaml ./
RUN npm install -g pnpm \
    && pnpm fetch --prod
COPY . ./
RUN pnpm install -r --offline --prod \
    && pnpm build

# Run
FROM denoland/deno:distroless-1.34.2
USER deno
COPY --from=build --chown=deno:deno /app/dist/ /app/
WORKDIR /app/server
ENV HOST=0.0.0.0
ENV Port=3000
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl --fail http://localhost:3000 || exit 1 
CMD ["run", "--allow-net", "--allow-read", "--allow-env", "entry.mjs"]


But for some reason I get some error:
$ docker run asciity:0.1.0 -p 3000:3000
docker: Error response from daemon: unable to find user deno: no matching entries in passwd file.
$ docker run asciity:0.1.0 -p 3000:3000
docker: Error response from daemon: unable to find user deno: no matching entries in passwd file.
.

Do you have some idea to fix it?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Getting Deno and Nuxt to work well together
DMark05DDMark05 / help
16mo ago
Deno does not work with typescript 5 decorators
AapoAlasAAapoAlas / help
3y ago
Does Deno-bindgen work with Deno 2.0?
WingZer0oWWingZer0o / help
17mo ago