I just upgraded to v 1.0 (I did a fresh installation) I really like the new UI, I want to use cross to cross build some Rust binaries, the thing is that cross needs the Docker deamon to work, so I tried to add Docker service like described here, but for somehow I have docker: not found when I try to execute Docker commands, here is my .drone.yml file, am I missing something? (The repository is trusted by the way)
I have docker: not found when I try to execute Docker commands, here is my .drone.yml file, am I missing something?
yes, it would appear rustlang/rust:nightly does not have a docker executable available inside the image. You should instead use an image that includes the docker executable, such as the official docker image. You can see a working example at https://docs.drone.io/examples/service/docker/
the docker image does not have anything running inside of it, by default. So you would either need to mount the host machine docker socket or start docker in a service container.
Yes I was thinking about mounting the host machine docker socket (I think that’s what I did in the .drone.yml file) but I still can’t use it in the loaded container?
sorry, not sure I understand the question, however, we provide an example that demonstrates how to mount the host machine docker socket to use Docker in a pipeline step. https://docs.drone.io/examples/service/docker/
Sorry for that, the question is for a pipeline with a given image (that doesn’t contains Docker) if I mount the host machine docker socket like your example, I can use docker commands in that pipeline?
Doing an analogy with travis, for example here is a pipeline based on ruby image and that use Docker as service to execute Docker commands in that pipeline even if the image doesn’t contains Docker:
It’s just I’m used to do that with travis like the example I put before, and here I need to run Docker with Rust image due to cross that needs Docker behind the scenes to cross compile Rust binaries, you can see it here
I am having a hard time understanding what you are trying to do because the example only shows docker ps. I need more details to help you. What commands would you run locally to build the project (e.g. on your laptop)?
The docker ps was just to test if I have access to Docker or not, but the real command in this case would be a cross build --target x86_64-unknown-linux-gnu for example