Skip to content

Commit

Permalink
Future3/update docs (#2123)
Browse files Browse the repository at this point in the history
* Update pulseaudio link for docker mac setup

* Update Docker docs
  • Loading branch information
pabera authored Nov 24, 2023
1 parent 2a0bb20 commit 94aa9dc
Showing 1 changed file with 54 additions and 58 deletions.
112 changes: 54 additions & 58 deletions documentation/content/developers/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,8 @@ need to adapt some of those commands to your needs.

## Prerequisites

1. Install required software
* Linux
* [Docker](https://docs.docker.com/engine/install/debian/)
* [Compose](https://docs.docker.com/compose/install/)
* Mac
* [Docker & Compose (Mac)](https://docs.docker.com/docker-for-mac/install/)
* [pulseaudio (Docker)](https://devops.datenkollektiv.de/running-a-docker-soundbox-on-mac.html)
* Windows
* [Docker & Compose (Windows)](https://docs.docker.com/docker-for-windows/install/)
* [pulseaudio (Windows)](https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/)
1. Install required software: Docker, Compose and pulseaudio
* Check installations guide for [Mac](#mac), [Windows](#windows) or [Linux](#linux)

2. Pull the Jukebox repository:

Expand Down Expand Up @@ -52,47 +44,10 @@ practice to isolate different components in different Docker images.
They can be run individually or in combination. To do that, we use
`docker-compose`.

### Linux

Make sure you don\'t use `sudo` to run your `docker-compose`. Check out
Docker\'s [post-installation guide](https://docs.docker.com/engine/install/linux-postinstall/) for more information.

```bash
// Build Images
$ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.linux.yml build
// Run Docker Environment
$ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.linux.yml up
// Shuts down Docker containers and Docker network
$ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.linux.yml down
```

Note: if you have `mpd` running on your system, you need to stop it
using:

``` bash
$ sudo systemctl stop mpd.socket
$ sudo mpd --kill
```

Otherwise you might get the error message:

``` bash
$ docker-compose -f docker-compose.yml -f docker-compose.linux.yml up
Starting mpd ...
Starting mpd ... error
(...)
Error starting userland proxy: listen tcp4 0.0.0.0:6600: bind: address already in use
```

Read these threads for details: [thread 1](https://unix.stackexchange.com/questions/456909/socket-already-in-use-but-is-not-listed-mpd) and [thread 2](https://stackoverflow.com/questions/5106674/error-address-already-in-use-while-binding-socket-with-address-but-the-port-num/5106755#5106755)

### Mac

Remember, pulseaudio is a prerequisite. [Follow these
instructions](https://stackoverflow.com/a/50939994/1062438) for Mac
hosts.
1. [Install Docker & Compose (Mac)](https://docs.docker.com/docker-for-mac/install/)
2. [Install pulseaudio](https://gist.github.com/seongyongkim/b7d630a03e74c7ab1c6b53473b592712) (Other references: [[1]](https://devops.datenkollektiv.de/running-a-docker-soundbox-on-mac.html), [[2]](https://stackoverflow.com/a/50939994/1062438))

``` bash
// Build Images
Expand All @@ -107,31 +62,32 @@ $ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.mac.yml d

### Windows

1. Download
[pulseaudio](https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/)
1. Install [Docker & Compose (Windows)](https://docs.docker.com/docker-for-windows/install/)

2. Download [pulseaudio](https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/)

2. Uncompress somewhere in your user folder
3. Uncompress somewhere in your user folder

3. Edit `$INSTALL_DIR/etc/pulse/default.pa`
4. Edit `$INSTALL_DIR/etc/pulse/default.pa`

4. Add the following line
5. Add the following line

``` bash
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
```

5. Edit `$INSTALL_DIR/etc/pulse//etc/pulse/daemon.conf`, find the
6. Edit `$INSTALL_DIR/etc/pulse//etc/pulse/daemon.conf`, find the
following line and change it to:

``` bash
exit-idle-time = -1
```

6. Execute `$INSTALL_DIR/bin/pulseaudio.exe`
7. Execute `$INSTALL_DIR/bin/pulseaudio.exe`

7. Make sure Docker is running (e.g. start Docker Desktop)
8. Make sure Docker is running (e.g. start Docker Desktop)

8. Run `docker-compose`
9. Run `docker-compose`

``` bash
// Build Images
Expand All @@ -144,6 +100,46 @@ $ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.mac.yml d
$ docker-compose -f docker/docker-compose.yml down
```

### Linux

1. Install Docker & Compose
* [Docker](https://docs.docker.com/engine/install/debian/)
* [Compose](https://docs.docker.com/compose/install/)
2. Make sure you don\'t use `sudo` to run your `docker-compose`. Check out
Docker\'s [post-installation guide](https://docs.docker.com/engine/install/linux-postinstall/) for more information.

```bash
// Build Images
$ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.linux.yml build
// Run Docker Environment
$ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.linux.yml up
// Shuts down Docker containers and Docker network
$ docker-compose -f docker/docker-compose.yml -f docker/docker-compose.linux.yml down
```

Note: if you have `mpd` running on your system, you need to stop it
using:

``` bash
$ sudo systemctl stop mpd.socket
$ sudo mpd --kill
```

Otherwise you might get the error message:

``` bash
$ docker-compose -f docker-compose.yml -f docker-compose.linux.yml up
Starting mpd ...
Starting mpd ... error
(...)
Error starting userland proxy: listen tcp4 0.0.0.0:6600: bind: address already in use
```

Read these threads for details: [thread 1](https://unix.stackexchange.com/questions/456909/socket-already-in-use-but-is-not-listed-mpd) and [thread 2](https://stackoverflow.com/questions/5106674/error-address-already-in-use-while-binding-socket-with-address-but-the-port-num/5106755#5106755)


## Test & Develop

The Dockerfile is defined to start all Phoniebox related services.
Expand Down

0 comments on commit 94aa9dc

Please sign in to comment.