10

I'm trying to setup my home server (Ubuntu 18.04 LTS) using some docker containers and docker-compose. While trying to setup the "transmission-rss" I get the following error:

/usr/local/lib/ruby/2.6.0/psych.rb:577:in `initialize': Is a directory @ io_fillbuf - fd:5 /etc/transmission-rss.conf (Errno::EISDIR)

And when I went to check if the transmission-rss.conf file had been created a directory with the same name was created in its place.

I have to run the docker-compose up command using sudo so I don't know if this has anything to do with permissions.

Here is my current docker-compose.yml file:

version: '3'
services:
  portainer:
    container_name: portainer
    image: portainer/portainer
    volumes:
      - '/home/miguel/docker/portainer/data/:/data'
      - '/home/miguel/docker/portainer/socket/:/var/run/docker.sock'
    ports:
      - "9000:9000"
    restart: always
  transmission-rss:
    container_name: transmission-rss
    image: nning2/transmission-rss:latest
    volumes:
      - '/home/miguel/docker/transmission-rss/transmission-rss.conf/:/etc/transmission-rss.conf/'
    restart: unless-stopped

The portainer container starts fine.

Thank you very much, Miguel

MAntunes
  • 101
  • 1
  • 1
  • 5

2 Answers2

10

make sure that files exist in both side (inside host machine and inside container).

if one of them not exist then docker create a directory instead of a file

TheEhsanSarshar
  • 2,677
  • 22
  • 41
  • Is that right? I would expect that if the host file exists, but the container file does not, the host file would be mounted at the target location as a file. – mikey Apr 20 '22 at 02:40
  • @mikey check this answer https://stackoverflow.com/a/66327349/10539792 – TheEhsanSarshar Apr 21 '22 at 06:53
5

- '/home/miguel/docker/transmission-rss/transmission-rss.conf/:/etc/transmission-rss.conf/'

Please remove the trailing slashes (there are 2x!) and ensure transmission-rss.conf is a file, and not a dir on your host source.

To be slightly more comprehensive:

  1. Follow this to avoid having to use sudo with docker-compose: https://docs.docker.com/install/linux/linux-postinstall (this is not the cause of your issue, but it is annoying to have to preface every command with sudo, basically just need to add your user to the docker group).
  2. Update docker-compose.yml, remove the trailing slashes from source and target for transmission-rss.conf.
  3. Remove your existing volumes (docker volume ls + docker volume rm volume_name) after backing up your data, if needed.
  4. On your host (the machine you are running the docker-compose commands from), make sure the file exists, and is not a directory
  5. docker-compose down
  6. docker-compose build
  7. docker-compose up
J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
mikey
  • 1,068
  • 10
  • 13
  • 2
    Just to add to this; particularly the "make sure the file exists" part, double-check that you have the local (host) path correct. Sometimes a typo, extra subfolder, etc.. can slip by even the best of us. – J. Scott Elblein Dec 31 '21 at 06:27