2

My Manjaro installation did not configure /etc/subuid and /etc/subgid files which are required for rootless containers such as Docker to work.

For e.g. cat /etc/subuid returns a file not found error.

I discovered this problem as soon as I installed Docker Desktop and it was taking forever to start.

I followed some advice from this page but to no avail because my system did not have the requisite files.

Eventually, I figured out how to create and configure the subuid and subgid files. I have provided the solution below.

karjedavpalaa
  • 205
  • 2
  • 11

1 Answers1

2

To create /etc/subuid and /etc/subgid files, use

touch /etc/subuid
touch /etc/subgid

To configure the files, I used a wrote a Python program as described here:

f = open("/etc/subuid", "w")
for uid in range(1000, 65536):
    f.write("%d:%d:65536\n" %(uid,uid*65536))
f.close()

f = open("/etc/subgid", "w")
for uid in range(1000, 65536):
    f.write("%d:%d:65536\n" %(uid,uid*65536))
f.close()

You can verify the existence and contents of these files with cat /etc/subuid

Docker works perfectly now!

karjedavpalaa
  • 205
  • 2
  • 11