Repository: getporter/porter
Pull request #2268 (2022-07-29 15:58:51)

Fix allow docker host access
# What does this change
[Fix regression in allow-docker-host-access](https://github.com/getporter/porter/commit/92ae5f3c05a29ddd7b95001527ae2fe8f7807ff3)

I accidentally removed setting allow-docker-host-access from the global
config when the flag was not set in a previous refactoring PR. This
didn't cause the build to fail because there were no regression tests
around that flag.

I've added a regression test for it (hello-test) and at the same time
noticed that the mybuns test bundle had its dependency defined wrong, so
the dependency wasn't running. I fixed that too and updated the mydb
bundle to work when called as a dependency of mybuns.

[Remove check for docker socket with --allow-docker-host-access](https://github.com/getporter/porter/commit/13a7cc547f2ae89c17ececf0060dabaa973a5d19)

We were checking for the existence of the docker socket before allowing
the --allow-docker-host-access to be applied. But Docker treats mounting
the docker socket specially and in some cases, such as on windows or
when connected to a remote docker daemon, it won't be present locally.

I'm removing the check and if there is a problem with granting access to
the docker socket, we'll find out when Docker returns an error when we
start the container.

[Fix injecting bundle dependnecy on windows](https://github.com/getporter/porter/pull/2268/commits/a2ccb2f87713f899b5684b3f8dfcd701bb28351a)

When we inject a bundle dependency's bundle.json into the invocation image,
we must always use unix file paths. This was causing bundles with
dependencies to fail when run on windows.

# What issue does it fix
Follow-up from #2258 

# Notes for the reviewer
N/A

# Checklist
- [x] Did you write tests?
- [ ] Did you write documentation?
- [ ] Did you change porter.yaml or a storage document record? Update the corresponding schema file.
- [ ] If this is your first pull request, please add your name to the bottom of our [Contributors][contributors] list. Thank you for making Porter better! 🙇‍♀️

# Reviewer Checklist
* Comment with /azp run test-porter-release if a magefile or build script was modified
* Comment with /azp run porter-integration if it's a non-trivial PR

[contributors]: https://getporter.org/src/CONTRIBUTORS.md


Patch:
diff --git a/pkg/cnab/provider/driver.go b/pkg/cnab/provider/driver.go
index 71a03a5f..fd04ee2f 100644
--- a/pkg/cnab/provider/driver.go
+++ b/pkg/cnab/provider/driver.go
@@ -61,12 +61,6 @@ func (r *Runtime) newDriver(driverName string, args ActionArguments) (driver.Dri
 }
 
 func (r *Runtime) dockerDriverWithHostAccess(config cnab.Docker) (driver.Driver, error) {
-	const dockerSock = "/var/run/docker.sock"
-
-	if exists, _ := r.FileSystem.Exists(dockerSock); !exists {
-		return nil, fmt.Errorf("allow-docker-host-access was specified but could not detect a local docker daemon running by checking for %s", dockerSock)
-	}
-
 	d := &docker.Driver{}
 
 	// Run the container with privileged access if necessary
diff --git a/pkg/config/datastore.go b/pkg/config/datastore.go
index 8038cad1..d655d145 100644
--- a/pkg/config/datastore.go
+++ b/pkg/config/datastore.go
@@ -28,8 +28,19 @@ type Data struct {
 
 	// RuntimeDriver is the driver to use when executing bundles.
 	// Available values are: docker, kubernetes.
+	// It is both a global variable and a command flag because some of our commands, like porter installation apply,
+	// do not expose all the bundle execution flags. This allows us to later manually use the global config value
+	// to ensure that the global config value works even for those commands.
 	RuntimeDriver string `mapstructure:"runtime-driver"`
 
+	// AllowDockerHostAccess grants bundles access to the underlying docker host
+	// upon which it is running so that it can do things like build and run containers.
+	// It's a security risk.
+	// It is both a global variable and a command flag because some of our commands, like porter installation apply,
+	// do not expose all the bundle execution flags. This allows us to later manually use the global config value
+	// to ensure that the global config value works even for those commands.
+	AllowDockerHostAccess bool `mapstructure:"allow-docker-host-access"`
+
 	// DefaultStoragePlugin is the storage plugin to use when no named storage is specified.
 	DefaultStoragePlugin string `mapstructure:"default-storage-plugin"`
 
diff --git a/pkg/porter/lifecycle.go b/pkg/porter/lifecycle.go
index 87bc83e7..a2ec407f 100644
--- a/pkg/porter/lifecycle.go
+++ b/pkg/porter/lifecycle.go
@@ -197,9 +197,13 @@ func (o *BundleExecutionOptions) combineParameters(c *portercontext.Context) map
 
 // defaultDriver supplies the default driver if none is specified
 func (o *BundleExecutionOptions) defaultDriver(p *Porter) {
+	//
 	// When you run porter installation apply, there are some settings from porter install
-	// that aren't exposed as flags. This allows the user to set them in the config file
-	// and we will use them before running the bundle.
+	// that aren't exposed as flags (like driver and allow-docker-host-access).
+	// This allows the user to set them in the config file and we will use them before running the bundle.
+	//
+
+	// Apply global config to the --driver flag
 	if o.Driver == "" {
 		// We have both porter build --driver, and porter install --driver
 		// So in the config file it's named build-driver and runtime-driver
@@ -207,6 +211,12 @@ func (o *BundleExecutionOptions) defaultDriver(p *Porter) {
 		// file setting if they didn't specify a flag.
 		o.Driver = p.Data.RuntimeDriver
 	}
+
+	// Apply global config to the --allow-docker-host-access flag
+	if !o.AllowDockerHostAccess {
+		// Only apply the config setting if they didn't specify the flag (i.e. it's porter installation apply which doesn't have that flag)
+		o.AllowDockerHostAccess = p.Config.Data.AllowDockerHostAccess
+	}
 }
 
 // validateDriver validates that the provided driver is supported by Porter
diff --git a/pkg/runtime/dependencies.go b/pkg/runtime/dependencies.go
index 114240d7..5646ab7d 100644
--- a/pkg/runtime/dependencies.go
+++ b/pkg/runtime/dependencies.go
@@ -2,7 +2,7 @@ package runtime
 
 import (
 	"fmt"
-	"path/filepath"
+	"path"
 
 	"get.porter.sh/porter/pkg/portercontext"
 )
@@ -12,7 +12,8 @@ const (
 )
 
 func GetDependencyDefinitionPath(alias string) string {
-	return filepath.Join(BundleDependenciesDir, alias, "bundle.json")
+	// Must be a unix path
+	return path.Join(BundleDependenciesDir, alias, "bundle.json")
 }
 
 func GetDependencyDefinition(c *portercontext.Context, alias string) ([]byte, error) {


Test patch:
diff --git a/pkg/cnab/config-adapter/testdata/mybuns.bundle.json b/pkg/cnab/config-adapter/testdata/mybuns.bundle.json
index 0426c817..bf5d6953 100644
--- a/pkg/cnab/config-adapter/testdata/mybuns.bundle.json
+++ b/pkg/cnab/config-adapter/testdata/mybuns.bundle.json
@@ -145,9 +145,23 @@
   },
   "requiredExtensions": [
     "sh.porter.file-parameters",
-    "io.cnab.parameter-sources"
+    "io.cnab.dependencies",
+    "io.cnab.parameter-sources",
+    "io.cnab.docker"
   ],
   "custom": {
+    "io.cnab.dependencies": {
+      "sequence": [
+        "db"
+      ],
+      "requires": {
+        "db": {
+          "name": "db",
+          "bundle": "localhost:5000/mydb:v0.1.0"
+        }
+      }
+    },
+    "io.cnab.docker": null,
     "io.cnab.parameter-sources": {
       "porter-state": {
         "priority": [
@@ -167,7 +181,7 @@
           "version": "v1.2.3"
         }
       },
-      "manifest": "IyBUaGlzIGlzIGEgdGVzdCBidW5kbGUgdGhhdCBtYWtlcyBubyBsb2dpY2FsIHNlbnNlLCBidXQgaXQgZG9lcyBleGVyY2lzZSBsb3RzIG9mIGRpZmZlcmVudCBidW5kbGUgZmVhdHVyZXMKCnNjaGVtYVZlcnNpb246IDEuMC4wCm5hbWU6IG15YnVucwp2ZXJzaW9uOiAwLjEuMgpkZXNjcmlwdGlvbjogIkEgdmVyeSB0aG9yb3VnaCB0ZXN0IGJ1bmRsZSIKcmVnaXN0cnk6IGxvY2FsaG9zdDo1MDAwCmRvY2tlcmZpbGU6IERvY2tlcmZpbGUudG1wbAoKY3JlZGVudGlhbHM6CiAgLSBuYW1lOiB1c2VybmFtZQogICAgZGVzY3JpcHRpb246ICJUaGUgbmFtZSB5b3Ugd2FudCBvbiB0aGUgYXVkaXQgbG9nIgogICAgZW52OiBVU0VSTkFNRQoKcGFyYW1ldGVyczoKICAtIG5hbWU6IGxvZ19sZXZlbAogICAgZGVzY3JpcHRpb246ICJIb3cgdW5oZWxwZnVsIHdvdWxkIHlvdSBsaWtlIHRoZSBsb2dzIHRvIGJlPyIKICAgIHR5cGU6IGludGVnZXIKICAgIG1pbmltdW06IDEKICAgIG1heGltdW06IDExCiAgICBkZWZhdWx0OiA1CiAgLSBuYW1lOiBwYXNzd29yZAogICAgZGVzY3JpcHRpb246ICJUaGUgc3VwZXIgc2VjcmV0IGRhdGEiCiAgICB0eXBlOiBzdHJpbmcKICAgIGRlZmF1bHQ6ICJkZWZhdXRsLXNlY3JldCIKICAgIHNlbnNpdGl2ZTogdHJ1ZQogIC0gbmFtZTogY2hhb3NfbW9ua2V5CiAgICBkZXNjcmlwdGlvbjogIlNldCB0byB0cnVlIHRvIG1ha2UgdGhlIGJ1bmRsZSBmYWlsIgogICAgdHlw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gIGNvbW1hbmQ6IGNhdAogICAgICBhcmd1bWVudHM6CiAgICAgICAgLSBtYWdpYy50eHQKCmJvb206CiAgLSBleGVjOgogICAgICBkZXNjcmlwdGlvbjogIm1vZGlmeSB0aGUgYnVuZGxlIGluIHVua25vd2FibGUgd2F5cyIKICAgICAgY29tbWFuZDogZWNobwogICAgICBhcmd1bWVudHM6CiAgICAgICAgLSAiWU9MTyIKCnVwZ3JhZGU6CiAgLSBleGVjOgogICAgICBkZXNjcmlwdGlvbjogIkVuc3VyZSBtYWdpYyIKICAgICAgY29tbWFuZDogLi9oZWxwZXJzLnNoCiAgICAgIGFyZ3VtZW50czoKICAgICAgICAtIGVuc3VyZU1hZ2ljCiAgLSBleGVjOgogICAgICBkZXNjcmlwdGlvbjogInVwZ3JhZGUiCiAgICAgIGNvbW1hbmQ6IC4vaGVscGVycy5zaAogICAgICBhcmd1bWVudHM6CiAgICAgICAgLSB1cGdyYWRlCiAgICAgIG91dHB1dHM6CiAgICAgICAgLSBuYW1lOiBteWxvZ3MKICAgICAgICAgIHJlZ2V4OiAiKC4qKSIKICAtIGV4ZWM6CiAgICAgIGRlc2NyaXB0aW9uOiAicm9sbCB0aGUgZGljZSB3aXRoIHlvdXIgY2hhb3MgbW9ua2V5IgogICAgICBjb21tYW5kOiAuL2hlbHBlcnMuc2gKICAgICAgYXJndW1lbnRzOgogICAgICAgIC0gY2hhb3NfbW9ua2V5CiAgICAgICAgLSAkeyBidW5kbGUucGFyYW1ldGVycy5jaGFvc19tb25rZXkgfQogICAgICBvdXRwdXRzOgogICAgICAgIC0gbmFtZTogcmVzdWx0CiAgICAgICAgICByZWdleDogIiguKikiCgp1bmluc3RhbGw6CiAgLSBleGVjOgogICAgICBkZXNjcmlwdGlvbjogIkVuc3VyZSBNYWdpYyIKICAgICAgY29tbWFuZDogLi9oZWxwZXJzLnNoCiAgICAgIGFyZ3VtZW50czoKICAgICAgICAtIGVuc3VyZU1hZ2ljCiAgLSBleGVjOgogICAgICBkZXN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0cnVlCiAgICBtb2RpZmllczogZmFsc2UKICBzdGF0dXM6CiAgICBkZXNjcmlwdGlvbjogIlByaW50IHRoZSBpbnN0YWxsYXRpb24gc3RhdHVzIgogICAgc3RhdGVsZXNzOiBmYWxzZQogICAgbW9kaWZpZXM6IGZhbHNlCgppbnN0YWxsOgogIC0gZXhlYzoKICAgICAgZGVzY3JpcHRpb246ICJDaGVjayB0aGUgZG9ja2VyIHNvY2tldCIKICAgICAgY29tbWFuZDogc3RhdAogICAgICBhcmd1bWVudHM6CiAgICAgICAgLSAvdmFyL3J1bi9kb2NrZXIuc29jawogIC0gZXhlYzoKICAgICAgZGVzY3JpcHRpb246ICJMZXQncyBtYWtlIHNvbWUgbWFnaWMiCiAgICAgIGNvbW1hbmQ6IC4vaGVscGVycy5zaAogICAgICBhcmd1bWVudHM6CiAgICAgICAgLSBtYWtlTWFnaWMKICAgICAgICAtICIkeyBidW5kbGUuY3JlZGVudGlhbHMudXNlcm5hbWUgfSBpcyBhIHVuaWNvcm4gd2l0aCAkeyBidW5kbGUucGFyYW1ldGVycy5wYXNzd29yZCB9IHNlY3JldC4iCiAgLSBleGVjOgogICAgICBkZXNjcmlwdGlvbjogImluc3RhbGwiCiAgICAgIGNvbW1hbmQ6IC4vaGVscGVycy5zaAogICAgICBhcmd1bWVudHM6CiAgICAgICAgLSBpbnN0YWxsCiAgICAgIG91dHB1dHM6CiAgICAgICAgLSBuYW1lOiBteWxvZ3MKICAgICAgICAgIHJlZ2V4OiAiKC4qKSIKICAtIGV4ZWM6CiAgICAgIGRlc2NyaXB0aW9uOiAicm9sbCB0aGUgZGljZSB3aXRoIHlvdXIgY2hhb3MgbW9ua2V5IgogICAgICBjb21tYW5kOiAuL2hlbHBlcnMuc2gKICAgICAgYXJndW1lbnRzOgogICAgICAgIC0gY2hhb3NfbW9ua2V5CiAgICAgICAgLSAkeyBidW5kbGUucGFyYW1ldGVycy5jaGFvc19tb25rZXkgfQogICAgICBvdXRwdXRzOgogICAgICAgIC0gbmFtZTogcmVzdWx0CiAgICAgICAgICByZWdleDogIiguKikiCgoKZHJ5LXJ1bjoKICAtIGV4ZWM6CiAgICAgIGRlc2NyaXB0aW9uOiAiQ2hlY2sgc29tZSB0aGluZ3MiCiAgICAgIGNvbW1hbmQ6IGVjaG8KICAgICAgYXJndW1lbnRzOgogICAgICAgIC0gIkFsbCBjbGVhciEiCgpzdGF0dXM6CiAgLSBleGVjOgogICAgICBkZXNjcmlwdGlvbjogIlByaW50IGNvbmZpZyIKICAgICAgY29tbWFuZDogY2F0CiAgICAgIGFyZ3VtZW50czoKICAgICAgICAtICR7IGJ1bmRsZS5wYXJhbWV0ZXJzLmNmZyB9CiAgLSBleGVjOgogICAgICBkZXNjcmlwdGlvbjogIlByaW50IG1hZ2ljIgogICAgICBjb21tYW5kOiBjYXQKICAgICAgYXJndW1lbnRzOgogICAgICAgIC0gbWFnaWMudHh0Cgpib29tOgogIC0gZXhlYzoKICAgICAgZGVzY3JpcHRpb246ICJtb2RpZnkgdGhlIGJ1bmRsZSBpbiB1bmtub3dhYmxlIHdheXMiCiAgICAgIGNvbW1hbmQ6IGVjaG8KICAgICAgYXJndW1lbnRzOgogICAgICAgIC0gIllPTE8iCgp1cGdyYWRlOgogIC0gZXhlYzoKICAgICAgZGVzY3JpcHRpb246ICJFbnN1cmUgbWFnaWMiCiAgICAgIGNvbW1hbmQ6IC4vaGVscGVycy5zaAogICAgICBhcmd1bWVudHM6CiAgICAgICAgLSBlbnN1cmVNYWdpYwogIC0gZXhlYzoKICAgICAgZGVzY3JpcHRpb246ICJ1cGdyYWRlIgogICAgICBjb21tYW5kOiAuL2hlbHBlcnMuc2gKICAgICAgYXJndW1lbnRzOgogICAgICAgIC0gdXBncmFkZQogICAgICBvdXRwdXRzOgogICAgICAgIC0gbmFtZTogbXlsb2dzCiAgICAgICAgICByZWdleDogIiguKikiCiAgLSBleGVjOgogICAgICBkZXNjcmlwdGlvbjogInJvbGwgdGhlIGRpY2Ugd2l0aCB5b3VyIGNoYW9zIG1vbmtleSIKICAgICAgY29tbWFuZDogLi9oZWxwZXJzLnNoCiAgICAgIGFyZ3VtZW50czoKICAgICAgICAtIGNoYW9zX21vbmtleQogICAgICAgIC0gJHsgYnVuZGxlLnBhcmFtZXRlcnMuY2hhb3NfbW9ua2V5IH0KICAgICAgb3V0cHV0czoKICAgICAgICAtIG5hbWU6IHJlc3VsdAogICAgICAgICAgcmVnZXg6ICIoLiopIgoKdW5pbnN0YWxsOgogIC0gZXhlYzoKICAgICAgZGVzY3JpcHRpb246ICJFbnN1cmUgTWFnaWMiCiAgICAgIGNvbW1hbmQ6IC4vaGVscGVycy5zaAogICAgICBhcmd1bWVudHM6CiAgICAgICAgLSBlbnN1cmVNYWdpYwogIC0gZXhlYzoKICAgICAgZGVzY3JpcHRpb246ICJ1bmluc3RhbGwiCiAgICAgIGNvbW1hbmQ6IC4vaGVscGVycy5zaAogICAgICBhcmd1bWVudHM6CiAgICAgICAgLSB1bmluc3RhbGwKICAtIGV4ZWM6CiAgICAgIGRlc2NyaXB0aW9uOiAicm9sbCB0aGUgZGljZSB3aXRoIHlvdXIgY2hhb3MgbW9ua2V5IgogICAgICBjb21tYW5kOiAuL2hlbHBlcnMuc2gKICAgICAgYXJndW1lbnRzOgogICAgICAgIC0gY2hhb3NfbW9ua2V5CiAgICAgICAgLSAkeyBidW5kbGUucGFyYW1ldGVycy5jaGFvc19tb25rZXkgfQo=",
       "version": "",
       "commit": ""
     },
diff --git a/pkg/cnab/provider/driver_test.go b/pkg/cnab/provider/driver_test.go
index be6f2cbb..32f5243b 100644
--- a/pkg/cnab/provider/driver_test.go
+++ b/pkg/cnab/provider/driver_test.go
@@ -59,21 +59,6 @@ func TestNewDriver_Docker(t *testing.T) {
 		assert.EqualError(t, err, "allow-docker-host-access was enabled, but the driver is custom-driver")
 	})
 
-	t.Run("docker with host access, missing docker daemon", func(t *testing.T) {
-		t.Parallel()
-
-		r := NewTestRuntime(t)
-		r.MockGetDockerGroupId()
-		defer r.Close()
-
-		args := ActionArguments{
-			AllowDockerHostAccess: true,
-		}
-
-		_, err := r.newDriver(DriverNameDocker, args)
-		assert.EqualError(t, err, "allow-docker-host-access was specified but could not detect a local docker daemon running by checking for /var/run/docker.sock")
-	})
-
 	t.Run("docker with host access, default config", func(t *testing.T) {
 		t.Parallel()
 
diff --git a/pkg/porter/lifecycle_test.go b/pkg/porter/lifecycle_test.go
index f15b8611..cafbdf3f 100644
--- a/pkg/porter/lifecycle_test.go
+++ b/pkg/porter/lifecycle_test.go
@@ -185,14 +185,54 @@ func TestBundleActionOptions_Validate(t *testing.T) {
 }
 
 func TestBundleExecutionOptions_defaultDriver(t *testing.T) {
-	p := NewTestPorter(t)
-	defer p.Close()
+	t.Run("no driver specified", func(t *testing.T) {
+		p := NewTestPorter(t)
+		defer p.Close()
 
-	opts := NewBundleExecutionOptions()
+		opts := NewBundleExecutionOptions()
+
+		opts.defaultDriver(p.Porter)
+
+		assert.Equal(t, "docker", opts.Driver, "expected the driver value to default to docker")
+	})
 
-	opts.defaultDriver(p.Porter)
+	t.Run("driver flag set", func(t *testing.T) {
+		p := NewTestPorter(t)
+		defer p.Close()
+
+		opts := NewBundleExecutionOptions()
+		opts.Driver = "kubernetes"
+
+		opts.defaultDriver(p.Porter)
+
+		assert.Equal(t, "kubernetes", opts.Driver, "expected the --driver flag value to be used")
+	})
+
+	t.Run("allow docker host access defaults to config", func(t *testing.T) {
+		p := NewTestPorter(t)
+		defer p.Close()
+		p.Config.Data.AllowDockerHostAccess = true
+
+		opts := NewBundleExecutionOptions()
+
+		opts.defaultDriver(p.Porter)
+
+		assert.True(t, opts.AllowDockerHostAccess, "expected allow-docker-host-access to inherit the value from the config file when the flag isn't specified")
+	})
+
+	t.Run("allow docker host access flag set", func(t *testing.T) {
+		p := NewTestPorter(t)
+		defer p.Close()
+		p.Config.Data.AllowDockerHostAccess = false
+
+		opts := NewBundleExecutionOptions()
+		opts.AllowDockerHostAccess = true
+
+		opts.defaultDriver(p.Porter)
+
+		assert.True(t, opts.AllowDockerHostAccess, "expected allow-docker-host-access to use the flag value when specified")
+	})
 
-	assert.Equal(t, "docker", opts.Driver)
 }
 
 func TestBundleExecutionOptions_ParseParamSets(t *testing.T) {
diff --git a/tests/smoke/desiredstate_test.go b/tests/smoke/desiredstate_test.go
index 6adc21f5..3352c05f 100644
--- a/tests/smoke/desiredstate_test.go
+++ b/tests/smoke/desiredstate_test.go
@@ -61,6 +61,7 @@ func TestDesiredState(t *testing.T) {
 	})
 
 	// Import an installation, since the file is missing a namespace, it should use the --namespace flag value
+	// This also tests out that --allow-docker-host-access is being defaulted properly from the Porter config file
 	output, stderr, err := test.RunPorter("installation", "apply", "mybuns.yaml", "--namespace", "operator")
 	require.NoError(t, err)
 	require.Contains(t, stderr, "The installation is out-of-sync, running the install action")
diff --git a/tests/smoke/hello_test.go b/tests/smoke/hello_test.go
index d762f645..abbc0a6a 100644
--- a/tests/smoke/hello_test.go
+++ b/tests/smoke/hello_test.go
@@ -67,12 +67,14 @@ func TestHelloBundle(t *testing.T) {
 	// Search by namespace
 	installations, err := test.ListInstallations(false, "test", "", nil)
 	require.NoError(t, err)
-	require.Len(t, installations, 1, "expected one installation in the test namespace")
+	require.Len(t, installations, 2, "expected two installations in the test namespace: mybuns-db and mybuns")
+	require.Equal(t, "mybuns-db", installations[0].Name)
+	require.Equal(t, "mybuns", installations[1].Name)
 
 	// Search by name
 	installations, err = test.ListInstallations(true, "", testdata.MyBuns, nil)
 	require.NoError(t, err)
-	require.Len(t, installations, 2, "expected two installations named mybuns")
+	require.Len(t, installations, 4, "expected four installations with mybuns in the name")
 
 	// Search by label
 	installations, err = test.ListInstallations(true, "", "", []string{"test=true"})
@@ -100,8 +102,9 @@ func TestHelloBundle(t *testing.T) {
 	test.RequirePorter("uninstall", testdata.MyBuns, "--namespace", test.CurrentNamespace(), "-c=mybuns")
 	displayInstallations, err := test.ListInstallations(false, test.CurrentNamespace(), testdata.MyBuns, nil)
 	require.NoError(t, err, "List installations failed")
-	require.Len(t, displayInstallations, 1, "expected the installation to still be returned by porter list even though it's uninstalled")
-	require.NotEmpty(t, displayInstallations[0].Status.Uninstalled, "expected the installation to be flagged as uninstalled")
+	require.Len(t, displayInstallations, 2, "expected the installations to still be returned by porter list even though it's uninstalled")
+	require.NotEmpty(t, displayInstallations[0].Status.Uninstalled, "expected the installations to be flagged as uninstalled")
+	require.NotEmpty(t, displayInstallations[1].Status.Uninstalled, "expected the installations to be flagged as uninstalled")
 
 	test.RequirePorter("installation", "delete", testdata.MyBuns, "--namespace", test.CurrentNamespace())
 	test.RequireInstallationNotFound(test.CurrentNamespace(), testdata.MyBuns)
diff --git a/tests/testdata/config/config.yaml b/tests/testdata/config/config.yaml
index ace9f923..f7625348 100644
--- a/tests/testdata/config/config.yaml
+++ b/tests/testdata/config/config.yaml
@@ -4,6 +4,9 @@ debug-plugins: true
 default-storage: testdb
 default-secrets-plugin: filesystem
 
+# The test bundle, mybuns, requires docker
+allow-docker-host-access: true
+
 logs:
   enabled: true
   level: debug
diff --git a/tests/testdata/mybuns/porter.yaml b/tests/testdata/mybuns/porter.yaml
index 3b458b7a..875099d5 100644
--- a/tests/testdata/mybuns/porter.yaml
+++ b/tests/testdata/mybuns/porter.yaml
@@ -7,6 +7,9 @@ description: "A very thorough test bundle"
 registry: localhost:5000
 dockerfile: Dockerfile.tmpl
 
+required:
+  - docker
+
 credentials:
   - name: username
     description: "The name you want on the audit log"
@@ -50,7 +53,7 @@ state:
     path: magic.txt
 
 dependencies:
-  required:
+  requires:
     - name: db
       bundle:
         reference: "localhost:5000/mydb:v0.1.0"
@@ -71,6 +74,11 @@ customActions:
     modifies: false
 
 install:
+  - exec:
+      description: "Check the docker socket"
+      command: stat
+      arguments:
+        - /var/run/docker.sock
   - exec:
       description: "Let's make some magic"
       command: ./helpers.sh
diff --git a/tests/testdata/mydb/porter.yaml b/tests/testdata/mydb/porter.yaml
index 2015adc0..53cd97fc 100644
--- a/tests/testdata/mydb/porter.yaml
+++ b/tests/testdata/mydb/porter.yaml
@@ -19,6 +19,12 @@ outputs:
 mixins:
   - exec
 
+dry-run:
+  - exec:
+      command: echo
+      arguments:
+        - "ready to install mydb"
+
 install:
   - exec:
       command: echo
@@ -29,6 +35,12 @@ install:
       arguments:
         - "database: ${ bundle.parameters.database }"
 
+status:
+  - exec:
+      command: echo
+      arguments:
+        - "mydb is looking great!"
+
 upgrade:
   - exec:
       command: echo