gchandra
gchandra

Reputation: 94

Why is the docker image not building?

I was following the tutorial on the official website.

https://docs.docker.com/get-started/part2/#build-the-app

I created a directory named dir and added the Dockerfile, app.py and requirements.txt. When I try to build this, the error is-

root@ubuntu:~/dir# docker build -t hello
"docker build" requires exactly 1 argument.
See 'docker build --help'.

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

Build an image from a Dockerfile

Upvotes: 0

Views: 2665

Answers (1)

fly2matrix
fly2matrix

Reputation: 2477

You forgot to mention location of context-root

#>docker build -t hello .

Add a . at the end if Dockerfile is at the current location

Upvotes: 2

Related Questions