-
Notifications
You must be signed in to change notification settings - Fork 23
Add withCopyFileToContainer to copy files to containers
#62
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
Conversation
| dockerCreate = | ||
| concat $ | ||
| [["run"]] | ||
| ++ [["--detach"]] |
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.
Note that the --detach flag isn't supported by docker start, because this is the default behavior
alexbiehl
left a comment
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.
Good stuff!
|
If you rebase your changes we should get a working CI again. |
|
I also updated the Changelog, assuming that the next release will be 0.5.2.0 |
alexbiehl
left a comment
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.
Good stuff!
|
Thanks for the quick turnaround :) |
|
@alexbiehl Would you be able to create a new release, 0.5.2.0, to deploy this change? Alternatively, I see I'm allowed to upload releases on Hackage, but I'm not allowed to commit to this repo directly. If you prefer, you could give me permission to commit on the master branch (so I can update the cabal file) and I can create a release myself |
This PR adds a new function,
withCopyFileToContainer, which allows to, well, copy files to a container. This is very useful, for example, when initializing a Postgres database.In order to copy files to the container, the
runfunction was modified to usedocker create+docker startrather thandocker run. This allows to get the container ID early (fromdocker create), and thus copy files usingdocker cpbefore callingdocker start.