I’m following this guide https://github.com/moby/moby/blob/master/docs/contributing/set-up-dev-env.md and trying to setup a moby dev environment. In step 4 of the above URL, I execute the command
make BIND_DIR=. shell
and get the below error.
docker build --build-arg=GO_VERSION -f "Dockerfile" --target=dev -t "docker-dev:dry-run-test" .
unknown flag: --target
See 'docker build --help'.
make: *** [build] 错误 125
What version of docker do you have installed currently? (you can find the version with the docker version
command)
That error may mean that you have a very old version of docker installed that not yet has support for multi-stage builds
docker version is 1.13.1, is it because of version problems?
Yes, that would explain; docker 1.13.x reached EOL almost 4 years ago, and doesn’t have support for multi-stage builds.
I would highly encourage to install a currently maintained version (current version is docker 19.03.x at time of writing) (https://docs.docker.com/engine/install/). Older releases are not maintained, and can have unpatched vulnerabilities (in some cases, critical)
Thanks I can use it after upgrading docker