Skip to content

Commit

Permalink
feat: add support for apt-env
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed May 14, 2019
1 parent 0eef4ee commit 345e128
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,22 @@ When you deploy your project, the dokku-apt plugin will install according to you

The order of operations is:

1. `apt-sources-list`
2. `apt-repositories`
3. `apt-debconf`
4. `apt-packages`
5. `dpkg-packages`
1. `apt-env`
2. `apt-sources-list`
3. `apt-repositories`
4. `apt-debconf`
5. `apt-packages`
6. `dpkg-packages`

### apt-env

A file that can contain environment variables. Note that this is sourced, and should not contain arbitrary code.

Example

```
ACCEPT_EULA=y
```

### apt-sources-list
Overrides the `/etc/apt/sources.list` file. An empty file may be provided in order to remove upstream packages.
Expand Down
4 changes: 4 additions & 0 deletions pre-build-buildpack
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ DIR=/app
COMMAND=$(
cat <<EOF
export DEBIAN_FRONTEND=noninteractive
if [ -f $DIR/apt-env ]; then
echo "-----> sourcing apt env ..."
source $DIR/apt-env
fi
if [ -f $DIR/apt-sources-list ]; then
echo "-----> using customized sources.list ..."
mv -v $DIR/apt-sources-list /etc/apt/sources.list
Expand Down

0 comments on commit 345e128

Please sign in to comment.