title: "docker-compose up" Error : can not start service php: OCI runtime create failed: container_linux.go:345
body: <p>I have installed docker on <strong>ubuntu</strong> and <strong>mac os</strong>. "<code>docker-composer up</code>" command works as expected on ubuntu and mac.</p>
  
  <p>But on <strong>windows 8</strong>, I have installed docker toolbox and run "<code>docker-compose up</code>" command. I'm getting <strong>error while creating php-container</strong>.</p>
  
  <blockquote>
    <p>Below is the screenshot of error:</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/bgSYk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bgSYk.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>Below is the docker-compose.yml file</p>
  </blockquote>
  
  <pre><code>version: "3.2"
  services:
    php:
      build: './php/'
      container_name: php-container
      networks:
        - backend
      volumes:
        - ./code/:/var/www/html/
        - ./php/config/php.ini:/usr/local/etc/php/conf.d/php.ini
        - ./php/config/mcrypt.so:/usr/local/lib/php/extensions/no-debug-non-zts-20151012/mcrypt.so
      links:
        - redis:redis
    nginx:
      container_name: nginx-container
      image: nginx:latest
      depends_on:
        - php
        - mysql
      ports:
          - "80:80"
      networks:
        - frontend
        - backend
      volumes:
          - ./code/:/var/www/html/
          - ./site.conf:/etc/nginx/conf.d/default.conf
      links:
          - php
    mysql:
      image: mysql:5.6.40
      container_name: mysql-container
      networks:
        - backend
      environment:
        - MYSQL_ROOT_PASSWORD=password
      volumes:
        - /var/lib/postgresql/data
    phpmyadmin:
      image: phpmyadmin/phpmyadmin
      container_name: phpmyadmin-container
      networks:
        - backend
      depends_on:
        - mysql
      links:
        - mysql:mysql
      ports:
        - 8088:80
      environment:
        PMA_HOST: mysql
        MYSQL_USERNAME: abcxyz
        MYSQL_ROOT_PASSWORD: 321654987
  networks:
    frontend:
    backend:
  </code></pre>
  
  <blockquote>
    <p>Below is the dockerfile for php</p>
  </blockquote>
  
  <pre><code>FROM php:7.0.32-fpm
  RUN apt-get update &amp;&amp; apt-get install -y \
          libfreetype6-dev \
          libjpeg62-turbo-dev \
          libpng-dev \
      &amp;&amp; docker-php-ext-install -j$(nproc) iconv \
      &amp;&amp; docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
      &amp;&amp; docker-php-ext-install -j$(nproc) gd
  RUN docker-php-ext-install mysqli
  RUN pecl install -o -f redis \
  &amp;&amp;  rm -rf /tmp/pear \
  &amp;&amp;  docker-php-ext-enable redis
  
  
  RUN apt-get -qq update &amp;&amp; apt-get -qq -y install  \
      automake \
      cmake \
      g++ \
      git \
      libicu-dev \
      libmagickwand-dev \
      libpng-dev \
      librabbitmq-dev \
      libreadline-dev \
      pkg-config \
      ssh-client \
      supervisor \
      zlib1g-dev \
    &amp;&amp; docker-php-ext-install \
      bcmath \
      gd \
      intl \
      opcache \
      pdo_mysql \
      sockets \
      zip \
    &amp;&amp; git clone git://github.com/alanxz/rabbitmq-c.git \
      &amp;&amp; cd rabbitmq-c \
      &amp;&amp; mkdir build &amp;&amp; cd build \
      &amp;&amp; cmake -DENABLE_SSL_SUPPORT=OFF .. \
      &amp;&amp; cmake --build . --target install  \
      &amp;&amp; pecl install amqp imagick xdebug igbinary \
    &amp;&amp; docker-php-ext-enable amqp imagick xdebug igbinary \
    &amp;&amp; version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
      &amp;&amp; curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
      &amp;&amp; mkdir -p /tmp/blackfire \
      &amp;&amp; tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
      &amp;&amp; mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
      &amp;&amp; printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" &gt; $PHP_INI_DIR/conf.d/blackfire.ini \
      &amp;&amp; curl -A "Docker" -L https://blackfire.io/api/v1/releases/client/linux_static/amd64 | tar zxp -C /tmp/blackfire \
      &amp;&amp; mv /tmp/blackfire/blackfire /usr/bin/blackfire \
      &amp;&amp; rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz \
    &amp;&amp; rm -rf /var/lib/apt/lists/*
  
  RUN apt-get update &amp;&amp; apt-get install -y \
          libmcrypt-dev \
      &amp;&amp; docker-php-ext-install -j$(nproc) iconv mcrypt \
      &amp;&amp; docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
      &amp;&amp; docker-php-ext-install -j$(nproc) gd
  
  
  RUN apt-get install -y libxslt-dev
  RUN apt-get install -y zlibc
  RUN docker-php-ext-install xsl
  RUN curl -s https://getcomposer.org/installer | php
  RUN mv composer.phar /usr/local/bin/composer
  </code></pre>