Mastodon

Assign static ip to docker container

At the core, docker does not allow you to assign static ip to its containers.  You can do so but by defining your own private network.  Below tutorial does this:

First of all, you need to define your own network.  Something like below:

  docker network create --driver=bridge --subnet=172.10.0.0/16 --ip-range=172.10.1.0/24 --gateway=172.10.1.254 private

Next all is left is, pass below arguments to your run command.

  docker run --network=private  --ip 172.10.1.1 --name container_name container_to_launch

This way your container gets a static ip address which is 172.10.1.1 in this case.

View the available network using command

  docker network ls

 

[tweetthis]Assign static ip to docker container[/tweetthis]

 

 

Add new theme to roundcube in poste.io container

If you are running the mail server from poste.io, it comes with roundcube webmail interface.  I felt the default theme bit out of date and wanted to add my own theme.  This article provides the quick steps on how I did that.

  • Download a roundcube theme of your choice.
  • The theme will have two folders ‘skins‘ and ‘plugins
  • Copy the below folders to respective location
    • docker cp /var/log/temp/skins/ container:/opt/www/webmail/skins/
    • docker cp /var/log/temp/plugins/ container:/opt/www/webmail/plugins/
  • Now attach to your poste.io docker container
  • Once done, edit the file /opt/www/webmail/config/config.inc.php using vi and insert theme name following the README from the theme.
  • Restart your docker container and refresh to see the updated list of themes in your webclient.

Hope it will help someone.  [tweetthis display_mode=”box”]Add new theme to roundcube in poste.io container[/tweetthis]