This Docker image provides a pre-configured OpenSIPS environment, simplifying deployment and ensuring consistency. It's built on Debian Bookworm and includes many commonly used OpenSIPS modules, along with the opensips-cli for command-line interaction.
OPENSIPS_VERSION build argument to change this.OPENSIPS_CLI=false build argument.TZ environment variable./etc/opensips/opensips.cfg. You can mount your own configuration file to this location./etc/service and a run script for managing the OpenSIPS service.Clone this repository and build the Docker image:
git clone [https://github.com/your-username/opensips-docker.git](https://www.google.com/search?q=https://github.com/your-username/opensips-docker.git) # Replace with your repo URL
cd opensips-docker
docker build -t opensips:latest .
You can customize the OpenSIPS version by setting the OPENSIPS_VERSION build argument:
docker build -t opensips:3.5 -f Dockerfile --build-arg OPENSIPS_VERSION=3.5 .
To disable the OpenSIPS CLI, use:
docker build -t opensips:no-cli -f Dockerfile --build-arg OPENSIPS_CLI=false .
Running the Container Run the Docker container, mapping port 5060 (UDP) and setting the timezone:
docker run -d -p 5060:5060/udp -e TZ="Your/Timezone" -v /path/to/your/opensips.cfg:/etc/opensips/opensips.cfg opensips:latest
Replace Your/Timezone with your desired timezone (e.g., America/New_York, Europe/London, Asia/Ho_Chi_Minh). Mount your custom opensips.cfg file by replacing /path/to/your/opensips.cfg with the actual path.
For more complex deployments, using Docker Compose is recommended. Create a docker-compose.yml file:
version: "3.9" # Or your preferred version
services:
opensips:
image: opensips:latest
ports:
- "5060:5060/udp"
environment:
TZ: "Your/Timezone"
volumes:
- ./your_opensips_config:/etc/opensips/opensips.cfg # Mount your config
restart: always # Optional: Restart policy
Then, start the container using Docker Compose:
docker-compose up -d
Customizing the Configuration The default OpenSIPS configuration is located at /etc/opensips/opensips.cfg inside the container. You can customize this configuration by mounting your own file to this path using the -v flag (as shown in the examples above).
Content type
Image
Digest
sha256:05e9408ac…
Size
489.8 MB
Last updated
7 months ago
docker pull mich43l/opensips