Docker Community Forums

Share and learn in the Docker community.

Newbie question- cant get Docker Build cmd to work

Im on Docker vers 18.09.5 / Ubuntu vers 18.04.1

Im in the docker docs "Get Started, Part 2… but can get this cmd to run >>
“docker build --tag=friendlyhello” << Im in the “Build the App” step.

New to the --tag option i guess. What would be the missing argument ?
**Here’s my return message >> **
daveg@daveg-ThinkPad-T420:~/Dockerfile$ sudo docker build --tag=friendlyhello
"docker build" requires exactly 1 argument.
See ‘docker build --help’.

Usage: docker build [OPTIONS] PATH | URL | -

Build an image from a Dockerfile

No help from --help. Thx.

You can to use this command:

sudo docker build -f {dockerfile} -t {nameimage} .

I hope this helps.

Hi, got the build to run and can see if in the docker image ls >>
daveg@daveg-ThinkPad-T420:~/Dockerfile$ sudo docker image ls


helloworld latest f452d549a12e 3 days ago 131MB

python 2.7-slim 48e3247f2a19 2 weeks ago 120MB

ubuntu latest 94e814e2efa8 5 weeks ago 88.9MB

hello-world latest fce289e99eb9 3 months ago 1.84kB

username/repository tag ccac12756bf3 10 months ago 132MB


but now I get this error msg trying to run the script. WHAT IS DOCKER LOGIN ? >>

daveg@daveg-ThinkPad-T420:~/Dockerfile$ sudo docker run -p 4000:80 friendlyhello

Unable to find image ‘friendlyhello:latest’ locally

docker: Error response from daemon: pull access denied for friendlyhello, repository does not exist or may require ‘docker login’.

See ‘docker run --help’.