Skip to content

Commit 7cbd519

Browse files
committed
feat: add apt-preferences support
Closes #13
1 parent 14f4afa commit 7cbd519

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

README.md

+18-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ When you deploy your project, the dokku-apt plugin will install according to you
2525
The order of operations is:
2626

2727
1. `apt-env`
28-
2. `apt-sources-list`
29-
3. `apt-repositories`
30-
4. `apt-debconf`
31-
5. `apt-packages`
32-
6. `dpkg-packages`
28+
2. `apt-preferences`
29+
3. `apt-sources-list`
30+
4. `apt-repositories`
31+
5. `apt-debconf`
32+
6. `apt-packages`
33+
7. `dpkg-packages`
3334

3435
### `apt-env`
3536

@@ -41,6 +42,18 @@ Example
4142
ACCEPT_EULA=y
4243
```
4344

45+
### `apt-preferences`
46+
47+
A file that contains [APT Preferences](https://wiki.debian.org/AptPreferences). This file is not validated for correctness, and is installed to `/etc/apt/preferences.d/90customizations`.
48+
49+
Example:
50+
51+
```
52+
APT {
53+
Install-Recommends "false";
54+
}
55+
```
56+
4457
### `apt-sources-list`
4558

4659
Overrides the `/etc/apt/sources.list` file. An empty file may be provided in order to remove upstream packages.

pre-build-buildpack

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ if [ -f $DIR/apt-env ]; then
1616
echo "-----> sourcing apt env ..."
1717
source $DIR/apt-env
1818
fi
19+
if [ -d $DIR/apt-preferences ]; then
20+
echo "-----> injecting apt preferences ..."
21+
mv -v $DIR/apt-preferences /etc/apt/preferences.d/90customizations
22+
fi
1923
if [ -f $DIR/apt-sources-list ]; then
2024
echo "-----> using customized sources.list ..."
2125
mv -v $DIR/apt-sources-list /etc/apt/sources.list

0 commit comments

Comments
 (0)