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

Commit

Permalink
Merge pull request #187 from csgillespie/patch-1
Browse files Browse the repository at this point in the history
Add sudo where necessary
  • Loading branch information
davidxia committed May 23, 2018
2 parents 7ce3b44 + e661b32 commit c5a3ad4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ container (see [below](#running-as-a-docker-container)).


```sh
$ apt-get install git devscripts debhelper build-essential dh-make
$ git clone https://github.com/spotify/docker-gc.git
$ cd docker-gc
$ debuild -us -uc -b
sudo apt-get install git devscripts debhelper build-essential dh-make
git clone https://github.com/spotify/docker-gc.git
cd docker-gc
debuild -us -uc -b
```

If you get lintian errors during `debuild`, try `debuild --no-lintian -us -uc -b`.
Expand All @@ -41,7 +41,7 @@ If you get lintian errors during `debuild`, try `debuild --no-lintian -us -uc -b
## Installing the Debian Package

```sh
$ dpkg -i ../docker-gc_0.1.0_all.deb
sudo dpkg -i ../docker-gc_0.1.0_all.deb
```

This installs the `docker-gc` script into `/usr/sbin`. If you want it to
Expand Down Expand Up @@ -187,7 +187,7 @@ The docker-gc container requires access to the docker socket in order to
function, so you need to map it when running, e.g.:

```sh
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc:ro spotify/docker-gc
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc:ro spotify/docker-gc
```

The `/etc` directory is also mapped so that it can read any exclude files
Expand All @@ -205,7 +205,7 @@ If your docker daemon is configured to run with user namespace, you will need to
run the container with [user namespace disabled][disable-user-namespace]:

```sh
$ docker run --rm --userns host -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc spotify/docker-gc
docker run --rm --userns host -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc spotify/docker-gc
```

[disable-user-namespace]: https://docs.docker.com/engine/reference/commandline/dockerd/#disable-user-namespace-for-a-container

0 comments on commit c5a3ad4

Please sign in to comment.