Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

970
Vistas
Docker build error, archive/tar: sockets not supported

I'm new to Docker and trying to build an image. I succeeded in doing that with the Docker commit command, but when I'm trying to do it with Dockerfile I get this errors:

shim@shim-Inspiron-5570:~$ sudo docker build -t shim/debian .
[sudo] password for shim: 
ERRO[0014] Can't add file /home/shim/.ServiceHub/bc1be858c1/116f2fb4b7 to tar: archive/tar: sockets not supported 
ERRO[0014] Can't add file /home/shim/.ServiceHub/bc1be858c1/11a6628921 to tar: archive/tar: sockets not supported 
ERRO[0014] Can't add file /home/shim/.ServiceHub/bc1be858c1/2cb20241cd to tar: archive/tar: sockets not supported 
ERRO[0014] Can't add file /home/shim/.ServiceHub/bc1be858c1/4964606154 to tar: archive/tar: sockets not supported 
ERRO[0014] Can't add file /home/shim/.ServiceHub/bc1be858c1/bc1be858c1 to tar: archive/tar: sockets not supported 
^Cnding build context to Docker daemon  1.725GB

The Docker file looks like this:

FROM debian:shim
RUN apt-get update
RUN apt-get install -y git
RUN apt-get install -y vim

I'm using Ubuntu DeskTop 18.04 Can some one help me with it?

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

It looks like your Dockerfile is probably in /home/shim/?

When you do docker build ., docker will tar up the contents of the current directory and send it to the docker daemon. It looks like some of the files in /home/shim/.ServiceHub are actually sockets, so this operation fails.

Best practice is to have the Dockerfile in its own, isolated, directory to avoid stuff like this.

Also, I suggest having a read through dockerfile_best-practices, in particular the bit about RUN & apt-get

over 4 years ago · Santiago Trujillo Denunciar

0

For this particular example, you should not have Dockerfile in /home/shim.

In the general case of a socket (*.sock) file in your project, you can add *.sock to your .dockerignore file.

over 4 years ago · Santiago Trujillo Denunciar

0

Hi I also face the same issues and got to know the reason from this Quection. My Dockerfile is restarting MySQL in a step and it creates a file called mysqld.sock which is a giving above error while building image. If that is your case then you can add .sock file in repo itself and then use it from there.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda