Problem in build the result-app from "docker build . -t result-app" command

1. when i am running “docker build . -t result-app” from “/home/sudhanshu/example-voting-app/result” directory it is giving me below error

<
ERROR: failed to solve: process “/bin/sh -c apt-get update && apt-get install -y --no-install-recommends curl tini && rm -rf /var/lib/apt/lists/*” did not complete successfully: exit code: 127

2. Below are the already running containers for your reference.

<
[root@linuxVM result]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b4f3385b8adf node:18-slim “docker-entrypoint.s…” About an hour ago Up About an hour inspiring_heisenberg
90633e2124fc worker-app “dotnet Worker.dll” 2 hours ago Up 2 hours stupefied_brattain
d331b8df1cc4 postgres:15-alpine “docker-entrypoint.s…” 2 hours ago Up 2 hours 5432/tcp db
a3c23580bae0 voting-app “gunicorn app:app -b…” 2 hours ago Up 2 hours 0.0.0.0:5000->80/tcp, :::5000->80/tcp stoic_matsumoto
c407a8938510 redis “docker-entrypoint.s…” 2 hours ago Up 2 hours 6379/tcp redis
[root@linuxVM result]

3. Below is the Docker file for result-app
<
FROM node:18-slim

add curl for healthcheck

RUN apt-get update &&
apt-get install -y --no-install-recommends curl tini &&
rm -rf /var/lib/apt/lists/*

WORKDIR /usr/local/app

have nodemon available for local dev use (file watching)

RUN npm install -g nodemon

COPY package*.json ./

RUN npm ci &&
npm cache clean --force &&
mv /usr/local/app/node_modules /node_modules

COPY . .

ENV PORT 80
EXPOSE 80

ENTRYPOINT [“/usr/bin/tini”, “–”]
CMD [“node”, “server.js”]

Did you look at your own post? It’s not very clear - do you think you can put your text in a code block - look for the </> on the edit bar bar? It means we can clearly see the formatting of your file and output to help in solving your problem.

It looks like you have a Dockerfile so paste that too. Yes in another code block too - that would be awesome.

Sorry for this i have updated my Post please check. Let me know if anything else require,
Thanks

It is still not in a code block. It should be like this, can you tell the differnce?

FROM node:18-slim

RUN apt-get update && \
apt-get install -y --no-install-recommends curl tini && \
rm -rf /var/lib/apt/lists/*

WORKDIR /usr/local/app

RUN npm install -g nodemon

COPY package*.json ./

RUN npm ci && \
npm cache clean --force && \
mv /usr/local/app/node_modules /node_modules

COPY . .

ENV PORT 80
EXPOSE 80

ENTRYPOINT ["/usr/bin/tini", "–"]
CMD ["node", "server.js"]

I ran this Dockerfile and it ran fine up to the npm step, which failed as I don’t have you source code.