Closed kjeremy closed 3 years ago
Am I reading correctly that you're running this from inside a Docker container? The tool itself uses Docker - so, if so, I think there's probably something going wrong with the Docker-in-Docker situation - maybe that mounting the workspace as a volume isn't actually happening...?
Yes that's correct that it should be using docker in docker. I'm not terribly familiar with docker in docker so am unsure how to debug.
On Thu, May 20, 2021, 4:05 PM Emerson Knapp @.***> wrote:
Am I reading correctly that you're running this from inside a Docker container? The tool itself uses Docker - so, if so, I think there's probably something going wrong with the Docker-in-Docker situation.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ros-tooling/cross_compile/issues/313#issuecomment-845440353, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBACRHYHMIROL4GHEKAU2TTOVTPTANCNFSM45HTESPA .
Are you able to run in the host environment instead? I'm inclined to say "running ros_cross_compile from inside a container is not supported"
Unfortunately I cannot run in the host environment for production. After reading some stack overflow (https://stackoverflow.com/questions/50971417/docker-inside-docker-volume-is-mounted-but-empty) I think a solution may be to use named volumes for the workspace.
I would be happy to review changes along these lines. However, I think you would have to create the named volume ahead of time - still from the host environment, could you do that once you're already in a container?
I got it working successfully using docker-in-docker with the following:
image: teracy/ubuntu:18.04-dind-19.03.3
services:
- docker:19.03.3-dind
variables:
# Disable TLS or we get SSLv1 errors. We shouldn't need this since we mount the /certs volume.
DOCKER_TLS_CERTDIR: ""
DOCKER_HOST: tcp://docker:2375
While it would be nice to support with the "sharing the docker socket approach" this is a kind of workaround.
I'm going to close this since it works in dind.
Others may appreciate your findings as a section in the README - if you're willing to contribute that. Maybe something like a "Troubleshooting" section, under which there is a subsection for "No src/ directory found at /ws, did you remember to mount your workspace?"
hi, is there more instruction?
@ZhamaoDra What I did was set up a gitlab-runner running in docker in privileged mode and used the .gitlab-ci.yml file in the troubleshooting section (#314). I'm not sure what else you are looking for.
Description
I am attempting to run this script to cross-compile for melodic. At the moment it fails accessing the workspace.
Expected Behavior
It should succeed.
Actual Behavior
It fails:
To Reproduce
** Steps to reproduce the behavior, e.g. Create a gitlab runner with /var/run/docker.sock mounted. In the gitlab.yaml:
The build output:
Notice that in the output of the
tree
command there is asrc/
directory on the workspace.System (please complete the following information)
For ROS 2 bugs - please attach a VCS.repos or Dockerfile if possible to help us reproduce the environment
Additional context
This works fine when run from a Bionic VM in VMWare.