title: Docker - Composer Install - "requires ext-soap"
body: <p>This morning I've to build a new docker and I'm getting the following issue, I've already tried installing soap through dockerfile and still no luck.</p>
  <p>Is there something I'm missing?</p>
  <blockquote>
  <p>Problem 1
  - clearbooks/clearbooks-soap-php is locked to version 1.0.16 and an update of this package was not requested.
  - clearbooks/clearbooks-soap-php 1.0.16 requires ext-soap * -&gt; it is missing from your system. Install or enable PHP's soap extension.</p>
  <p>To enable extensions, verify that they are enabled in your .ini files:
  -
  - /usr/local/etc/php/conf.d/docker-php-ext-exif.ini
  - /usr/local/etc/php/conf.d/docker-php-ext-gd.ini
  - /usr/local/etc/php/conf.d/docker-php-ext-pcntl.ini
  - /usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini
  - /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
  - /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
  - /usr/local/etc/php/conf.d/local.ini You can also run <code>php --ini</code> inside terminal to see which files are used by PHP in CLI mode.</p>
  </blockquote>
  <p>I've noticed when running <code>php -m</code> - soap isn't actually there.</p>
  <pre><code>$ php -m
  [PHP Modules]
  Core
  ctype
  curl
  date
  dom
  exif
  fileinfo
  filter
  ftp
  gd
  hash
  iconv
  json
  libxml
  mbstring
  mysqlnd
  openssl
  pcntl
  pcre
  PDO
  pdo_mysql
  pdo_sqlite
  Phar
  posix
  readline
  Reflection
  session
  SimpleXML
  sodium
  SPL
  sqlite3
  standard
  tokenizer
  xml
  xmlreader
  xmlwriter
  zip
  zlib
  
  [Zend Modules]
  </code></pre>
  <p><strong>docker-compose.yml:</strong></p>
  <pre><code>version: '3'
  services:
  
    #PHP Service
    app:
      build:
        context: .
        dockerfile: Dockerfile
      image: customphp/latest
      container_name: app
      restart: unless-stopped
      tty: true
      environment:
        SERVICE_NAME: app
        SERVICE_TAGS: dev
      working_dir: /var/www
      volumes:
        - ./:/var/www
        - ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
      networks:
        - app-network
  
    #Nginx Service
    webserver:
      image: nginx:alpine
      container_name: webserver
      restart: unless-stopped
      tty: true
      ports:
        - 5001:5001
      volumes:
        - ./:/var/www
        - ./nginx/conf.d/:/etc/nginx/conf.d/
      networks:
        - app-network
  
    #MySQL Service
    db:
      image: mysql:5.7.33
      container_name: db
      restart: unless-stopped
      tty: true
      ports:
        - 3306:3306
      environment:
        MYSQL_HOST: mysql
        MYSQL_DATABASE: localdb
        MYSQL_USER: localdb
        MYSQL_ROOT_PASSWORD: password
        SERVICE_TAGS: dev
        SERVICE_NAME: mysql
      volumes:
        - dbdata:/var/lib/mysql/
        - ./mysql/my.cnf:/etc/mysql/my.cnf
      networks:
        - app-network
  
  #Docker Networks
  networks:
    app-network:
      driver: bridge
  
  #Volumes
  volumes:
    dbdata:
      driver: local
  </code></pre>
  <p><strong>Dockerfile:</strong></p>
  <pre><code>FROM php:7.3-fpm-alpine
  
  # Copy composer.lock and composer.json
  COPY  composer.json /var/www/
  
  # Set working directory
  WORKDIR /var/www
  
  # Install dependencies
  RUN apk update &amp;&amp; apk add \
      libxml2-dev \
      libzip-dev \
      libpng-dev \
      zip \
      jpegoptim optipng pngquant gifsicle \
      vim \
      unzip \
      git \
      bash \
      curl \
      nodejs \
      npm
  
  # Install extensions
  RUN docker-php-ext-install xml mysqli pdo pdo_mysql mbstring zip exif pcntl soap gd
  RUN docker-php-ext-enable xml mysqli pdo pdo_mysql mbstring zip exif pcntl soap gd
  
  # Install composer
  RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  
  # Add user for laravel application
  RUN addgroup -g 1000 www &amp;&amp; adduser -G www -g www -s /bin/sh -D www
  
  RUN chown www:www /var/www
  
  # Copy existing application directory contents
  COPY . /var/www
  
  # Copy existing application directory permissions
  COPY --chown=www:www . /var/www
  
  # Change current user to www
  USER www
  
  RUN composer install
  
  # Expose port 9000 and start php-fpm server
  EXPOSE 9000
  CMD [&quot;php-fpm-alpine&quot;]
  </code></pre>