- Dockerfile
- FROM ubuntu ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get upgrade -y \ && apt-get install -y wget \ && apt-get install --no-install-recommends -y php-cli php-curl sox libsox-fmt-all libsox-fmt-mp3 \ && wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz \ && tar zxvf asterisk* \ && rm *.gz \ && apt-get install -y git curl libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev libedit-dev nano \ && cd asterisk* \ && ./configure --with-pjproject-bundled \ && make menuselect \ && make \ && make install \ && make config \ && make samples \ && ldconfig ENTRYPOINT ["/usr/sbin/asterisk"] CMD ["-f"]
-----------------------------------------------------------------------------------------------
- docker-compose.yml
- version: "3"
services:
asterisk-tts:
image: asterisk-tts:1.0
build: '/opt/asterisk_docker'
container_name: asterisk-tts
network_mode: host
restart: always
volumes:
- /opt/asterisk_docker/asterisk/pjsip.conf:/etc/asterisk/pjsip.conf
- /opt/asterisk_docker/asterisk/extensions.conf:/etc/asterisk/extensions.conf
- /opt/asterisk_docker/asterisk/manager.conf:/etc/asterisk/manager.conf
# Add additional volumes or settings if needed =======================================================
Start the image
docker build -t asterisk-tts:1.0 .
Run the container from the image
docker compose up -d
Check the container is running
docker ps
RUN it
docker exec -it container-id /bin/bash
Remove the image if not needed
docker image rm image-id
Remove exited containers
docker rm $(docker ps --filter status=exited -q)
https://pastebin.com/UbW1nhHM
https://pastebin.com/xapzVsDJ
No hay comentarios:
Publicar un comentario