I'm trying to edit the php.ini inside Docker, so I need to do docker-compose up. But every time I do docker-compose up, php.ini returns as it was before.
            Asked
            
        
        
            Active
            
        
            Viewed 2,162 times
        
    1 Answers
1
            Better to mount the php.ini from the host, as docker-compose up will terminate the container and will launch a new container which does not container the modified php.ini.
volumes:
   - ./config/custom.php.ini:/etc/php(version)/apache2/conf.d/custom.php.ini
By default the scan directory for extra php files will look in the conf.d directory. These files will overwrite the settings of the main php.ini. I tested this with the asp_tag option turning it Off and On. It works fine as long as you do the following below.
The trick to making this work is to use
docker-compose downinstead ofdocker-compose kill
 
    
    
        Adiii
        
- 54,482
- 7
- 145
- 148
 
    