Yes you can achieve a non executable image in docker by using a distroless node image I'll post you a sample source code bellow to have an idea on how to use distroless images.
FROM node:20 AS builder
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM gcr.io/distroless/nodejs:18
COPY --from=builder /usr/src/app /usr/src/app
WORKDIR /usr/src/app
CMD ["dist/main"]
You can find source of this image here:
https://console.cloud.google.com/artifacts/docker/distroless/us/gcr.io/nodejs/sha256:b534f9b5528e69baa7e8caf7bcc1d93ecf59faa15d289221decf5889a2ed3877