26

Why does my Docker client recognize docker build but not docker image build? Is the client too old? Does CLI depends on client or server? I believe I got my Docker client and server by installing the latest Docker toolbox.

$ docker version
Client:
Version:      1.12.5
API version:  1.24
Go version:   go1.6.4
Git commit:   7392c3b
Built:        Fri Dec 16 06:14:34 2016
OS/Arch:      windows/amd64

Server:
Version:      18.01.0-ce
API version:  1.35
Go version:   go1.9.2
Git commit:   03596f5
Built:        Wed Jan 10 20:13:12 2018
OS/Arch:      linux/amd64

$ docker image build
docker: 'image' is not a docker command.
See 'docker --help'.

$ docker build
"docker build" requires exactly 1 argument(s).
See 'docker build --help'.

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

Build an image from a Dockerfile

2 Answers 2

31

The client version is old. The new commad structure is supported with client 1.13. Check Docker CLI restructured.

There was a refactoring for the command line client to have the form:

docker <management command> <command>

The new command structure still supports the old way. For instance, the old docker ps is an alias for docker container ls and the old docker build is alias to docker image build.

0

As you can see from the documentation in your client version docker image build does not exist yet.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.