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

"solving failed" while building in Docker #34

Closed
sparty02 opened this issue Feb 23, 2018 · 7 comments

Comments

@sparty02
Copy link
Contributor

commented Feb 23, 2018

When doing an img build on Docker (with the example from the README), I get a rando "solving failed" error. For what it's worth, I'm on WSL.

/mnt/c/projects/customer
❯ uname -r && lsb_release -a && ls Dockerfile
3.4.0+
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty
Dockerfile

/mnt/c/projects/customer
❯ docker run --rm -it \
    --name img \
    --volume /tmp/state:/root/.img \
    --volume $(pwd):/src \
    --workdir /src \
    --privileged \
    --volume "${HOME}/.docker:/root/.docker:ro" \
    jess/img build -t user/myimage .
Building user/myimage:latest
Setting up the rootfs... this may take a bit.
solving failed: open /tmp/buildkit-mount580779614/Dockerfile: no such file or directory
@jessfraz

This comment has been minimized.

Copy link
Collaborator

commented Feb 23, 2018

@jessfraz

This comment has been minimized.

Copy link
Collaborator

commented Feb 23, 2018

but you are running it in a container.... so it should since docker will use the linux vm, the problem is the PWD which gets the current working directy which will not map to right location on your actually windows host since im assuming its on the WSL filesystem

@jessfraz

This comment has been minimized.

Copy link
Collaborator

commented Feb 23, 2018

so just use an absolute path in the command, this isnt an img issue, its a running docker from WSL filesystem, trying to pass current working directory which is not a real path problem

@sparty02

This comment has been minimized.

Copy link
Contributor Author

commented Feb 23, 2018

👍

@sparty02 sparty02 closed this Feb 23, 2018

@jessfraz

This comment has been minimized.

Copy link
Collaborator

commented Feb 23, 2018

@sparty02

This comment has been minimized.

Copy link
Contributor Author

commented Feb 23, 2018

Yeah, for the record, I quickly realized that I have been having volume mount issues lately due to Windows Firwall blocking file shares with Docker. To verify that it really was a mount issue (outside of img), I did the follwing:

echo $(pwd) && docker run --rm -it \
    --name img \
    --volume /tmp/state:/root/.img \
    --volume $(pwd)/src \
    --workdir /src \
    --privileged \
    --volume "${HOME}/.docker:/root/.docker:ro" \
    --entrypoint "/bin/sh" jess/img -c "ls -al /src/Dockerfile"
/mnt/c/projects/customer
ls: /src/Dockerfile: No such file or directory
@jessfraz

This comment has been minimized.

Copy link
Collaborator

commented Feb 23, 2018

oh whoa thats crazy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.