-
-
Notifications
You must be signed in to change notification settings - Fork 121
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Right now, a Docker client will only be created when the socket is mounted into the container using a hard check for /var/run/docker.sock:
docker-volume-backup/cmd/backup/script.go
Lines 92 to 99 in 30265c1
| _, err := os.Stat("/var/run/docker.sock") | |
| if !os.IsNotExist(err) { | |
| cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) | |
| if err != nil { | |
| return nil, fmt.Errorf("newScript: failed to create docker client") | |
| } | |
| s.cli = cli | |
| } |
User might want to use other means of providing this (e.g. a proxied HTTP service by setting DOCKER_HOST).
Instead of hard coding the socket location, we could:
- research which means of providing access would be supported by calling
client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) - add all of them to the conditional
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed