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

Allow configuring image name (-t) in initial build command #253

Open
Hoishin opened this issue Oct 31, 2019 · 5 comments
Open

Allow configuring image name (-t) in initial build command #253

Hoishin opened this issue Oct 31, 2019 · 5 comments

Comments

@Hoishin
Copy link

Hoishin commented Oct 31, 2019

Currently the initial docker build command passes -t option with commit hash and cannot be configured. If a repo has multiple dockerfiles and the both are built at the same time, it conflicts the tag name and results in error.

@tboerger
Copy link

That's not true, this plugin is using docker in docker, which isolates the builds.

If you are using the plugin differently it's simply a corner case which is not covered by the intended use case.

@Hoishin
Copy link
Author

Hoishin commented Oct 31, 2019

Mind showing what's the intended way to use it? I'm current setting

volume:
  - /var/run/docker.sock:/var/run/docker.sock

so it shares the docker runtime with the host OS. and I though this was intendend way to use DinD.

@tboerger
Copy link

That's not dind at all. Just remove the volume, than it will properly build and it's working as intended.

@urjitbhatia
Copy link

I ran into this problem too - I am mounting the host docker volume because our image is a heavy build and without it, the plugin will not have an image cache and end up building images every single time. Is there a way to configure that?

@raphendyr
Copy link

I stumbled on this too. We have drone pipeline building set of images to ECR repo (using drone-ecr). To test that pipeline locally, I replace the steps with drone-docker and set daemon_off: true, dry_run: true and mount the socket. This works, except the images are build concurrently and all of them use the image name 00000000, which of course is not unique.

Just using the format <repo>:<commit-sha> should be enough to fix the issue.

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

4 participants