aboutsummaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/storage.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-23 10:17:59 -0400
committerGitHub <noreply@github.com>2022-05-23 10:17:59 -0400
commit7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5 (patch)
tree2c37b0bf4e687954b8d8f82dcf8e3021ec6fdedc /pkg/specgen/generate/storage.go
parentbe255287c929999ff018d0b8319e644b4ea77064 (diff)
parent633d5f1f8b8844d6e2fb3e2593768360c889ed76 (diff)
downloadpodman-7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5.tar.gz
podman-7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5.tar.bz2
podman-7d00b0ea0d0c53ddba8d6aebdbce2f167aceccc5.zip
Merge pull request #14281 from vrothberg/fix-14251
fix --init with /dev bind mount
Diffstat (limited to 'pkg/specgen/generate/storage.go')
-rw-r--r--pkg/specgen/generate/storage.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/specgen/generate/storage.go b/pkg/specgen/generate/storage.go
index f30fc4671..0a4d03780 100644
--- a/pkg/specgen/generate/storage.go
+++ b/pkg/specgen/generate/storage.go
@@ -20,9 +20,7 @@ import (
"github.com/sirupsen/logrus"
)
-var (
- errDuplicateDest = errors.Errorf("duplicate mount destination")
-)
+var errDuplicateDest = errors.Errorf("duplicate mount destination")
// Produce final mounts and named volumes for a container
func finalizeMounts(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runtime, rtc *config.Config, img *libimage.Image) ([]spec.Mount, []*specgen.NamedVolume, []*specgen.OverlayVolume, error) {
@@ -359,7 +357,7 @@ func getVolumesFrom(volumesFrom []string, runtime *libpod.Runtime) (map[string]s
// This does *NOT* modify the container command - that must be done elsewhere.
func addContainerInitBinary(s *specgen.SpecGenerator, path string) (spec.Mount, error) {
mount := spec.Mount{
- Destination: "/dev/init",
+ Destination: define.ContainerInitPath,
Type: define.TypeBind,
Source: path,
Options: []string{define.TypeBind, "ro"},