Introduce new docker strategy for build container
Compare changes
Files
7- Steve Xuereb authored
The way the build script is executing on the build container is by starting the container with the script as ps1, as soon as the script is done, the container exists. Follow the same flow the kubernetes executor, where the build container is started in detached mode and the build script are executed on top of the running build container. This is done so interactive web terminal have the same behavior as kubernetes, where even after the main script is done the user stays connected to the web terminal.
+ 153
− 26
@@ -28,7 +28,7 @@ import (
@@ -837,25 +837,8 @@ func (e *executor) getValidContainers(containers []string) []string {
@@ -867,6 +850,42 @@ func (e *executor) createContainer(containerType string, imageDefinition common.
@@ -997,7 +1016,47 @@ func (e *executor) waitForContainer(id string) error {
@@ -1008,14 +1067,14 @@ func (e *executor) watchContainer(ctx context.Context, id string, input io.Reade
@@ -1046,16 +1105,84 @@ func (e *executor) watchContainer(ctx context.Context, id string, input io.Reade