Opensips control panel
688
This Dockerfile builds a containerized environment for the OpenSIPS Control Panel (OpenSIPS-CP) running on Debian Bookworm with Apache2 and PostgreSQL support.
The following environment variables are used to configure OpenSIPS-CP:
| Variable | Default Value | Description |
|---|---|---|
DB_DRIVER | pgsql | Database driver to use |
PG_HOST | localhost | PostgreSQL host |
PG_PORT | 5432 | PostgreSQL port |
PG_USER | opensips | Database user |
PG_PASSWORD | opensipsrw | Database password |
PG_DATABASE | opensips | OpenSIPS database name |
OPENSIPS_IP | 127.0.0.1 | OpenSIPS instance IP address |
To build the container image:
docker build -t opensips-cp .
Run the container with:
docker run -d \
--name opensips-cp \
-e PG_HOST=your_postgresql_host \
-e PG_USER=your_db_user \
-e PG_PASSWORD=your_db_password \
-e PG_DATABASE=your_db_name \
-e OPENSIPS_IP=your_opensips_ip \
-p 80:80 \
opensips-cp
To persist configuration files and data, you can mount the following volumes:
docker run -d \
--name opensips-cp \
-v /your/local/opensips:/etc/opensips \
-v /your/local/apache2:/etc/apache2 \
-v /your/local/opensips-cp:/var/www/html/opensips-cp \
-e PG_HOST=your_postgresql_host \
-e PG_USER=your_db_user \
-e PG_PASSWORD=your_db_password \
-e PG_DATABASE=your_db_name \
-e OPENSIPS_IP=your_opensips_ip \
-p 80:80 \
opensips-cp
The container automatically checks if the OpenSIPS-CP schema is present in the database. If not, it initializes it. Ensure that the database credentials are correctly set for successful initialization.
To check the container logs:
docker logs -f opensips-cp
To stop the running container:
docker stop opensips-cp
To remove the container:
docker rm opensips-cp
This project is licensed under the MIT License.
Contributions are welcome! Please submit pull requests for any improvements or bug fixes.
Content type
Image
Digest
sha256:fe491db0f…
Size
377.9 MB
Last updated
over 1 year ago
docker pull mich43l/opensips-cp