history: add history import command

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2025-03-03 21:54:25 -08:00
parent e2d52a8465
commit fea7459880
8 changed files with 180 additions and 0 deletions

View File

@ -0,0 +1,21 @@
package desktop
import (
"os"
"path/filepath"
"github.com/pkg/errors"
)
const (
socketName = "docker-desktop-build.sock"
socketPath = "Library/Containers/com.docker.docker/Data"
)
func BuildServerAddr() (string, error) {
dir, err := os.UserHomeDir()
if err != nil {
return "", errors.Wrap(err, "failed to get user home directory")
}
return "unix://" + filepath.Join(dir, socketPath, socketName), nil
}