mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2024-12-22 00:06: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/),
|
||||
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
|
||||
|
||||
### Added
|
||||
|
@ -194,15 +194,13 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) {
|
||||
splitted := strings.Split(strings.TrimSpace(configFile), "\n")
|
||||
configFilePath := splitted[len(splitted)-1]
|
||||
docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro")
|
||||
// Install rclone in the container
|
||||
args = append([]string{"apk", "add", "rclone", "&&"}, args...)
|
||||
default:
|
||||
return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type)
|
||||
}
|
||||
for key, value := range env {
|
||||
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...)
|
||||
return out, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user