Skip to content

Commit

Permalink
Merge pull request #7 from sebasmagri/dpkg-packages
Browse files Browse the repository at this point in the history
Add dpkg-packages directory feature
  • Loading branch information
jazzzz committed Mar 2, 2015
2 parents 094f2cb + 052ddef commit 2a6bd39
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 7 additions & 1 deletion pre-build
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ 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
)
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
docker commit $id $IMAGE > /dev/null

0 comments on commit 2a6bd39

Please sign in to comment.