Handle docker start inside overlayfs
Raspberry Pi allows to start system under overlayfs.
Docker is successfully fallbacks to fuse-overlay but not starting
because of the `Error starting daemon: rename /var/lib/docker/runtimes /var/lib/docker/runtimes-old: invalid cross-device link` error
It's happening because `rename` is not supported by overlayfs.
After manually removing directory `runtimes` docker starts and works successfully
Signed-off-by: Illia Antypenko <ilya@antipenko.pp.ua>
(cherry picked from commit d591710f82
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ebedb1c496
commit
a8926de2a1
1 changed files with 3 additions and 1 deletions
|
@ -69,7 +69,9 @@ func (daemon *Daemon) initRuntimes(runtimes map[string]types.Runtime) (err error
|
|||
}
|
||||
|
||||
if err = os.Rename(runtimeDir, runtimeDir+"-old"); err != nil {
|
||||
return
|
||||
if err = os.RemoveAll(runtimeDir); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
if err = os.Rename(tmpDir, runtimeDir); err != nil {
|
||||
err = errors.Wrap(err, "failed to setup runtimes dir, new containers may not start")
|
||||
|
|
Loading…
Reference in a new issue