|
|
@@ -119,13 +119,17 @@ func copyFileToVolume(filePath string, targetPath string, volumeName string) err
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
+ containerInfo, err := GetLatestContainerInfo("wireguard")
|
|
|
+ if err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ desiredImage := fmt.Sprintf("%s:%s@sha256:%s", containerInfo["repo"], containerInfo["tag"], containerInfo["hash"])
|
|
|
// temp container to mount
|
|
|
resp, err := cli.ContainerCreate(ctx, &container.Config{
|
|
|
- Image: "busybox",
|
|
|
- Cmd: []string{"tail", "-f", "/dev/null"},
|
|
|
+ Image: desiredImage,
|
|
|
}, &container.HostConfig{
|
|
|
Binds: []string{volumeName + ":" + targetPath},
|
|
|
- }, nil, nil, "bb_temp")
|
|
|
+ }, nil, nil, "wg_writer")
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|