Git Product home page Git Product logo

docker-aria2's Introduction

docker-aria2

Docker Pulls Docker Stars Docker Automated

Usage

  1. Prepare config and download directories with following commands.

    mkdir /storage/aria2/config
    chown -R 1001:1002 /storage/aria2/config
    find /storage/aria2/config -type d -exec chmod 755 {} +
    find /storage/aria2/config -type f -exec chmod 644 {} +
    mkdir /storage/aria2/downloads
    chown -R 1001:1002 /storage/aria2/downloads
    find /storage/aria2/downloads -type d -exec chmod 755 {} +
    find /storage/aria2/downloads -type f -exec chmod 644 {} +
  2. Put aria2.conf file in the config dir, with following content.

    save-session=/config/aria2.session
    input-file=/config/aria2.session
    save-session-interval=60
    
    dir=/downloads
    
    file-allocation=prealloc
    disk-cache=128M
    
    enable-rpc=true
    rpc-listen-port=6800
    rpc-allow-origin-all=true
    rpc-listen-all=true
    
    rpc-secret=<password>
    
    auto-file-renaming=false
    
    max-connection-per-server=16
    min-split-size=1M
    split=16
  3. Run following command to start aria2 instance

    docker run \
      -d \
      --name aria2 \
      -u=1001:1002 \
      -v /storage/aria2/config:/config \
      -v /storage/aria2/downloads:/downloads \
      -p 6800:6800 \
      opengg/aria2

Note:

  • Make sure the download folder is writable by the given uid/gid.
  • aria2.conf will be created automatically if not exists.
  • Learn more about tuning aria2.conf: Config reference

Parameters

The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side. For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container. So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.

  • -p 6800:6800 - the port(s)
  • -v /storage/aria2/config:/config - where aria2 should store config files and logs
  • -v /storage/aria2/downloads:/downloads - local path for downloads
  • -u 1001 for UserID - see below for explanation
  • -u 1001:1002 for GroupID - see below for explanation

It is based on alpine linux, for shell access whilst the container is running do docker exec -it aria2 /bin/sh.

User / Group Identifiers

Sometimes when using data volumes (-v flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" โ„ข.

In this instance -u 1001:1002. To find yours use id user as below:

  $ id dockeruser
    uid=1001(dockeruser) gid=1002(dockergroup) groups=1002(dockergroup)

docker-aria2's People

Contributors

nemoalex avatar opengg avatar turygo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.