码头工人:“建造”需要1个参数。参见'docker build --help' [英] docker: "build" requires 1 argument. See 'docker build --help'
问题描述
https://docs.docker.com/examples/running_redis_service/
这是我将按照文档中的说明进行的错误并使用这个Dockerfile
FROM ubuntu:14.04
RUN apt-get update&& apt-get install -y redis-server
EXPOSE 6379
ENTRYPOINT [/ usr / bin / redis-server]
sudo docker build -t myrepo / redis
docker:build需要1个参数。请参阅'docker build --help'。
如何解决?
您需要添加一个点,例如 docker build -t mytag。
这意味着您在本地目录中使用Dockerfile,如果您使用docker 1.5你可以指定一个Dockerfile其他的,从docker构建的帮助中提取 -f,--file =Dockerfile的名称(默认是在上下文根目录下的Dockerfile)
Trying to follow the instructions for building a docker image from the docker website.
https://docs.docker.com/examples/running_redis_service/
this is the error I get will following the instructions on the doc and using this Dockerfile
FROM ubuntu:14.04
RUN apt-get update && apt-get install -y redis-server
EXPOSE 6379
ENTRYPOINT ["/usr/bin/redis-server"]
sudo docker build -t myrepo/redis
docker: "build" requires 1 argument. See 'docker build --help'.
How do resolve?
You need to add a dot, example docker build -t mytag .
it means you use the Dockerfile in the local directory, and if you use docker 1.5 you can specify a Dockerfile otherwhere, extract from the help of docker build -f, --file="" Name of the Dockerfile(Default is 'Dockerfile' at context root)
这篇关于码头工人:“建造”需要1个参数。参见'docker build --help'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!