Docker Confusion, 2 images created

Why do 2 images get created? When Mosh did the demo, there was only react-app image
but when I did the same

I can see 2 image: node and react-app. Why does this happen?

@thedubsin Can you share the Docker file and the command you used to build the image. It seems that the same image is tagged twice - one with latest and the other 16.6.1-alpine3.14

Hello sir, I actually created a basic react app using the create-react-app utility and tried to dockerize that.

I made some changes on the docker file as well because the code from Mosh’s demo did not work.

FROM node:16.6.2-alpine3.14
RUN addgroup app && adduser -S -G app app
RUN mkdir /app && chown -R app:app /app
USER app
WORKDIR /app
COPY --chown=app:app package*.json ./
RUN npm ci
COPY --chown=app:app . .
ENV API_KEY=secretkey
EXPOSE 3000
CMD ["npm","start"]

The problem first was regarding the npm install, which after trying so many things resolved, but sometimes there is connection timeout. And secondly,
If the image was created, there would be the node-alpine image as well which confused me because in Mosh’s demo it wasn’t there.