Sudo docker build -t="nisevi/static_web"

I’m following the steps of the “The Docker Book” and when I’m trying to build the image from a Dockerfile, I always have the same answer:

nisevi@localhost static_web:$ ll
total 24
drwxrwxr-x. 2 nisevi nisevi 4096 Feb  3 09:46 ./
drwxrwxr-x. 8 nisevi nisevi 4096 Feb  2 21:28 ../
-rw-rw-r--. 1 nisevi nisevi  215 Feb  3 09:04 Dockerfile
nisevi@localhost static_web:$ sudo docker build -t="nisevi/static_web"

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

Build a new image from the source code at PATH

  --force-rm=false     Always remove intermediate containers, even after unsuccessful builds
  --no-cache=false     Do not use cache when building the image
  --pull=false         Always attempt to pull a newer version of the image
  -q, --quiet=false    Suppress the verbose output generated by the containers
  --rm=true            Remove intermediate containers after a successful build
  -t, --tag=""         Repository name (and optionally a tag) to be applied to the resulting image in case of success
nisevi@localhost static_web:$ 

This is my Dockerfile:

# Version: 0.0.1
FROM ubuntu:14.04
MANTAINER nisevi "nicolas.s.vidal@gmail.com"
RUN apt-get update
RUN apt-get install -y nginx
RUN echo 'Hi, I am in your container'\
    >/usr/share/nginx/html/index.html
EXPOSE 80

Someone knows why this is happening? I will be very grateful for any help.

your are missing a period at the end of the command
your command should be $ sudo docker build -t=“nisevi/static_web” .
hope this works

1 Like