Do Docker commands inside a container behave the same on different hosts OS?

Viewed 63

Running the following command inside a container built from an official Debian image (debian:stretch-slim) does not output the same result whether the host is macOS or Ubuntu.

$ grep -Rnl path/ -e 'search' | xargs grep -e 'expected'

Results:

# Ubuntu 22.04 LTS
expected
expected
...

# macOS 12.4 (21F79)
path/to/file_having_search_1:expected
path/to/file_having_search_2:expected
...

Doesn't this defeat Docker's primary purpose?

1 Answers

Rebooting the macOS host solved the issue.

Related