user5154816
user5154816

Reputation:

Unable to build docker from root

I am unable to build docker image from root, I have my Dockerfile in /, it gives error:

root@onl-dev:/# docker build -t centoslibdemo . Error checking context: 'no permission to read from '/proc/sys/net/ipv4/route/flush''.

Can someone suggest if there is any solution to this?

Upvotes: 8

Views: 6784

Answers (1)

enderland
enderland

Reputation: 14185

Move your dockerfile out of your root directory.

There are a whole lot of reasons to do this, not the least of which is permissions issues. You should nearly never be using your root directory as your working directory.

Upvotes: 16

Related Questions