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

Cannot perform docker run with volume mounts inside step #66

Closed
noizwaves opened this issue May 22, 2020 · 4 comments
Closed

Cannot perform docker run with volume mounts inside step #66

noizwaves opened this issue May 22, 2020 · 4 comments

Comments

@noizwaves
Copy link


Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Version of Helm and Kubernetes:
Helm 3.2.1
Kubernetes 1.15.11 (AWS EKS)

Which chart:
CHART: agent-0.3.14
APP VERSION: 3.17.0

What happened:
When running a step that includes a Docker run with mounted volumes, the volumes fail to be mounted.

When running the below example, the job output shows this:

trap 'kill -- $$' INT TERM QUIT; touch foobar
--
  | docker run \
  | -w /code \
  | -v `pwd`:/code \
  | --entrypoint=/bin/sh \
  | gardendev/garden-aws:v0.11.14 -c "ls -al"
  |  
  |  
  | total 0
  | drwxr-xr-x    2 root     root             6 May 21 22:26 .
  | drwxr-xr-x    1 root     root            18 May 22 01:44 ..

What you expected to happen:

I expect there to 3 entries in the ls output, but foobar is missing.

How to reproduce it (as minimally and precisely as possible):

steps:
  - label: "Perform a docker run with mounted volume"
    command: |
      touch foobar
      docker run \
        -w /code \
        -v `pwd`:/code \
        --entrypoint=/bin/sh \
        gardendev/garden-aws:v0.11.14 -c "ls -al"

Anything else we need to know:

We are using a very simple configuration for the chart, setting only agent.meta, privateSshKey and agent.token.

We also tried enabling DinD (via setting dind.enabled to true), but that did not resolve the issue.

@noizwaves
Copy link
Author

noizwaves commented May 22, 2020

We also found https://buildkite.com/docs/agent/v3/docker#allowing-builds-to-use-docker these instructions for the Docker provisioned agents; are there similar instructions for the Helm Chart provisioned agents?

@tjwallace
Copy link
Contributor

Try these changes, they mount a shared directory between the agent and DinD:
98622d1

@noizwaves
Copy link
Author

@tjwallace many thanks for linking this commit. We ended up switching away from the Helm deployed agents to Cloudformation Stack deployed agents, but if I can find time after your PR merges, I'll give the chart another go.

@rimusz
Copy link
Collaborator

rimusz commented Jun 26, 2020

closing this issue, @noizwaves open a new issue if that doesn't work for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants