DEV Community


Discussion on: Learn Docker - from the beginning, part I images and containers

klausbert profile image

Hi Chris, I was wondering the same thing... the Dockerfile starts with:

FROM node:latest

and the image building command is:

docker build -t chrisnoring/node:latest .

So why you needed to specify node:latest twice?

Thread Thread
ggenya132 profile image
Eugene Vedensky

Yes thank you for taking the time to be more specific, this is exactly what I was referring to. I've tried without the /node:latest and it produces the same result because of the Dockerfile having that specified.

Thread Thread
softchris profile image
Chris Noring Author

I could be wrong here, but I think you can call it what you want in the docker build command.. so it could be
FROM node:latest
in Dockerfile and
docker build -t chrisnoring/node:dev
It's just a way to give different builds different names.