Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

Error running inside docker #4

Open
nunofernandes opened this issue Jun 13, 2020 · 0 comments
Open

Error running inside docker #4

nunofernandes opened this issue Jun 13, 2020 · 0 comments

Comments

@nunofernandes
Copy link
Contributor

Hi.. I'm getting the following error when running inside docker when I stop the service.

OSError: [Errno 16] Device or resource busy: '/etc/hosts.local-cname-backup' -> '/etc/hosts'

/etc/hosts is mounted by the docker daemon so the rename will fail.

# mount | grep hosts
/dev/nvme0n1p1 on /etc/hosts type xfs (rw,relatime,seclabel,attr2,inode64,noquota)

A good way of fixing could be something like detecting if /etc/hosts is mounted and if do, just do something like a cat over the file (like the pseudo code):

cat /etc/hosts.local-cname-backup > /etc/hosts
rm  /etc/hosts.local-cname-backup
nunofernandes added a commit to nunofernandes/local-cname that referenced this issue Jun 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant