Skip to content

Commit 4a272f5

Browse files
authored
Merge pull request #1307 from Shashankft9/label-disable
security opt label disable added
2 parents c7eaf3b + 000c345 commit 4a272f5

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

internal/build/phase_config_provider.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ func WithDaemonAccess(dockerHost string) PhaseConfigProviderOperation {
160160
if bind != "" {
161161
provider.hostConf.Binds = append(provider.hostConf.Binds, bind)
162162
}
163+
if provider.os != "windows" {
164+
provider.hostConf.SecurityOpt = []string{"label=disable"}
165+
}
163166
}
164167
}
165168

internal/build/phase_config_provider_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ func testPhaseConfigProvider(t *testing.T, when spec.G, it spec.S) {
154154

155155
h.AssertEq(t, phaseConfigProvider.ContainerConfig().User, "root")
156156
h.AssertSliceContains(t, phaseConfigProvider.HostConfig().Binds, "/var/run/docker.sock:/var/run/docker.sock")
157+
h.AssertSliceContains(t, phaseConfigProvider.HostConfig().SecurityOpt, "label=disable")
157158
})
158159
})
159160

0 commit comments

Comments
 (0)