Skip to content

Commit

Permalink
add a workaround to a Docker (aufs) bug
Browse files Browse the repository at this point in the history
You might see the entrypoint script throw out errors like the following:
```
/usr/bin/mount: Text file busy
```

This is due to this bug (likely in AUFS):
moby/moby#9547

This patch workarounds it by inserting a `sync` in between.
  • Loading branch information
jieyu committed Jun 14, 2019
1 parent cdf9183 commit 20bc0c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions images/base/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ fix_mount() {
chown root:root /bin/mount
chmod -s /bin/mount

# This is a workaround to an AUFS bug that might cause `Text file
# busy` on `mount` command below. See more details in
# https://github.com/moby/moby/issues/9547
sync

# systemd-in-a-container should have read only /sys
# https://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/
# however, we need other things from `docker run --privileged` ...
Expand Down

0 comments on commit 20bc0c3

Please sign in to comment.