I have a Dockerfile that is supposed to build an Ubuntu image. But whenever I run
docker build -t ubuntu-test:latest ./Dockerfile
it shows the fo
To specify a Dockerfile
when build, you can use:
docker build -t ubuntu-test:latest - < /path/to/your/Dockerfile
But it'll fail if there's ADD
or COPY
command that depends on relative path. There're many ways to specify a context
for docker build
, you can refer to docs of docker build for more info.