diff --git a/README.md b/README.md index b015656..c0f33ac 100644 --- a/README.md +++ b/README.md @@ -44,5 +44,16 @@ Example: ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true ``` +## dpkg-packages +Optional directory holding `.deb` packages to be installed automatically +after `apt-packages`, `apt-repositories` and `apt-debconf`. Allows the +installation of custom packages inside the container. + +Example: + +``` +$ ls dpkg-packages/ +your-package-0_0.0.1.deb +``` [dokku]: https://github.com/progrium/dokku diff --git a/pre-build b/pre-build index bc4feca..a2b2632 100755 --- a/pre-build +++ b/pre-build @@ -24,6 +24,12 @@ if [ -f $DIR/apt-packages ]; then apt-get install -y \$PACKAGES echo "-----> Injected packages: \$PACKAGES" fi +if [ -d $DIR/dpkg-packages ]; then + for pkg in $DIR/dpkg-packages/*.deb; do + dpkg -i \$pkg + echo "-----> Injected package: \$pkg" + done +fi sleep 1 # wait so that docker run has not exited before docker attach EOF ) @@ -31,4 +37,4 @@ id=$(docker run -d $IMAGE /bin/bash -e -c "$COMMAND") #enable logs docker attach $id test $(docker wait $id) -eq 0 -docker commit $id $IMAGE > /dev/null \ No newline at end of file +docker commit $id $IMAGE > /dev/null