krischu
(Krischu)
1
I installed docker --version 25.0.2 build 29cf629 (hopefully all went well) under Ubuntu 23.04 in a Virtual Box under macOS.
docker run hello-word
and docker run -it ubuntu bash
are working.
I got a Dockerfile
which I would like to run. It contains the prerequisites for the project I want to build. How can I achieve this?
EDIT. When I run
$ pwd
/root/dockerbuild
$ ls
Docker
$ docker build
ERROR: "docker buildx build" requires exactly 1 argument.
See 'docker buildx build --help'.
Usage: docker buildx build [OPTIONS] PATH | URL | -
Start a build
root@ubuntu22~/dockerbuild$
meyay
(Metin Y.)
2
You might want to make it a habit to take a look into the official documentation, if something is unclear:
The get started guide in the official documentation covers the topic as well:
krischu
(Krischu)
3
Thanks. I got it solved by using:
docker build < - Dockerfile
meyay
(Metin Y.)
4
You might want to use a tag and set the local folder as build context instead:
https://docs.docker.com/reference/cli/docker/image/build/#tag