Skip to content

Commit 67e6777

Browse files
authored
use mount flag to force consistent selinux labelling between host/guest on generated files (#1060)
Signed-off-by: Jordan <[email protected]> Signed-off-by: Jordan <[email protected]>
1 parent f2a371f commit 67e6777

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

alpha/veneer/composite/builder.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (bb *BasicBuilder) Build(dir string, vd VeneerDefinition) error {
8282
"run",
8383
"--rm",
8484
"-v",
85-
fmt.Sprintf("%s:%s", bb.builderCfg.CurrentDirectory, bb.builderCfg.ContainerCfg.WorkingDir),
85+
fmt.Sprintf("%s:%s:Z", bb.builderCfg.CurrentDirectory, bb.builderCfg.ContainerCfg.WorkingDir),
8686
bb.builderCfg.ContainerCfg.BaseImage,
8787
"alpha",
8888
"render-veneer",
@@ -141,7 +141,7 @@ func (sb *SemverBuilder) Build(dir string, vd VeneerDefinition) error {
141141
"run",
142142
"--rm",
143143
"-v",
144-
fmt.Sprintf("%s:%s", sb.builderCfg.CurrentDirectory, sb.builderCfg.ContainerCfg.WorkingDir),
144+
fmt.Sprintf("%s:%s:Z", sb.builderCfg.CurrentDirectory, sb.builderCfg.ContainerCfg.WorkingDir),
145145
sb.builderCfg.ContainerCfg.BaseImage,
146146
"alpha",
147147
"render-veneer",
@@ -200,7 +200,7 @@ func (rb *RawBuilder) Build(dir string, vd VeneerDefinition) error {
200200
"run",
201201
"--rm",
202202
"-v",
203-
fmt.Sprintf("%s:%s", rb.builderCfg.CurrentDirectory, rb.builderCfg.ContainerCfg.WorkingDir),
203+
fmt.Sprintf("%s:%s:Z", rb.builderCfg.CurrentDirectory, rb.builderCfg.ContainerCfg.WorkingDir),
204204
"--entrypoint=cat", // This assumes that the `cat` command is available in the container -- Should we also build a `... render-veneer raw` command to ensure consistent operation? Does OPM already have a way to render a raw FBC?
205205
rb.builderCfg.ContainerCfg.BaseImage,
206206
path.Join(rb.builderCfg.ContainerCfg.WorkingDir, rawConfig.Input))
@@ -281,7 +281,7 @@ func validate(containerCfg ContainerConfig, dir string) error {
281281
"run",
282282
"--rm",
283283
"-v",
284-
fmt.Sprintf("%s:%s", dir, containerCfg.WorkingDir),
284+
fmt.Sprintf("%s:%s:Z", dir, containerCfg.WorkingDir),
285285
containerCfg.BaseImage,
286286
"validate",
287287
containerCfg.WorkingDir)

0 commit comments

Comments
 (0)