docker-compose environment variables inside container

I have a small python app developed with docker containers.

My setup is:

Dockerfile

FROM python:3

ARG http_proxy
ARG https_proxy

ENV http_proxy ${http_proxy}
ENV https_proxy ${https_proxy}
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN apt-get update
RUN apt install -y vim screen
RUN 
    echo 'alias py="/opt/venv/bin/python"' >> /root/.bashrc && 
    echo 'alias ls="ls --color=auto"' >> /root/.bashrc && 
    echo 'PS1="[email protected]:[e[33m]w[e[0m]$ "' >> /root/.bashrc
RUN python3 -m venv $VIRTUAL_ENV
WORKDIR /app   
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

docker-compose.yml

version: '3.8'

x-dev:
    &proxy_conf
    http_proxy: "${HTTP_PROXY}"
    https_proxy: "${HTTPS_PROXY}"
services:
    py_service:
        container_name: ${APP_NAME}
        build:
            context: .
            dockerfile: Dockerfile
            args: *proxy_conf
        image: ${APP_NAME}_img
        volumes:
        - '.:/app'
        restart: always
        command: tail -f /dev/null

.env

HTTP_PROXY=<http_proxy_server_here>
HTTPS_PROXY=<https_proxy_server_here>
APP_NAME=python_app

The problem is if the proxy server has changed i need to rebuild the image and i don’t want that(as a last result maybe i will do it).

What i’m trying to do is change the proxy environment variables inside the container but i don’t find the file where the env is stored.

The container OS version is:

[[email protected] ~ >>>] $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Source: Dockerfile Questions