0

Im obtaining this error in docker-compose up -d command execution. My docker-compose.yml looks like this:

version: '3'

services:
  plex:    
    container_name: plex
    build: .
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - VERSION=docker      
    volumes:
      - /home/pi/docker/Plex/media/config:/config
      - /home/pi/docker/Plex/media/tv:/tv
      - /home/pi/docker/Plex/media/movies:/movies
    restart: unless-stopped

and my Dockerfile:

FROM lscr.io/linuxserver/plex:latest

My docker system is clean. I have executed docker system prune --all --volumes --force so I havent no cache, no images, no volumes, etc... to delete.

It seems to me that when building the image, docker tries to copy all the library multimedia contents of my folders somehow and that's why it appears that it has no space, but it is something that is beyond my knowledge.

In addition, with this image something happens to me that does not happen to me with the others, and that is that it takes a loooong time to build. The other images are built immediately.

Any help or recommendation?

Thanks in advance.

m4n50n1k0
  • 11
  • 3
  • How much space do you have allocated for Docker? And how large are your TV and movie folders you're trying to copy? This dockerfile will try to copy all the content from all three folders. Are there specific files you want, or do you want all of them from those three folders? – Bret Johnson Dec 07 '22 at 13:30
  • Thanks for answering so quickly. I only want it to mount those folders to read from there, but not to copy the content. As far as I know, this is what make the "volumes" option, right? – m4n50n1k0 Dec 07 '22 at 13:33
  • Hi again @BretJohnson. After you named the ***Dockerfile***, I removed it and instead included `image: lscr.io/linuxserver/plex:latest` in my docker-compose and now everything worked as I wanted. Also the container has been created in a second. What was happening then? Is it that when I use a dockerfile, instead of mapping my volumes they create them with all their content inside the image? Anyway, thank you very much. – m4n50n1k0 Dec 07 '22 at 13:49
  • Docker is a beast of its own. But yes most likely what was happening was on your build it was trying to create persistent volumes in your docker engine, essentially copying all your files over. I'll have to read more on why placing your image in your docker-compose is better practice and why it works. But I'm glad you figured it out! I really wish the documentation for docker was more intuitive. You can tell it was written by network guys and not programmers – Bret Johnson Dec 07 '22 at 13:54

0 Answers0