title: docker compose - add python to LAMP
body: <p>In linux I build a blog application that is based on mysql, apache2 and php. But I use some python for it. The python is for adapting python Pygments that is described there <a href="https://davidwalsh.name/pygments-php-wordpress" rel="nofollow noreferrer">https://davidwalsh.name/pygments-php-wordpress</a> .</p>
  
  <p>I prepared docker compose stage that works fine but python does not work in it. How to add python to docker compose?</p>
  
  <p>Here are my files:</p>
  
  <pre><code>root@debian:/usr/local/share/a22php7m55# cat docker-compose.yml 
  version: "2.1"
  
  services:
      apachephp:
          build: ./a22php7/
          ports:
              - 8888:80
          volumes:
              - "/etc/passwd:/etc/passwd:ro"
              - "/etc/group:/etc/group:ro"
              - "${PROJECT_ROOT}:/var/www/html"
          networks:
              - database
              - server
          depends_on:
              - mysql
          container_name: ap47
  
  
      mysql:
          image: mariadb:5.5
          volumes:
              - ${MYSQL_DATA}:/var/lib/mysql
          networks:
              - database
          environment:
              MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
              MYSQL_DATABASE: "${MYSQL_NAME}"
              MYSQL_USER: "${MYSQL_USERNAME}"
              MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
          container_name: maria47
  
      phpmyadmin:
          image: phpmyadmin/phpmyadmin
          ports:
              - 8080:80
          networks:
              - database
          depends_on:
              - mysql
          environment:
              PMA_HOST: mysql
          container_name: pma47
  
  volumes:
      mariadb:
  
  networks:
      database:
      server:
  
  root@debian:/usr/local/share/a22php7m55# cat a22php7/
  </code></pre>
  
  <hr>
  
  <pre><code>root@debian:/usr/local/share/a22php7m55# cat a22php7/Dockerfile 
  FROM php:7.1.3-apache
  RUN docker-php-ext-install pdo pdo_mysql
  root@debian:/usr/local/share/a22php7m55# 
  </code></pre>