Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Not compatible with OSX #49

Closed
bryanrossUK opened this issue Sep 16, 2015 · 1 comment
Closed

Not compatible with OSX #49

bryanrossUK opened this issue Sep 16, 2015 · 1 comment

Comments

@bryanrossUK
Copy link

Great work! Just one wee gotcha I hit that might be easy to fix...

grep on my mac throws an error if you try to use an empty input file. Critically, because this is used by docker-gc here and here, it means no containers or images are ever removed.

I think one potential work around would be to ensure that $EXCLUDE_IDS_FILE and $EXCLUDE_CONTAINERS_IDS_FILE have at least one line in them (perhaps something that will never match like '_FOO_'.

eg.

$ grep --version
grep (BSD grep) 2.5.1-FreeBSD

$ cat containers.reap.tmp
6bf92fe32e92765d85b381325e702349c8bd1edb44df1537addbc593b97c1942

$ cat exclude_container_ids

$ cat containers.reap.tmp | grep -v -f exclude_container_ids
Exit 1

$ echo '_FOO_' > exclude_container_ids

$ cat containers.reap.tmp | grep -v -f exclude_container_ids
6bf92fe32e92765d85b381325e702349c8bd1edb44df1537addbc593b97c1942
@rohansingh
Copy link
Contributor

We don't really target OS X and I don't see that changing in the future due to the limited resources available for this project. If you'd like to use docker-gc on an OS X machine, I'd recommend running it as a Docker image (see README).

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

2 participants