Docker does not build image

  docker

I just got started with docker and was following fireship’s tutorial, however I encountered a problem when I ran the docker build command. I was expecting a similar output as the video (timestamp). Instead, I got the following:

output

Dockerfile

FROM node:12

WORKDIR /app #maybe its this? There is no /app directory
COPY package*.json ./
RUN npm install
COPY . .

ENV PORT=8080
EXPOSE 8080

CMD ["npm","start"]

docker build command

docker build -t <my docker id>/firstapp:1.1 .

File tree

D:/
 Code/
  testing/
   Docker/
    test1/

Notes

  • Yes, I have a docker ID.

  • The docker build command stopped at COPY . ., rather than finishing at CMD ["npm","start"]

  • CWD (Windows): D:CodetestingDockertest1

  • I ran the docker build command twice

Questions

  1. Why is this happening?
  2. How can it be fixed?

Source: Docker Questions

LEAVE A COMMENT