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

Problems with docker volumes #4270

Closed
JJ opened this issue Apr 16, 2018 · 6 comments
Closed

Problems with docker volumes #4270

JJ opened this issue Apr 16, 2018 · 6 comments

Comments

@JJ
Copy link

JJ commented Apr 16, 2018

Description of your issue:

I'm trying to use a Docker container for testing a repo, but I'm having lots of trouble doing it. Here's the latest report and here's my shippable.yml:

os:
    - linux

build:
  pre_ci:
    - mkdir -p /tmp/t
    - docker pull jjmerelo/perl6-doccer

  pre_ci_boot:
    options: "-v /tmp/t:$SHIPPABLE_BUILD_DIR/t"

  ci:
    - docker run -t -v /tmp/t:/test jjmerelo/perl6-doccer

What I'm trying to do is to, first, map a build container directory to an external directory, and then do the opposite: map that directory to a Docker directory, test, which is the one that's used inside the directory. I have checked out #2353 and pretty much followed it, but I don't know what happens. In this last case, it looks like it's simply not running the ci phase

@a-murphy
Copy link

The ci section isn't running because git_sync has already failed. Unfortunately, git clone can't clone your repository when there is already something there. Could you mount the directory somewhere other than $SHIPPABLE_BUILD_DIR and then copy your files from that location in the ci step? Or mount $SHIPPABLE_BUILD_DIR in pre_ci_boot instead of $SHIPPABLE_BUILD_DIR/t so the t folder doesn't exist before git clone? The voume mounts don't need to be exactly the same for multiple containers as long as they both contain the part you plan to share between them.

@JJ
Copy link
Author

JJ commented Apr 16, 2018 via email

@JJ
Copy link
Author

JJ commented Apr 17, 2018

I have tried this one, same thing

os:
    - linux

build:
  pre_ci:
    - docker pull jjmerelo/perl6-doccer

  pre_ci_boot:
    options: "-v $SHIPPABLE_BUILD_DIR:$SHIPPABLE_BUILD_DIR"

  ci:
    - docker run -t -v $SHIPPABLE_BUILD_DIR/t:/test jjmerelo/perl6-doccer

@a-murphy
Copy link

That pre_ci_boot section works for me. Do you have a link to a run where it failed?

@manishas
Copy link
Contributor

@JJ do you still need help with this? If yes, can you point us to a failed build?

@JJ
Copy link
Author

JJ commented Apr 23, 2018

Not really. Loosk like Alpine based images do not work. I eventually used custom packages.

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