Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Add archlinux PKGBUILD script and instructions #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ignore pacman build artifacts
/pacman/pkg/*
/pacman/src/*
/pacman/docker-gc/*
/pacman/*.tar.xz
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,25 @@ To test that the job will actually run you can use this command
run-parts --test /etc/cron.hourly
```

## Building the Pacman Package


```sh
$ git clone https://github.com/spotify/docker-gc.git
$ cd docker-gc/pacman
$ makepkg -s
```

## Installing the Pacman Package

```sh
$ pacman -U docker-gc_0.0.4-1.tar.xz
```

This installs the `docker-gc` script into `/usr/bin`. Since `/usr/sbin` is a
link to `/usr/bin` in archlinux you can follow the cron instructions from the
debian section.

## Manual Usage

To use the script manually, run `docker-gc`. The system user under
Expand Down
27 changes: 27 additions & 0 deletions pacman/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Maintainer: Spotify
# Contributor: Markus Plangg <mksplg at gmail dot com> via aur
# Contributor: Bram Swenson <bram at craniumisajar dot com>
pkgname=docker-gc
pkgver="0.1.1.$(git rev-parse --short HEAD)"
pkgrel=1
pkgdesc='A simple Docker container and image garbage collection script'
arch=('any')
url='https://github.com/spotify/docker-gc'
license=('Apache')
provides=("${pkgname}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/spotify/docker-gc.git')
md5sums=('SKIP')

depends=('bash')
makedepends=('git')

pkgver() {
cd "$srcdir/${pkgname}"
printf "0.1.1.%s" "$(git rev-parse --short HEAD)"
}

package() {
install -D -m755 "${pkgname}"/docker-gc "${pkgdir}/usr/bin/docker-gc"
install -d -m755 "${pkgdir}"/var/lib/docker-gc
}