To install a custom package or modify an existing docker image we need to
- run a docker a container from the image we wish to modify
- modify the docker container
- commit the changes to the container as a docker image
- test changes made to image
~# uname -a | |
~# lsb_release -a | |
~# locale-gen en_US | |
~# locale-gen en_US.UTF-8 | |
~# apt-get -y --force-yes remove ntpdate | |
~# apt-get -y --force-yes install ntp | |
~# /etc/init.d/ntp restart | |
~# dpkg-reconfigure tzdata |
To install a custom package or modify an existing docker image we need to
#!/bin/sh | |
# The following arguments are passed to the script: | |
# | |
# <master-name> <role> <state> <from-ip> <from-port> <to-ip> <to-port> | |
MASTER_IP=$6 | |
VIP=172.17.0.101 | |
NETMASK=16 | |
IF=eth0 | |
MY_IP=$(ip addr show dev $IF | grep "global $IF" | head -1 | sed -e "s/^.*inet \(.*\)\/$NETMASK .*$/\1/") |