### Description Docker container at runtime is configured using environment vars. Kamailio now not supports configure memory using environment vars and need use workarroud like [entrypoint.sh](https://github.com/kamailio/kamailio/blob/master/pkg/kamailio/alpine_docker/...).
I want remove this workarround but need to add ability to configure kamailio memory using vars `SHM_MEMORY` and `PKG_MEMORY` when kamailio started without `-m` and `-M` keys
i think you can set shm_mem_size in script to a #DEFINE that can be overridden with -A
in script
#DEFINE SHM_MEM 64
shm_mem_size = #DEFINE
then kamailio -A SHM_MEM=32
haven't tried it, but Daniel mentioned -A in the devel meeting.
not sure if there's a pkg_mem we can also use.
________________________________ From: sr-dev sr-dev-bounces@lists.kamailio.org on behalf of sergey-safarov notifications@github.com Sent: Thursday, September 28, 2017 8:47:21 AM To: Kamailio Devel List Cc: Subscribed Subject: [sr-dev] [kamailio/kamailio] memory configuration using environment vars (#1252)
Description
Docker container at runtime is configured using environment vars. Kamailio now not supports configure memory using environment vars and need use workarroud like entrypoint.shhttps://github.com/kamailio/kamailio/blob/master/pkg/kamailio/alpine_docker/entrypoint.sh.
I want remove this workarround but need to add ability to configure kamailio memory using vars SHM_MEMORY and PKG_MEMORY when kamailio started without -m and -M keys
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/kamailio/kamailio/issues/1252, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AF36ZbTOBRJvkq6OuGbbDi4stexxgAN-ks5sm08JgaJpZM4Pm2tJ.
To understand properly first, in docker one cannot pass easily arguments to an application (kamailio in this case)? Kamailio has many parameters, not only for memory, not sure it is the right approach to look for an environment variable for all of them.
I looked to other approach to pass program keys We can use [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#exec-form-entrypoint-examp...) like ``` ENTRYPOINT ["kamailio", "-DD", "-E"] ``` And later run container as ``` docker run -it kamailio/kamailio -m 64 -M 8 ``` I create PC
Closed #1252.
This is no longer needed, closing it.