Running Decoded ionCube Files in Docker Containers

How to deploy decoded ionCube PHP files in Docker containers. Remove the Loader dependency and simplify your Docker images.

·3 min read·By PHPDecompile TeamLast updated: Jul 2, 2026

Docker containers should be lightweight and portable. ionCube Loader adds unnecessary complexity. This guide shows how to deploy decoded files in Docker — no Loader needed.

The Problem with ionCube in Docker

Running ionCube-protected files in Docker requires:

  • Downloading and installing the ionCube Loader in the Dockerfile
  • Matching the Loader to the exact PHP version
  • Increasing image size with Loader binaries
  • Complex multi-stage builds
  • Version pinning headaches

After decoding, you eliminate all of this.

Dockerfile Without ionCube (After Decoding)

FROM php:8.1-fpm-alpine

# Install PHP extensions (no ionCube needed!)
RUN docker-php-ext-install pdo_mysql opcache

# Copy decoded source code
COPY ./src/ /var/www/html/

# Standard PHP configuration
COPY ./php.ini /usr/local/etc/php/

EXPOSE 9000
CMD ["php-fpm"]

Compare this to a Dockerfile WITH ionCube:

FROM php:8.1-fpm-alpine

# Download and install ionCube Loader (complex!)
RUN wget -q https://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz     && tar -xzf ioncube_loaders_lin_x86-64.tar.gz     && cp ioncube/ioncube_loader_lin_8.1.so $(php -i | grep extension_dir | awk '{print $NF}')/     && rm -rf ioncube*     && echo "zend_extension=$(php -i | grep extension_dir | awk '{print $NF}')/ioncube_loader_lin_8.1.so"        > /usr/local/etc/php/conf.d/ioncube.ini

# Install PHP extensions
RUN docker-php-ext-install pdo_mysql opcache

# Copy encoded source code
COPY ./src/ /var/www/html/

Benefits of Removing ionCube from Docker

Smaller Images

No Loader binary = smaller Docker image = faster builds and deployments.

Simpler Dockerfile

No multi-step Loader installation. Just PHP extensions and source code.

Better Compatibility

Works on any Docker platform (AWS ECS, Google Cloud Run, Kubernetes, Docker Swarm).

Easier PHP Upgrades

Change the base image PHP version — no need to download a new Loader.

Faster Container Start

No Loader initialization overhead during container startup.

Docker Compose Example

version: '3.8'
services:
  app:
    build: .
    ports:
      - "8080:80"
    volumes:
      - ./src:/var/www/html
    depends_on:
      - db
  
  db:
    image: mysql:8.0
    environment:
      MYSQL_DATABASE: app
      MYSQL_ROOT_PASSWORD: secret

No ionCube configuration needed anywhere.

Kubernetes Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: php-app
spec:
  template:
    spec:
      containers:
      - name: app
        image: my-app:latest  # Contains decoded PHP
        ports:
        - containerPort: 9000

Standard Kubernetes deployment — no special configuration for ionCube.

CI/CD Pipeline

# GitLab CI
build:
  script:
    # No ionCube Loader installation step!
    - docker build -t my-app .
    - docker push my-app

Migration Steps

  1. Decode all ionCube files using our decoder
  2. Replace encoded files with decoded versions
  3. Update Dockerfile to remove Loader installation
  4. Rebuild Docker image
  5. Test thoroughly
  6. Deploy

Conclusion

Decoded ionCube files make Docker deployment dramatically simpler. No Loader, no version matching, no complex Dockerfiles. Just standard PHP in a container.

Decode your files — free trial available.

Update: SourceGuardian support is now included

PHPDecompile now supports both ionCube and SourceGuardian protected PHP files. If your project contains a mix of protected vendor files, abandoned modules, or legacy PHP packages, you can use the same upload, trial preview, progress tracking, and download workflow for both supported encoders.

Ready to decode ionCube and SourceGuardian files?

Try PHPDecompile free. No credit card required.