From 11c5004fcbe963aae9e7a48e3884018d179a1a95 Mon Sep 17 00:00:00 2001 From: Andrew Valleteau Date: Tue, 24 Sep 2024 12:05:22 +0200 Subject: [PATCH] fix: disable security opts for db test on bitbucket runner (#2705) hotfix(cli): disable security opts for db test on bitbucket runner --- internal/utils/docker.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/utils/docker.go b/internal/utils/docker.go index 80106583b..6264c4056 100644 --- a/internal/utils/docker.go +++ b/internal/utils/docker.go @@ -287,6 +287,9 @@ func DockerStart(ctx context.Context, config container.Config, hostConfig contai // Skip named volume for BitBucket pipeline if os.Getenv("BITBUCKET_CLONE_DIR") != "" { hostConfig.Binds = binds + // Bitbucket doesn't allow for --security-opt option to be set + // https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/#Full-list-of-restricted-commands + hostConfig.SecurityOpt = nil } else { // Create named volumes with labels for _, name := range sources {