-
Notifications
You must be signed in to change notification settings - Fork 80
Find an alternative to bind mounts for STI #263
Comments
Are we committed to supporting both DIND and host-docker? I sort of assumed we'd reach a point where one clearly won out. |
We don't have to do anything right now to support DIND. @smarterclayton has asked us to focus on host-docker but (afaik) still support DIND. Right now host-docker doesn't work, and if we've got to do something to fix this, it would be nice to avoid bind mounts. If we go with some sort of streaming approach, we'll need to add streaming support for builds (and @pmorie and @ironcladlou and I have discussed a couple of ways to do that). |
@ncdc can you elaborate on what is "fragile" about them? The security+unique naming issues on the host directory? or something else? |
@bparees a few things:
|
ok, I know @mfojtik had done a lot of digging on tar/streaming into containers, we should get his thoughts/experiences. |
Food for thought - we could use 1 container in a pod to accept the stream (a small image that is capable of decoding tar or whatever) and place the decoded contents into a shared volume. The STI container would also use the shared volume, polling for the existence of some "ready" marker file in the shared volume. Once it sees it, it could do its thing. This way, builder images don't have to have tar installed or know how to decode the stream. |
Sounds good, try it.
|
@bparees it was me :) So what I did.. I used
|
@VojtechVitek @bparees I did the self-contained builder, where I streamed artifacts from previous build to a new build (ran |
I randomly came across this project made by the Docker employee last Friday: ..and seems like he's doing basically the same what I did (streaming tar data from/to containers) but completely in Go, using "archive/tar" Writer/Reader (https://github.com/discordianfish/docker-backup/blob/master/backup/backup.go#L51). |
fyi @csrwng |
STI creates a temporary working directory and places custom scripts, default scripts, source code, and saved artifacts in it. It uses bind mounts to bind each of these directories into the build container. Bind mounts are fragile when trying to support both host-docker and docker-in-docker builds. We should try to find an alternative to bind mounts.
1 possible option is to have STI encode everything that is currently bind mounted and stream it into the build container. A possible encoding could be tar. The build container would have to support being able to decode the stream, meaning all builder images would need to have the necessary tooling installed to do the decoding.
@bparees @smarterclayton @pmorie
The text was updated successfully, but these errors were encountered: