mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 08:16:25 +00:00
use own docker image
This commit is contained in:
parent
3029259d82
commit
0c71bea93e
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.5.1] - 2021-11-21
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- use official docker image instead of installing rclone every time docker is used.
|
||||||
|
|
||||||
## [1.5.0] - 2021-11-20
|
## [1.5.0] - 2021-11-20
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -194,15 +194,13 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) {
|
|||||||
splitted := strings.Split(strings.TrimSpace(configFile), "\n")
|
splitted := strings.Split(strings.TrimSpace(configFile), "\n")
|
||||||
configFilePath := splitted[len(splitted)-1]
|
configFilePath := splitted[len(splitted)-1]
|
||||||
docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro")
|
docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro")
|
||||||
// Install rclone in the container
|
|
||||||
args = append([]string{"apk", "add", "rclone", "&&"}, args...)
|
|
||||||
default:
|
default:
|
||||||
return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type)
|
return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type)
|
||||||
}
|
}
|
||||||
for key, value := range env {
|
for key, value := range env {
|
||||||
docker = append(docker, "--env", key+"="+value)
|
docker = append(docker, "--env", key+"="+value)
|
||||||
}
|
}
|
||||||
docker = append(docker, "restic/restic", "-c", strings.Join(args, " "))
|
docker = append(docker, "cupcakearmy/autorestic", "-c", strings.Join(args, " "))
|
||||||
out, err := ExecuteCommand(options, docker...)
|
out, err := ExecuteCommand(options, docker...)
|
||||||
return out, err
|
return out, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user