Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build is broken #473

Closed
romintomasetti opened this issue May 18, 2021 · 5 comments
Closed

Docker build is broken #473

romintomasetti opened this issue May 18, 2021 · 5 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@romintomasetti
Copy link

romintomasetti commented May 18, 2021

Following the changes in 791d400, building the Docker image for MongoDB 4.4 doesn't work because Error response from daemon: Dockerfile parse error line 83: ARG requires exactly one argument.

This should be corrected, at least in 791d400#diff-64bdf01b91b9801069c15f8fd273c15306316bc74320059836a839d62307cfae.

@tianon
Copy link
Member

tianon commented May 18, 2021

Can you provide some more detail? I can't reproduce: 😕

$ docker build --pull https://github.com/docker-library/mongo.git#:4.4
Sending build context to Docker daemon  29.18kB
Step 1/20 : FROM ubuntu:bionic
bionic: Pulling from library/ubuntu
Digest: sha256:538529c9d229fb55f50e6746b119e899775205d62c0fc1b7e679b30d02ecb6e8
Status: Image is up to date for ubuntu:bionic
 ---> 4eb8f7c43909
...
Step 9/20 : ARG MONGO_PACKAGE=mongodb-org MONGO_REPO=repo.mongodb.org
 ---> Running in 8331bc5611ab
Removing intermediate container 8331bc5611ab
 ---> 897879f53032
Step 10/20 : ENV MONGO_PACKAGE=${MONGO_PACKAGE} MONGO_REPO=${MONGO_REPO}
 ---> Running in 3bcec62aa4ba
Removing intermediate container 3bcec62aa4ba
 ---> 6789f9ce0727
Step 11/20 : ENV MONGO_MAJOR 4.4
 ---> Running in 841b2982cdda
Removing intermediate container 841b2982cdda
 ---> 9c3041177f12
Step 12/20 : RUN echo "deb http://$MONGO_REPO/apt/ubuntu bionic/${MONGO_PACKAGE%-unstable}/$MONGO_MAJOR multiverse" | tee "/etc/apt/sources.list.d/${MONGO_PACKAGE%-unstable}.list"
 ---> Running in e5687ba0221b
deb http://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse
Removing intermediate container e5687ba0221b
 ---> 7b31d6744be8
...
 ---> 66ede2bb496e
Step 20/20 : CMD ["mongod"]
 ---> Running in c92f0c962b78
Removing intermediate container c92f0c962b78
 ---> d6341af03a5c
Successfully built d6341af03a5c

@wglambert wglambert added the question Usability question, not directly related to an error with the image label May 18, 2021
@romintomasetti
Copy link
Author

Well, it's weird that it works for you because clearly from

ARG MONGO_PACKAGE=mongodb-org MONGO_REPO=repo.mongodb.org
, there are 2 ARG on the same line and that doesn't work on my side. From the Docker documentation https://docs.docker.com/engine/reference/builder/#arg, it seems that ARG is only one value at a time.

@tianon
Copy link
Member

tianon commented May 19, 2021 via email

@romintomasetti
Copy link
Author

What's your Docker version?

19.03.8, not the newest I agree. But not that old 😃

@yosifkit
Copy link
Member

This seems to only be a limitation when using older buildkit for docker build; regular docker build works fine and a newer buildkit also works fine (moby/buildkit#1692).

@yosifkit yosifkit closed this as completed Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

4 participants