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

fix: revert removal of Colima host.docker.internal setting #6031

Merged
merged 6 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions .buildkite/sanetestbot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,4 @@ if command -v ddev >/dev/null && version_gt ${MIN_DDEV_VERSION} ${CURRENT_DDEV_V
exit 4
fi

# Skip nfs check on linux/lima, as we won't run nfs there
if [ ${OSTYPE%%-gnu} != "linux" ] && [ ${DOCKER_TYPE:-nothing} != "lima" ]; then
$(dirname $0)/nfstest.sh
fi

echo "-- testbot $HOSTNAME seems to be set up OK --"
2 changes: 1 addition & 1 deletion cmd/ddev/cmd/debug-nfsmount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// TestDebugNFSMount tries out the `ddev debug nfsmount` command.
// It requires nfsd running of course.
func TestDebugNFSMount(t *testing.T) {
if nodeps.IsWSL2() || dockerutil.IsColima() || dockerutil.IsLima() {
if nodeps.IsWSL2() || dockerutil.IsColima() || dockerutil.IsLima() || dockerutil.IsOrbstack() {
t.Skip("Skipping on WSL2/Lima/Colima since NFS is not used there")
}
assert := asrt.New(t)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ddevapp/ddevapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3707,7 +3707,7 @@ func TestCaptureLogs(t *testing.T) {
// This requires that the test machine must have NFS shares working
// Tests using both app-specific performance_mode: nfs and etc
func TestNFSMount(t *testing.T) {
if nodeps.IsWSL2() || dockerutil.IsColima() || dockerutil.IsLima() {
if nodeps.IsWSL2() || dockerutil.IsColima() || dockerutil.IsLima() || dockerutil.IsOrbstack() {
t.Skip("Skipping on WSL2/Lima/Colima")
}
if nodeps.PerformanceModeDefault == types.PerformanceModeMutagen || nodeps.NoBindMountsDefault {
Expand Down
14 changes: 14 additions & 0 deletions pkg/dockerutil/dockerutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,20 @@ func IsLima() bool {
return false
}

// IsOrbstack detects if running on Orbstack
func IsOrbstack() bool {
ctx, client := GetDockerClient()
info, err := client.Info(ctx)
if err != nil {
util.Warning("IsLima(): Unable to get Docker info, err=%v", err)
rfay marked this conversation as resolved.
Show resolved Hide resolved
return false
}
if strings.HasPrefix(info.Name, "orbstack") {
return true
}
return false
}

// CopyIntoContainer copies a path (file or directory) into a specified container and location
func CopyIntoContainer(srcPath string, containerName string, dstPath string, exclusion string) error {
startTime := time.Now()
Expand Down