Sign inSign up

deepcomp/icecast2

By deepcomp

•Updated almost 5 years ago

Alpine based Icecast2 container with env_variables

Image
6

10K+

deepcomp/icecast2 repository overview

Icecast⁠ container, based on Alpine Linux.

Supported platforms: AMD64 (X86-64), 32 bit (I386), ARMHF (e.g. Raspberry-pi) and ARM64 (E.G. Raspberry-PI OS 64 bit or Oracle Ampere instances).

You can run it with simple docker run command, or docker-compose.

You can use environment variables. If you not set one or more, the default values will be used.
VariabledescriptionDefault value (if possible)
ICECAST_SOURCE_PASSWORDSource password. You must use that when you broadcast to the serverhackme
ICECAST_ADMIN_USERAdministrator account's usernameadmin
ICECAST_ADMIN_PASSWORDAdministrator account's passwordhackme
ICECAST_SERVER_HOSTServer host. It used when you want to listen the server in radio directories, and itt shown on server version page.localhost
TZDefault timezoneUTC
In the following example, the source password is pw and other variables are defaults. docker run -p 8000:8000 -e ICECAST_SOURCE_PASSWORD=pw deepcomp/icecast2 If you want, you can build manualy your configuration. The Icecast config style on Alpine different than Debian, so I suggest to write the default config to a file in first step. docker run --rm -it --entrypoint cat deepcomp/icecast2 /etc/icecast.xml.sample > icecast.xml To build the best config, the official documentation available here⁠. After that, you must mount it if you want to use. If you use your own config file, the env variables omitted. docker run -p 8000:8000 -v `pwd`/icecast.xml:/etc/icecast.xml --rm -it deepcomp/icecast2 We always expose the port 8000 to host. If you want, you can change the exposed (left from the : character). If your Icecast container is running, but you want to change the configuration, you can do it. The one required thing is the world readable icecast.xml or change ownership, because the Icecast in the container uses the uid and gid 100:101. docker run --rm -it --entrypoint cat deepcomp/icecast2 /etc/icecast.xml.sample > icecast.xml chmod +r icecast.xml docker run -p 8000:8000 -v `pwd`/icecast.xml:/etc/icecast.xml --rm -d --name icecast deepcomp/icecast2 IF you start with mounted config, you can change values in icecast.xml. For example, change the location (near the top), from Earth to Docker. Save it, and exec a reload command in the icecast container. Edit with: nano icecast.xml We started the container with --name parameter, so we can exec a reload command in icecast container. docker exec -it icecast reload Check the http://localhost:8000/server_version.xsl URL before and after the last command. With reload, you can reload your config without restart the server, so with this solution the reload without downtime is possible. If you prefer docker-compose⁠, you can set up your container in a docker-compose file.

Here is an example with env variables:

version: "3"
services:
  icecast:
    container_name: icecast
    image: deepcomp/icecast2
    ports:
      - "8000:8000"
    environment:
      - ICECAST_SOURCE_PASSWORD=Docker
      - TZ=Europe/Budapest

Or you can mount your own icecast.xml.

version: "3"
services:
  icecast:
    container_name: icecast
    image: deepcomp/icecast2
    ports:
      - "8000:8000"
    environment:
      - TZ=Europe/Budapest
    volumes:
      - ./icecast.xml:/etc/icecast.xml

Finaly, if you are an expert, you can mount an own web (/usr/share/web) directory. If you mount an empty folder, the container loads here the default web folder, and you can edit the files. So if neccessary, you can use an own webui.

Tag summary

Content type

Image

Digest

Size

8.1 MB

Last updated

almost 5 years ago

docker pull deepcomp/icecast2