From 618a16c56ea1226f544d81ba6b5554dc658b7ad7 Mon Sep 17 00:00:00 2001 From: Pasha Date: Sat, 26 Mar 2022 01:44:44 +0500 Subject: [PATCH] Dockerfile updated - args default values - MYSQL_PORT arg added --- README.md | 1 + runtimes/Dockerfile | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9c21296..ee027fc 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ services: dockerfile: Dockerfile args: UDP_PORT: '${UDP_PORT:-5060}' + MYSQL_PORT: '${FORWARD_DB_PORT:-3306}' MYSQL_DATABASE: '${DB_DATABASE}' MYSQL_USER: '${DB_USERNAME}' MYSQL_PASSWORD: '${DB_PASSWORD}' diff --git a/runtimes/Dockerfile b/runtimes/Dockerfile index 598e9d3..3edc4bc 100644 --- a/runtimes/Dockerfile +++ b/runtimes/Dockerfile @@ -3,10 +3,11 @@ FROM ubuntu:21.10 LABEL maintainer="Hassan Raza Pasha" ARG ASTERISK_VERSION=19 -ARG UDP_PORT -ARG MYSQL_DATABASE -ARG MYSQL_USER -ARG MYSQL_PASSWORD +ARG UDP_PORT=5060 +ARG MYSQL_PORT=3306 +ARG MYSQL_DATABASE=asterisk +ARG MYSQL_USER=sail +ARG MYSQL_PASSWORD=password WORKDIR /etc/asterisk @@ -63,6 +64,7 @@ RUN apt update \ COPY odbc.ini /etc/odbc.ini +RUN sed -i "s/MYSQL_PORT/$MYSQL_PORT/g" /etc/odbc.ini; RUN sed -i "s/MYSQL_DATABASE/$MYSQL_DATABASE/g" /etc/odbc.ini; RUN sed -i "s/MYSQL_USER/$MYSQL_USER/g" /etc/odbc.ini; RUN sed -i "s/MYSQL_PASSWORD/$MYSQL_PASSWORD/g" /etc/odbc.ini;