|
| 1 | +<!-- |
| 2 | +
|
| 3 | +******************************************************************************** |
| 4 | +
|
| 5 | +WARNING: |
| 6 | +
|
| 7 | + DO NOT EDIT "teamspeak/README.md" |
| 8 | +
|
| 9 | + IT IS AUTO-GENERATED |
| 10 | +
|
| 11 | + (from the other files in "teamspeak/" combined with a set of templates) |
| 12 | +
|
| 13 | +******************************************************************************** |
| 14 | +
|
| 15 | +--> |
| 16 | + |
| 17 | +# Supported tags and respective `Dockerfile` links |
| 18 | + |
| 19 | +- [`3.1`, `3.1.0`, `latest` (*3.1.0/Dockerfile*)](https://github.com/TeamSpeak-Systems/teamspeak-linux-docker-images/blob/0aa60b817eec11e41f8a93b225bab48f82133b1b/3.1.0/Dockerfile) |
| 20 | + |
| 21 | +# Quick reference |
| 22 | + |
| 23 | +- **Where to get help**: |
| 24 | + [the Docker Community Forums](https://forums.docker.com/), [the Docker Community Slack](https://blog.docker.com/2016/11/introducing-docker-community-directory-docker-community-slack/), or [Stack Overflow](https://stackoverflow.com/search?tab=newest&q=docker) |
| 25 | + |
| 26 | +- **Where to file issues**: |
| 27 | + [https://github.com/TeamSpeak-Systems/teamspeak-linux-docker-images/issues](https://github.com/TeamSpeak-Systems/teamspeak-linux-docker-images/issues) |
| 28 | + |
| 29 | +- **Maintained by**: |
| 30 | + TeamSpeak Developers [nwerensteijn](https://github.com/nwerensteijn) and [muenchow](https://github.com/muenchow) |
| 31 | + |
| 32 | +- **Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64)) |
| 33 | + [`amd64`](https://hub.docker.com/r/amd64/teamspeak/) |
| 34 | + |
| 35 | +- **Published image artifact details**: |
| 36 | + [repo-info repo's `repos/teamspeak/` directory](https://github.com/docker-library/repo-info/blob/master/repos/teamspeak) ([history](https://github.com/docker-library/repo-info/commits/master/repos/teamspeak)) |
| 37 | + (image metadata, transfer size, etc) |
| 38 | + |
| 39 | +- **Image updates**: |
| 40 | + [official-images PRs with label `library/teamspeak`](https://github.com/docker-library/official-images/pulls?q=label%3Alibrary%2Fteamspeak) |
| 41 | + [official-images repo's `library/teamspeak` file](https://github.com/docker-library/official-images/blob/master/library/teamspeak) ([history](https://github.com/docker-library/official-images/commits/master/library/teamspeak)) |
| 42 | + |
| 43 | +- **Source of this description**: |
| 44 | + [docs repo's `teamspeak/` directory](https://github.com/docker-library/docs/tree/master/teamspeak) ([history](https://github.com/docker-library/docs/commits/master/teamspeak)) |
| 45 | + |
| 46 | +- **Supported Docker versions**: |
| 47 | + [the latest release](https://github.com/docker/docker-ce/releases/latest) (down to 1.6 on a best-effort basis) |
| 48 | + |
| 49 | +# What is TeamSpeak? |
| 50 | + |
| 51 | +TeamSpeak offers the ideal voice communication for online gaming, education and training, internal business communication, and staying in touch with friends and family. Our primary focus is delivering a solution that is easy to use, with high security standards, excellent voice quality, and low system and bandwidth usage. |
| 52 | + |
| 53 | +> [teamspeak.com](https://teamspeak.com/) |
| 54 | +
|
| 55 | + |
| 56 | + |
| 57 | +# How to use this image |
| 58 | + |
| 59 | +To view the license agreement: |
| 60 | + |
| 61 | +```console |
| 62 | +$ docker run -e TS3SERVER_LICENSE=view teamspeak |
| 63 | +``` |
| 64 | + |
| 65 | +To start a TeamSpeak server, accept the license agreement, and map the ports to the host: |
| 66 | + |
| 67 | +```console |
| 68 | +$ docker run -p 9987:9987/udp -p 10011:10011 -p 30033:30033 -e TS3SERVER_LICENSE=accept teamspeak |
| 69 | +``` |
| 70 | + |
| 71 | +Then you can connect to `localhost` in your TeamSpeak client. Please write down the server query password, and server admin privilege key that were generated. These are needed to administrate the TeamSpeak server. |
| 72 | + |
| 73 | +## Container shell access |
| 74 | + |
| 75 | +The `docker exec` command allows you to run commands inside a Docker container. The following command line will give you a shell inside your `teamspeak` container: |
| 76 | + |
| 77 | +```console |
| 78 | +$ docker exec -it some-teamspeak sh |
| 79 | +``` |
| 80 | + |
| 81 | +The TeamSpeak server log is available through Docker's container log: |
| 82 | + |
| 83 | +```console |
| 84 | +$ docker logs some-teamspeak |
| 85 | +``` |
| 86 | + |
| 87 | +## ... via [`docker stack deploy`](https://docs.docker.com/engine/reference/commandline/stack_deploy/) or [`docker-compose`](https://github.com/docker/compose) |
| 88 | + |
| 89 | +Example `stack.yml` for `teamspeak`: |
| 90 | + |
| 91 | +```yaml |
| 92 | +version: '3.1' |
| 93 | +services: |
| 94 | + teamspeak: |
| 95 | + image: teamspeak |
| 96 | + restart: always |
| 97 | + ports: |
| 98 | + - 9987:9987/udp |
| 99 | + - 10011:10011 |
| 100 | + - 30033:30033 |
| 101 | + environment: |
| 102 | + TS3SERVER_DB_PLUGIN: ts3db_mariadb |
| 103 | + TS3SERVER_DB_SQLCREATEPATH: create_mariadb |
| 104 | + TS3SERVER_DB_HOST: db |
| 105 | + TS3SERVER_DB_USER: root |
| 106 | + TS3SERVER_DB_PASSWORD: example |
| 107 | + TS3SERVER_DB_NAME: teamspeak |
| 108 | + TS3SERVER_DB_WAITUNTILREADY: 30 |
| 109 | + TS3SERVER_LICENSE: accept |
| 110 | + db: |
| 111 | + image: mariadb |
| 112 | + restart: always |
| 113 | + environment: |
| 114 | + MYSQL_ROOT_PASSWORD: example |
| 115 | + MYSQL_DATABASE: teamspeak |
| 116 | +``` |
| 117 | +
|
| 118 | +[](http://play-with-docker.com?stack=https://raw.githubusercontent.com/docker-library/docs/0975c9ae2481c3f988c17d01d62075c9bf772ebb/teamspeak/stack.yml) |
| 119 | +
|
| 120 | +Run `docker stack deploy -c stack.yml teamspeak` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `swarm-ip:9987`, `localhost:9987`, or `host-ip:9987` (as appropriate) with a TeamSpeak client. |
| 121 | + |
| 122 | +## Environment Variables |
| 123 | + |
| 124 | +When you start the `teamspeak` image, you can adjust the configuration of the TeamSpeak server instance by passing one or more environment variables on the `docker run` command line. |
| 125 | + |
| 126 | +### `TS3SERVER_LICENSEPATH` |
| 127 | + |
| 128 | +Sets the path where the TeamSpeak server is looking for the `licensekey.dat`. This variable is the path to the directory where the `licensekey.dat` is supposed to be located. Defaults to /var/ts3server/. |
| 129 | + |
| 130 | +### `TS3SERVER_DB_PLUGIN` |
| 131 | + |
| 132 | +This variable controls what kind of database the TeamSpeak server is using. |
| 133 | + |
| 134 | +### `TS3SERVER_DB_PLUGINPARAMETER` |
| 135 | + |
| 136 | +The content of the this variable is send as `parameter` to the db plugin. |
| 137 | + |
| 138 | +### `TS3SERVER_DB_SQLPATH` |
| 139 | + |
| 140 | +This variable controls where the TeamSpeak server looks for sql files. Defaults to /opt/ts3server/sql/. |
| 141 | + |
| 142 | +### `TS3SERVER_DB_SQLCREATEPATH` |
| 143 | + |
| 144 | +This variable is the path to the sql scripts used to initialize the database. The path is relative to `TS3SERVER_DB_SQLPATH` |
| 145 | + |
| 146 | +### `TS3SERVER_DB_CONNECTIONS` |
| 147 | + |
| 148 | +This variable controls how many concurrent connections to the database are being used. Must be at least 2 and at most 100. Defaults to 10. |
| 149 | + |
| 150 | +### `TS3SERVER_DB_CLIENTKEEPDAYS` |
| 151 | + |
| 152 | +This variable is the amount of days that the TeamSpeak server will keep unused user identities. Users that have been added to a group will not be pruned, but guests will be. |
| 153 | + |
| 154 | +### `TS3SERVER_IP_WHITELIST` |
| 155 | + |
| 156 | +This variable controls where the whitelist is found. The file contains a list of IP addresses which are exempt from the flood protection system. Warning: Do not add any IP addresses that you don't trust, as it will allow them to flood the server. |
| 157 | + |
| 158 | +### `TS3SERVER_IP_BLACKLIST` |
| 159 | + |
| 160 | +This variable controls where the blacklist is found. The file contains a list of IP addresses that, no matter what, can't connect to the server query interface, even after a server restart. |
| 161 | + |
| 162 | +### `TS3SERVER_LOG_PATH` |
| 163 | + |
| 164 | +This variable controls the folder where the server stores its log files. Defaults to /var/ts3server/logs/. |
| 165 | + |
| 166 | +### `TS3SERVER_LOG_QUERY_COMMANDS` |
| 167 | + |
| 168 | +If this variable is set to 1, every query command that is sent to the server will be logged.<br><br>**Warning:** While this can help if you are running into issues with your server, it should be noted that this can cause your log files to become extremely large. Unless you absolutely want all commands to be logged, we recommend this variable to be set to 0 most of the time. |
| 169 | + |
| 170 | +### `TS3SERVER_LOG_APPEND` |
| 171 | + |
| 172 | +If this variable is set to 1, all new log entries are written into a single file per virtual server. We suggest setting this variable to 0 as it will make life easier when looking at the logs. |
| 173 | + |
| 174 | +# Caveats |
| 175 | + |
| 176 | +## Inserting license file |
| 177 | + |
| 178 | +A TeamSpeak server requires a license file when using more then 1 virtual server with 32 slots. For that the licensekey.dat has to be made available to the server. One way is mounting the licensekey.dat into /var/ts3server. |
| 179 | + |
| 180 | +```console |
| 181 | +$ docker run --name some-teamspeak -v /location/to/licensekey.dat:/var/ts3server/licensekey.dat teamspeak:tag |
| 182 | +``` |
| 183 | + |
| 184 | +When the whole data directory (`/var/ts3server/`) has been mounted somewhere, the `licensekey.dat` can be copied inside that directory and will be loaded after the next restart of the TeamSpeak server. |
| 185 | + |
| 186 | +## Where to Store Data |
| 187 | + |
| 188 | +Important note: There are several ways to store data used by applications that run in Docker containers. We encourage users of the `teamspeak` images to familiarize themselves with the options available, including: |
| 189 | + |
| 190 | +- Let Docker manage the storage of your database data [by writing the database files to disk on the host system using its own internal volume management](https://docs.docker.com/engine/tutorials/dockervolumes/#adding-a-data-volume). This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers. |
| 191 | +- Create a data directory on the host system (outside the container) and [mount this to a directory visible from inside the container](https://docs.docker.com/engine/tutorials/dockervolumes/#mount-a-host-directory-as-a-data-volume). This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that e.g. directory permissions and other security mechanisms on the host system are set up correctly. |
| 192 | + |
| 193 | +The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above: |
| 194 | + |
| 195 | +1. Create a data directory on a suitable volume on your host system, e.g. `/my/own/datadir`. |
| 196 | +2. Start your `teamspeak` container like this: |
| 197 | + |
| 198 | +```console |
| 199 | +$ docker run --name some-teamspeak -v /my/own/datadir:/var/ts3server/ -d teamspeak:tag |
| 200 | +``` |
| 201 | + |
| 202 | +The `-v /my/own/datadir:/var/ts3server/` part of the command mounts the `/my/own/datadir` directory from the underlying host system as `/var/ts3server` inside the container, where TeamSpeak by default will write its data files. |
| 203 | + |
| 204 | +Note that users on host systems with SELinux enabled may see issues with this. The current workaround is to assign the relevant SELinux policy type to the new data directory so that the container will be allowed to access it: |
| 205 | + |
| 206 | +```console |
| 207 | +$ chcon -Rt svirt_sandbox_file_t /my/own/datadir |
| 208 | +``` |
| 209 | + |
| 210 | +# License |
| 211 | + |
| 212 | +View [license information](https://github.com/TeamSpeak-Systems/teamspeak-linux-docker-images/blob/master/LICENSE) for the software contained in this image. |
| 213 | + |
| 214 | +As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). |
| 215 | + |
| 216 | +Some additional license information which was able to be auto-detected might be found in [the `repo-info` repository's `teamspeak/` directory](https://github.com/docker-library/repo-info/tree/master/repos/teamspeak). |
| 217 | + |
| 218 | +As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within. |
0 commit comments