Skip to content
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

Pass DefaultMountsFile to podman build #9094

Merged
merged 1 commit into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/podman/images/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,10 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil
Ulimit: flags.Ulimit,
Volumes: flags.Volumes,
},
Compression: compression,
ConfigureNetwork: networkPolicy,
ContextDirectory: contextDir,
// DefaultMountsFilePath: FIXME: this requires global flags to be working!
Compression: compression,
ConfigureNetwork: networkPolicy,
ContextDirectory: contextDir,
DefaultMountsFilePath: containerConfig.Containers.DefaultMountsFile,
Devices: flags.Devices,
DropCapabilities: flags.CapDrop,
Err: stderr,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ USER bin`
})

It("podman run with secrets", func() {
SkipIfRemote("--default-mount-file option is not supported in podman-remote")
SkipIfRemote("--default-mounts-file option is not supported in podman-remote")
containersDir := filepath.Join(podmanTest.TempDir, "containers")
err := os.MkdirAll(containersDir, 0755)
Expect(err).To(BeNil())
Expand Down
6 changes: 2 additions & 4 deletions test/system/070-build.bats
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ ADD mycmd /bin/mydefaultcmd
RUN chmod 755 /bin/mydefaultcmd
RUN chown 2:3 /bin/mydefaultcmd

#FIXME FIXME FIXME: enable if/when 'podman build' passes mounts.conf to buildah
#RUN $CAT_SECRET
RUN $CAT_SECRET

CMD ["/bin/mydefaultcmd","$s_echo"]
EOF
Expand All @@ -201,8 +200,7 @@ EOF
local iid="${lines[-1]}"

# Make sure 'podman build' had the secret mounted
#FIXME FIXME: enable if/when 'podman build' passes mounts.conf to buildah
#is "$output" ".*$secret_contents.*" "podman build has /run/secrets mounted"
is "$output" ".*$secret_contents.*" "podman build has /run/secrets mounted"

if is_remote; then
ENVHOST=""
Expand Down