Copying over sftp in docker, fails to find section

What is the problem you are having with rclone?

rclone fails to find the section in my config file, which is exposed from the host into docker container via docker-compose

What is your rclone version (output from rclone version)

rclone v1.55.1

Which OS you are using and how many bits (eg Windows 7, 64 bit)

alpine linux docker container on a debian host

Which cloud storage system are you using? (eg Google Drive)

SFTP

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copy --dry-run test.png esm:

The rclone config contents with secrets removed.

[esm]                                                                                                                   
host = redacted                                                                                               
user = shinx                                                                                                            
port = 69                                                                                                               
key_file = /root/id_rsa  

A log from the command with the -vv flag

2021/05/06 20:19:20 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"                                   2021/05/06 20:19:20 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "copy" "-vv" "--dry-run" "esmbot.png" "esm:"]                                                                                                          2021/05/06 20:19:20 DEBUG : Creating backend with remote "esmbot.png"                                                   2021/05/06 20:19:20 DEBUG : fs cache: adding new entry for parent of "esmbot.png", "/home/esmBot/.internal"             2021/05/06 20:19:20 DEBUG : Creating backend with remote "esm:"                                                         2021/05/06 20:19:20 Failed to create file system for "esm:": didn't find section in config file

please post the docker compose file.

version: '3.0'

services:
  bot:
    build:
      context: .
      dockerfile: Dockerfile.bot
    image: esmbot
    restart: unless-stopped
    volumes:
      - ./logs:/home/esmBot/.internal/logs
      - ./bot-help:/home/esmBot/help
      - ./bot-temp:/home/esmBot/temp
      - ./assets/rclone/rclone.conf:/root/.config/rclone/rclone.conf
      - ./assets/rclone/id_rsa:/root/id_rsa
    env_file:
      - .env
    environment:
      OUTPUT: /home/esmBot/help
      TEMPDIR: /home/esmBot/temp
    links:
      - lavalink
    depends_on:
      - api
      - lavalink
      - postgres

    networks:
      esmbot:
        ipv4_address: 172.24.0.2

Try making a shell on that server and seeing if the config file looks sensible. That is what I'd do! Also try rclone listremotes

Take another look at your debug log, rclone should have printed full path to its own binary inside the container. I will use /bin/rclone below.

docker run -it --entrypoint /bin/rclone YourContainer config show esm -vvv

docker run -it --entrypoint /bin/rclone YourContainer config file -vvv

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.