This article describes how to run Wowza Streaming Engine™ media server software in a local Linux Docker container.
Note: For more information about Docker, see Docker overview.
Get started with Docker
Before you can install and use Wowza Streaming Engine, you must install Docker on the platform you've decided to use for your server. After Docker is installed, you must verify that the installation is working as expected. To do this, open a Terminal window and run a Docker command such as:
docker version
Where:
- docker tells your operating system that you're using the Docker program
- version is a command that returns the installed version of Docker
If you aren't familiar with Docker images and containers, we recommend completing the Docker Orientation and Setup before continuing.
License Wowza Streaming Engine on Docker
You must bring your own license (BYOL) for Wowza Streaming Engine. With a BYOL license, you can use any Wowza Streaming Engine Subscription or Perpetual license key with your Docker container. BYOL licensees have access to all Wowza Streaming Engine functionality and features, including Transcoder (for 64-bit instances only), nDVR, and DRM.
Wowza Streaming Engine images for Docker
Wowza Media Systems provides Wowza Streaming Engine images for use with Linux Docker containers to Docker Hub in the wowzamedia/wowza-streaming-engine-linux repository. In the repository, click the Tags tab at the top of the page to see a list of the available versions of Wowza Streaming Engine software.
Note: The latest software image is Wowza Streaming Engine 4.8.28. See the Wowza Streaming Engine 4.8.28 Release Notes.
Open Terminal and run the following command to pull the Wowza Streaming Engine image version from Docker Hub that you want to run:
docker pull wowzamedia/wowza-streaming-engine-linux:[version]
Where [version] is replaced with a tag name from the Wowza Streaming Engine repository or latest, which pulls the most recent version.
Create a Wowza Streaming Engine server
After installing Docker and pulling the version of the Wowza Streaming Engine repository that you want to run, open Terminal and run a command similar to the following to create a local container and run the Wowza Streaming Engine image that you pulled from Docker Hub:
docker run -it --name [container-name] --entrypoint /sbin/entrypoint.sh [repository]:[version]
Where:
- docker run first creates a writeable container and starts using the specified commands.
- -it or -d:
-it instructs Docker to allocate a pseudo-TTY connected to the container's stdin.
-d instructs Docker to run the container in the background and print the container ID. - --name assigns a name to the local container that's created. This command isn't required, but we recommend using it because it simplifies container management.
- --entrypoint overwrites the default entrypoint of the image.
- [repository]:[version] is the name of the repository on Docker Hub (wowzamedia/wowza-streaming-engine-linux) and the Wowza Streaming Engine software version that you pulled. Replace [version] with the tag name from the repository or latest. If you don't specify a version, latest is used.
Notes:
- The latest repository version is defined by the repository owner. It isn't guaranteed to be the most recent version of the repository's software.
- If environment variables aren't specified in the command, the Wowza Streaming Engine Manager user name and password both default to wowza, a Wowza Streaming Engine Trial license is used, and the server IP address defaults to localhost. For more information, see Additional parameters, below.
- If you don't expose ports, Wowza Streaming Engine Manager won't be accessible.
Additional parameters
There are additional parameters that you can choose to add to the command in order to expose ports, enable external access to the container, and define environment variables. For example:
docker run -it --name [container-name] --restart always --expose 1935/tcp --expose 8086/tcp --expose 8087/tcp --expose 8088/tcp --publish 1935:1935 --publish 8086:8086 --publish 8087:8087 --publish 8088:8088 --volume /Users/me/Documents/logs:/usr/local/WowzaStreamingEngine/logs --entrypoint /sbin/entrypoint.sh --env WSE_MGR_USER=[username] --env WSE_MGR_PASS=[password] --env WSE_LIC=[license] --env WSE_IP_PARAM=[wowza-ip-address] [repository]:[version]
Where:
- --restart specifies a restart policy to apply when the container exits. --restart always means the container always restarts upon exit regardless of the exit status.
- --expose enables inter-container communication. For example, the wowzamedia/wowza-streaming-engine-linux container includes two processes (Wowza Streaming Engine and Wowza Streaming Engine Manager) that you'll probably want to communicate with each other.
- --publish enables external access to the container and the processes running in the container.
- --volume binds the mount volumes for use with Wowza Streaming Engine. This command isn't required, but we recommend using it because it prevents the log files from filling the container's primary hard drive. Examples of mount volumes you might want to bind for logs:
- --volume /Users/me/Documents/logs1:/usr/local/WowzaStreamingEngine/logs
- --volume /Users/me/Documents/logs2:/usr/local/WowzaStreamingEngine/manager/logs
- --volume /Users/me/Documents/logs3:/supervisor/supervisord.log
- --env sets an environment variable. The following environment variables are optional runtime configurations:
- --env WSE_MGR_USER specifies a username for Wowza Streaming Engine Manager. In this example, the username is admin. If this parameter isn't used, the user name defaults to wowza.
- --env WSE_MGR_PASS specifies a password for Wowza Streaming Engine Manager. Replace [password] with the password you want to use. If this parameter isn't included, the password defaults to wowza.
- --env WSE_LIC is your Wowza Streaming Engine license. Replace [license] with your license code. If this parameter isn't used or an invalid license is provided, the software will operate in Trial mode.
- --env WSE_IP_PARAM specifies the internal IP address for the container. Replace [wowza-ip-address] with the IP address you're assigning to the container. If this parameter isn't used, the IP address defaults to localhost.
Note: Docker doesn't support IPv6 addresses. You must use an IPv4 address.
Connect to the server
After you've executed the docker run command to create the Wowza Streaming Engine container, you can use a new Terminal window to manage the container(s).
List containers
To list the running containers, execute the following command:
docker ps
Append -a or --all to the command to list all containers regardless of their status:
docker ps -a
Log in to the image
When the container is running, you can use the following command to log in to the image:
docker exec -it [container-name] bash
Where exec runs a command within a container and [container-name] is the name of the container.
Inspect the container
If you want detailed information about a running container, such as the container state, container configuration, environment and network information, and so on, execute the following command:
docker inspect [container-name]
Access Wowza Streaming Engine Manager
- In a new browser window on your computer, tablet, or phone, open Wowza Streaming Engine Manager using the following URL:
http://[WSE_IP_PARAM]:8088/enginemanager
Where: [WSE_IP_PARAM] is the container's IP address. - Sign in to Wowza Streaming Engine Manager using the credentials that you created ([WSE_MGR_USER] and [WSE_MGR_PASS]).
- If you didn't add your Wowza Streaming Engine license key to [WSE_LIC] during container setup, follow the instructions in Add license keys to replace the temporary license key with your Subscription or Perpetual license key for Wowza Streaming Engine.
Stop the server
When you're finished using the container, use the following command to stop the container:
docker stop [container-name]
Note: A stopped container can be restarted using the start command:
docker start [container-name]
Logs and libraries persist when a container is stopped, so you can resume using it without reconfiguring the container.
If you don't intend to use the container again, it's important that you remove the container and the container artifacts after stopping it. Use the following command:
Important: The remove command is permanent. You can't recover a container that you have removed.
docker rm [container-name]
Troubleshooting
The following commands can be useful when troubleshooting and cleaning up unwanted Docker containers and artifacts.
- Untagged containers – To view a list of untagged containers, execute the command:
docker images | grep "^<none>" | awk "{print $3}"
After reviewing the list of untagged containers, use the following command to remove the listed containers:
docker rmi -f $(docker images | grep "^<none>" | awk "{print $3}")
- Exited containers – To view a list of containers that you have exited, execute the command:
docker ps -a | grep "Exited" | awk '{print $1}'
After reviewing the list, use the following command to remove all of the listed containers:
docker rm -f $(docker ps -a | grep "Exited" | awk '{print $1}')
- Stopped containers – To view a list of all stopped containers, execute the command:
docker ps -a -q
After reviewing the list, use the following command to remove all of the listed containers:
docker rm $(docker ps -a -q)
- Configure supervisor – Use the /etc/supervisor/conf.d/WowzaStreamingEngine.conf file to configure the process manager (supervisor). You might also want to mount a volume for supervisor-related logs (--volume /Users/me/Documents/logs3:/supervisor/supervisord.log).
Admin
— Rachael S on 04/17/2020
Because of the nature of Docker containers, in-depth custom configurations of Wowza Streaming Engine aren't recommended because it would be lost every time the container is redeployed or scaled. If you do need to modify configurations, we recommend using Wowza Streaming Engine Manager to do so. Alternatively, it would probably be possible for you to change the location of the configuration files to a volume mount in order to store it outside of the container (and thereby preserve your changes). If you choose this option, be sure that the mounted conf directory contains all necessary configuration files by copying them over from the container.
— Niels on 02/20/2019
where do i find the config files when i have installed it using this docker image? Application.xml etc