Eggdrop for Docker

From EggWiki
Jump to navigation Jump to search

Information and documentation for the Eggdrop Docker image can be found at https://hub.docker.com/_/eggdrop.

Mounting Scripts into Docker

It can be difficult for beginners to add scripts into a Docker container. An easy way to add scripts would be to create a scripts directory on the host and mount it to /home/eggdrop/eggdrop/scripts (or the path of your choosing). This would be accomplished from the command line by adding an option similar to:

-v /path/to/host/scripts:/home/eggdrop/eggdrop/scripts

or via docker-compose:

volumes:
    - /path/to/host/scripts:/home/eggdrop/eggdrop/scripts   

...and then load the script as usual from the config file.


Adding Tcl packages required for scripts

Many scripts require extra OS packages to be installed in order to function, such as tcl-tls, tcl-lib and libsqlite3-tcl. At first look, it may feel difficult to install a package required for a Tcl script since you don't (generally) have command line access. In keeping with Docker philosophy, the base Eggdrop package is intentionally packaged with only the minimal requirements needed for base Eggdrop functionality. However, users may easily add add packages when starting a container like this:

docker run -i eggdrop sh -c 'apk add tcl-lib tcl-tls && exec /home/eggdrop/eggdrop/entrypoint.sh eggdrop.conf

or in a docker-compose file:

    command: [ "apk add tcl-lib tcl-tls && exec /home/eggdrop/eggdrop/entrypoint.sh eggdrop.conf" ]

Setting a Vhost with Docker

We're still trying to figure out the best way to do this! One method we've found is to set the following options in your docker-compose config file:

networks:
  default:
    driver: bridge
    ipam:
      driver: default
    driver_opts:
      com.docker.network.host_ipv4: <ip here>

Importantly, do not set the vhost4 setting in the config if you use this method.

Also importantly, there are still some to-be-determined side effects for using this method, but this will atleast get you online using the vhost of your choice