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
Added docs for detach #309
Conversation
|
I think this may be a dupe of #301 |
| image: example/image:latest | ||
| detach: true | ||
|
|
||
| test: # runs parallel to example_image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like for documenting detached, we should use a simpler example, such as starting a mysql server in detached mode. Right now it introduces multiple concepts (detached mode and building and testing docker image) instead of focusing on the single topic of detached mode.
With that being said, I feel like there is a ton of value in having documentation for building, detaching and then testing a container. @tonglil perhaps we could benefit from a subsection of the docs that focuses solely on building, testing and publishing docker containers, since there are a few different methods. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EDIT: we had this documented in a prior version of the docs, but must have slipped through the cracks when we moved documentation sites. See below.
Service containers can also be included in the pipeline section of the Yaml using the detach parameter. This should be used when explicit control over startup order is required.
pipeline: build: image: golang commands: - go get - go build database: image: redis + detach: true test: image: golang commands: - go test
|
Where would you want me to document how to build, detach, and test a container? Btw, FYI, the docker plugin does not support a build separate from a push very well. |
For now I would recommend adding to the FAQ section of the documentation. We can find a more permanent home for the documentation once we do some restructuring.
The docker plugin exists so that you can build and publish images safely using docker in docker, without having to insecurely expose the host machine docker socket. Using the plugin to build an image on the host machine is not a problem this plugin tries to solve. You are probably better off just doing something like this: Note that we try to design plugins to do one thing, and do it well. So if a plugin does not handle your specific use case, you might want to consider creating your own custom plugin. Having many specialized plugins is encouraged, as opposed to having monolith plugins that do everything. |
|
Ok, cool, I'll prob make a plugin for handling the individual docker pipeline steps. |
https://discourse.drone.io/t/drone-event-system/1592/3