Installation
How to start and configure the Core via Docker.
Quick start
1. Install Docker if not present
2. Continue with the Beginner's Guide
BeginnerDocker images
Select the CPU architecture and, if desired, the GPU support:
docker run {...params} datarhei/core:latestdocker run {...params} --privileged datarhei/core:rpi-latestHint: raspi-config requires gpu_mem=256 or more.
docker run {...params} --runtime=nvidia datarhei/core:cuda-latestdocker run {...params} --volume /dev/dri:/dev/dri datarhei/core:vaapi-latestDocker run {...params}
All default values can be changed and are described on the Configuration page.
Complete example:
docker run --detach --name core \
--privileged \
--security-opt seccomp=unconfined \
--env CORE_API_AUTH_ENABLE=true \
--env CORE_API_AUTH_USERNAME=admin \
--env CORE_API_AUTH_PASSWORD=datarhei \
--publish 1935:1935 \
--publish 1936:1936 \
--publish 6000:6000/udp \
--publish 8080:8080 \
--publish 8181:8181 \
--volume ${PWD}/core/config:/core/config \
--volume ${PWD}/core/data:/core/data \
datarhei/core:latestdocker run --detach --name core --privileged --security-opt seccomp=unconfined --env CORE_API_AUTH_ENABLE=true --env CORE_API_AUTH_USERNAME=admin --env CORE_API_AUTH_PASSWORD=datarhei --publish 1935:1935 --publish 1936:1936 --publish 6000:6000/udp --publish 8080:8080 --publish 8181:8181 --volume %USERPROFILE%/core/config:/core/config --volume %USERPROFILE%/core/data:/core/data datarhei/core:latestDirectory exports
docker ...
--volume $HOST_DIR:$CORE_DIR \
...$HOST_DIR can be adjusted without reconfiguring the app. For the $CORE_DIR, check the configuration instructions.
Configuration directory
--volume ${PWD}/core/config:/core/configDirectory for holding the config and operational data.
Data directory
--volume ${PWD}/core/data:/core/dataDirectory on disk, exposed on HTTP path “/“.
Port
docker ...
--publish $HOST_PORT:$CORE_PORT \
...$HOST_PORT can be adjusted without reconfiguring the app. For the $CORE_PORT, check the configuration instructions.
HTTP Port
--publish 8080:8080HTTP listening address.
HTTPS Port
--publish 8181:8181HTTPS listening address.
RTMP Port
--publish 1935:1935RTMPS Port
--publish 1936:1936RTMP server listen address.
SRT Port (UDP)
--publish 6000:6000/udpSRT server listen address.
docker ...
--net=host \
...With --net=host the container is started without network isolation. In this case, port forwarding is not required.
Environment variables
docker ...
--env CORE_API_AUTH_ENABLE=true \
--env CORE_API_AUTH_USERNAME=admin \
--env CORE_API_AUTH_PASSWORD=datarhei \
...More in the Configuration instructions.
Device access
--privilegedAllow FFmpeg to access GPU's, USB and other devices available in the container.
Network issues (seccomp)
If seccomp is active and no internal-to-external communication is possible:
--security-opt seccomp=unconfinedDocker commands
Start in background
docker run --detach --name core {params ...} {image}Stop
docker stop coreKill and remove the instance
docker kill core
docker rm coreUpdate the local image and restart the Core
docker pull {image}
docker kill core
docker rm core
docker run {params ...} {image}Top
docker top coreLogging
docker logs core -fSystemd
To manage the Core container via systemd (systemd is a Linux process daemon.)
Service file
[Unit]
Description=datarhei Core
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=0
Restart=always
ExecStart=/usr/bin/docker run \
--rm --name core --privileged \
--security-opt seccomp=unconfined \
-v /opt/core/config:/core/config \
-v /opt/core/data:/core/data \
-p 8080:8080 -p 8181:8181 \
-p 1935:1935 -p 1936:1936 \
-p 6000:6000/udp \
datarhei/core:latest
ExecStop=/usr/bin/docker kill core
[Install]
WantedBy=multi-user.targetCommands
Install
systemctl daemon-reload && systemctl enable core.serviceUninstall
systemctl disable core.serviceStart
systemctl start core.serviceStop
systemctl stop core.serviceUpdate image
docker pull datarhei/core:latest && \
systemctl restart core.serviceStatus
systemctl status core.serviceLogging
journald -u core.service -fLast updated
Was this helpful?
