Skip to content

Commit

Permalink
Dockerfile updated
Browse files Browse the repository at this point in the history
- args default values
- MYSQL_PORT arg added
  • Loading branch information
paxha committed Mar 25, 2022
1 parent d343769 commit 618a16c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Expand Down
10 changes: 6 additions & 4 deletions runtimes/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 618a16c

Please sign in to comment.