I am having a bit of a problem trying to get my bitbucket user to have admin rights to DRONE. What am I doing wrong? when I goto my url i.e. https://drone.exmaple.com it auto sends me to bitbucket to login. After this is done I get the drone UI. However it seems I am a user not admin as I get no extra features on repo section to enable me to use docker volumes.
So my question is, how does one who uses bitbucket for auth (oauth) give themselfs admin access? my bitbucket login is: [email protected]
I can confirm it matches with the latest config. As you can see it is seeing me as admin, I think I now know what the problem is, I am not running the container in privileged mode because its not directly supported with stack configs. Will switch this to “cap_add” (shown below) which is an overkill but it might work. Will report later when I got a few minutes to test.
Thanks for the URL BTW as without it, I would still be thinking its not been set.
Good news, after doing some more research, ive got the admin part sorted. It seems that docker swarm mode can’t create privileged containers (at this time). However there is a work around…
In short, I had to re-create my docker swarm network (backend) to allow me to manually attach. Then I did the good old docker-compose version of the stack file and manually brought up the containers for server and agents on the relevant machines.
Then I found I could tick trusted under settings. This then allowed the volumes to mount.
I am not sure if you only need privileged on just the agent which is kind of what I would expect so if you or anyone could confirm that its only needed their, ile update the config.
The only thing I am now having issues with is I now get this when trying to build a dockerfile.
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.33/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=66201d8f706a2f279c39d5794e2b063c34334c90e79c73cd3212ae8f54acfe13&shmsize=0&t=******%2Fdocker-******-tmp&target=&ulimits=null: dial unix /var/run/docker.sock: connect: permission denied
Could this be something to do with my image im using for building dockerfiles? what image would anyone suggest to just simply build/compile a Dockerfile in X repo then push it up to dockerhub if all successful? later on like that to auto-deploy but baby steps.
Also if anyones intrested how to re-create network, this is what I did (taken from my own notes)
First of remove the default ingres network which is used to link all servers togeter and is used for the public network.
You only really need to do the backend network but as I forgot to encrypt mine originally when I created the swarm network, I took the time to do that at the same time.
I hope some of this info is helpful to others whos having issues with swarm. If anyone has any solutins to the permissions issue please let me know. Below is the .drone.yml file that im currently messing with…