Comments (6)
For anyone interested in a solution... We installed buildkite-agent in the dockerfile and just used the --token and --agent-access-token to do start or upload commands in the various scripts. We did have to pass in the right ENVs which were available on the first docker layer:
environment:
- "BUILDKITE_AGENT_ACCESS_TOKEN" # Needed for buildkite-agent upload
mount-buildkite-agent: false # Mounting bk-agent doesn't work, so disable it
propagate-environment: true # Need for buildkite-agent upload (JOB_ID, etc)
from docker-buildkite-plugin.
Hey @NorseGaud! Sorry for not spotting this earlier.
Does /usr/local/bin/buildkite-agent
exist on the host (if you run a command with ls -lsa /usr/local/bin/buildkite-agent
)? And I wonder if it's being disallowed to be bind-mounted into the container, or that's being blocked somehow?
from docker-buildkite-plugin.
No problem, sorry for the delay. I got pulled into an urgent issue. Here are the results without mount-buildkite-agent
specified in our pipeline.yml:
ls -laht /usr/local/bin/buildkite-agent; ls -laht /usr/bin/buildkite-agent
ls: cannot access /usr/local/bin/buildkite-agent: No such file or directory
--
| total 8.0K
| dr-xr-xr-x 1 root root 4.0K Jul 25 17:31 ..
| drwxr-xr-x 2 root root 4.0K Jul 24 19:50 .
Checking on the bind-mount permissions.
from docker-buildkite-plugin.
Ok, I just ran a test using volumes and got the following:
volumes:
- "/usr/local/bin/buildkite-agent"
total 8.0K
--
| drwxr-xr-x 1 root root 4.0K Jul 25 17:38 ..
| drwxr-xr-x 2 root root 4.0K Jul 25 17:38 .
| total 8.0K
| dr-xr-xr-x 1 root root 4.0K Jul 25 17:38 ..
| drwxr-xr-x 2 root root 4.0K Jul 24 22:19 .
So even volumes is mounting an empty directory instead of the file.
from docker-buildkite-plugin.
Aha! On my local machine, same:
command -v buildkite-agent
/usr/local/bin/buildkite-agent
docker run -ti --rm -v $(pwd):/workdir -v /usr/local/bin/buildkite-agent eosio/producer:eosio-ubuntu-18.04-97c66ab9db7382be04dea9e9
598fd110d66432f1 bash
root@4a86d4037865:/# command -v buildkite-agent
root@4a86d4037865:/# ll /usr/local/bin/
total 56676
drwxr-xr-x 1 root root 4096 Jul 25 17:41 ./
drwxr-xr-x 1 root root 4096 Jul 25 13:23 ../
drwxr-xr-x 2 root root 4096 Jul 25 17:41 buildkite-agent/
-rwxr-xr-x 1 root root 18833304 Jul 25 13:23 cmake*
-rwxr-xr-x 1 root root 18844128 Jul 25 13:23 cpack*
-rwxr-xr-x 1 root root 20312080 Jul 25 13:23 ctest*
-rwxr-xr-x 1 root root 24720 Jul 25 13:26 mongoc-stat*
from docker-buildkite-plugin.
Furthermore, mounting the dir where it is doesn't work either:
docker run -ti --rm -v $(pwd):/workdir -v /usr/local/bin:/host-bin eosio/producer:eosio-ubuntu-18.04-97c66ab9db7382be04dea9e9598fd110d66432f1 bash
root@44a3b6b66446:/# ls -laht /host-bin/
total 158M
drwxr-xr-x 1 root root 4.0K Jul 25 17:43 ..
drwxr-xr-x 2 root root 2.0K Feb 13 10:29 .
-rwxr-xr-x 1 root root 27M Feb 10 04:14 containerd
-rwxr-xr-x 1 root root 4.8M Feb 10 04:14 containerd-shim
-rwxr-xr-x 1 root root 15M Feb 10 04:14 ctr
-rwxr-xr-x 1 root root 49M Feb 10 04:14 docker
-rwxr-xr-x 1 root root 747K Feb 10 04:14 docker-init
-rwxr-xr-x 1 root root 2.8M Feb 10 04:14 docker-proxy
-rwxr-xr-x 1 root root 52M Feb 10 04:14 dockerd
-rwxr-xr-x 1 root root 7.2M Feb 10 04:14 runc
If I ls -laht /usr/local/bin
on the host I get a ton more stuff.
Found docker/for-win#25 which is for windows...
Update: Just realized we're doing docker inside of docker. So it doesn't exist to mount. Not a plugin issue!
from docker-buildkite-plugin.
Related Issues (20)
- input from block steps not passed in env HOT 1
- Can't interpolate ENV vars in mount path HOT 3
- Docker on Docker support HOT 1
- Exit codes > 1 are not correctly propagated HOT 2
- Dependency Dashboard
- GPU parameters not passing in Docker Run {--gpus 1} HOT 3
- Allow setting config globally, instead of per step HOT 1
- Limitation with an array of commands at the step level
- Handling of parameters when shell is false HOT 4
- Changing the Docker Version from 20.10.9 to 20.10.22 HOT 1
- `.ssh/known_hosts` mounted in wrong location when both `mount-ssh-agent` and `user` are used HOT 3
- Documentation: expand-volume-vars expansion time HOT 2
- error pulling amazonlinux:latest HOT 6
- How to pass environment variable to command? HOT 2
- Support for other docker commands than docker run HOT 2
- Windows: docker: Error response from daemon: invalid volume specification HOT 1
- add `expand-workdir-vars` option HOT 2
- Next major version should support the 99% case HOT 1
- `mount-buildkite-agent` should mount `BUILDKITE_AGENT_JOB_API_SOCKET`
- Plugin doesn't correctly bubble up Docker Hub Rate Limiting Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-buildkite-plugin.