Question: I'm not sure if this is the right place to ask but I am running a `docker build` command which is building an image on a mounted Volume. During the process I get this weird error

> 
> Can't add file /mnt/Volumes/file/on/volume to tar: archive/tar: sockets not supported
> 
> 
> 

What does this mean?

Answer: 
This is what worked for me. I tried to do docker commit and I got the message

```
  ERRO[2018-10-06T20:54:22.894911981-05:00] Can't add file /var/lib/docker/overlay2/161e218868241d450115fafcadc20b52ad2c81bf2e6b83897d3dfb7081eea34d/diff/tmp/ssh-OOMPJg4ESVMk/agent.165 to tar: archive/tar: sockets not supported

```

I attached to the container again and deleted `/tmp/ssh-OOMPJg4ESVMk/` then it committed just fine.

What is happening is something created a socket. For example the command `eval $(ssh-agent -s)` creates a socket and I didn't realize it. 

Delete the sock file and it commits.
If you really like to archive this file, I recommend you to use the dump extensions from `star`

Call:

```
star -C /mnt -c -dump Volumes > /tmp/file.tar

```

to archive all file types. If you like to be more complete with your backup, add:

```
-sparse

-acl

-xattr

```

With `-dump`, star uses the `exustar` format that has been designed for accurate incremental backups.