Skip to content

Commit

Permalink
add init flag to command samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameer Naik committed Jul 14, 2018
1 parent 9f1c516 commit fd3c517
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ docker build -t sameersbn/apt-cacher-ng github.com/sameersbn/docker-apt-cacher-n
Start Apt-Cacher NG using:

```bash
docker run --name apt-cacher-ng -d --restart=always \
docker run --name apt-cacher-ng --init -d --restart=always \
--publish 3142:3142 \
--volume /srv/docker/apt-cacher-ng:/var/cache/apt-cacher-ng \
sameersbn/apt-cacher-ng:3.1
Expand All @@ -80,7 +80,7 @@ docker run --name apt-cacher-ng -d --restart=always \
You can customize the launch command of Apt-Cacher NG server by specifying arguments to `apt-cacher-ng` on the `docker run` command. For example the following command prints the help menu of `apt-cacher-ng` command:

```bash
docker run --name apt-cacher-ng -it --rm \
docker run --name apt-cacher-ng --init -it --rm \
--publish 3142:3142 \
--volume /srv/docker/apt-cacher-ng:/var/cache/apt-cacher-ng \
sameersbn/apt-cacher-ng:3.1 -h
Expand Down Expand Up @@ -158,7 +158,7 @@ docker exec -it apt-cacher-ng tail -f /var/log/apt-cacher-ng/apt-cacher.log
Using the [Command-line arguments](#command-line-arguments) feature, you can specify the `-e` argument to initiate Apt-Cacher NG's cache expiry maintenance task.

```bash
docker run --name apt-cacher-ng -it --rm \
docker run --name apt-cacher-ng --init -it --rm \
--publish 3142:3142 \
--volume /srv/docker/apt-cacher-ng:/var/cache/apt-cacher-ng \
sameersbn/apt-cacher-ng:3.1 -e
Expand Down Expand Up @@ -191,7 +191,7 @@ To upgrade to newer releases:
4. Start the updated image

```bash
docker run --name apt-cacher-ng -d \
docker run --name apt-cacher-ng --init -d \
[OPTIONS] \
sameersbn/apt-cacher-ng:3.1
```
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
version: '2'
version: '2.2'

services:
apt-cacher-ng:
restart: always
image: sameersbn/apt-cacher-ng:3.1
init: true
ports:
- "3142:3142"
volumes:
Expand Down

0 comments on commit fd3c517

Please sign in to comment.