Skip to content

Delphi Windows Docker Build Environment

License

delphilite/DockerFile

Repository files navigation

Delphi Docker Build Environment

License stars

English | Chinese

This repository provides a collection of Dockerfiles to create Docker-based build environments for Delphi on Windows. It simplifies the process of building Delphi projects by ensuring a consistent, isolated environment.

Features

  • Dockerfiles for Delphi XE2/D12/D13 version.
  • Configured for Windows process isolation mode.

Usage

You can use this image in two ways: as a base image in a Dockerfile or by running it directly.

Option 1: Use as a Base Image

Use the provided images as a base to build your Delphi projects:

FROM delphilite/delphilite:d13-ltsc2022
SHELL ["powershell"]

COPY YourApp /data
WORKDIR /data
RUN msbuild /t:build YourApp.dproj

Option 2: Run Directly with Volume Mount

Run the Docker container directly and mount your project directory:

docker run --rm -v C:\host_dir:C:\data delphilite/delphilite:d13-ltsc2022 msbuild /t:build C:\data\YourApp.dproj

Option 3: Interactive Shell

Start an interactive session for manual builds and debugging:

docker run --rm -it -v C:\host_dir:C:\data delphilite/delphilite:d13-ltsc2022

Option 4: Using with CI/CD Pipelines

GitLab CI Example:

build-windows:
  tags:
    - windows
    - docker
  image: delphilite/delphilite:d13-win-ltsc2022
  script:
    - msbuild YourApp.dproj /t:Build /p:config=Release /p:platform=Win64

Jenkins Pipeline Example:

pipeline {
  agent {
    docker {
      image 'delphilite/delphilite:d13-win-ltsc2022'
      args '-v C:\\host_dir:C:\\data'
    }
  }
  stages {
    stage('Build') {
      steps {
        bat 'msbuild C:\\data\\YourApp.dproj /t:Build /p:config=Release /p:platform=Win64'
      }
    }
  }
}

Supported Tags

Each image tag corresponds to a Delphi version and Windows base image combination. Example tags:

  • d13-ltsc2022: Delphi 13 (full) on Windows LTSC 2022.
  • d13-win-ltsc2022: Delphi 13 (x86+x64 only) on Windows LTSC 2022.
  • d13-linux-ltsc2022: Delphi 13 (linux only) on Windows LTSC 2022.
  • d13-mac-ltsc2022: Delphi 13 (macos+ios only) on Windows LTSC 2022.
  • d13-android-ltsc2022: Delphi 13 (android only) on Windows LTSC 2022.

Refer to the Docker Hub repository for a complete list of available tags.

Image Size Comparison

Choosing the right image variant can significantly reduce download time and storage:

Image Type Included Platforms Approximate Size
Full All platforms ~ 31GB
Win Win32 + Win64 ~ 14GB
Linux Linux64 ~ 11GB
Mac OSX + iOS ~ 18GB
Android Android + SDK ~ 17GB

Recommendation: Use platform-specific images unless you need to build for multiple platforms.

Getting Started

Follow these steps to build your own Docker image locally:

  1. Install Docker Desktop Ensure Docker Desktop is installed and switched to Windows containers mode.

  2. Prepare Proxy and Web Services (Optional) Set up file services like 3proxy and Caddy if needed for your build process.

  3. Clone This Repository

git clone https://github.com/delphilite/dockerfile.git
  1. Build the Docker Image Replace and with your actual settings:
docker build --build-arg http_proxy=http://<your3proxy> -t <yourimagename>:d13-ltsc2022 -f Dockerfile-Full .

Documentation

For more detailed information, refer to Docker's official website.

Contributing

Contributions are welcome! Please fork this repository and submit pull requests with your improvements.

License

This project is licensed under the Mozilla Public License 2.0. See the LICENSE file for details.

Acknowledgments

Special thanks to the following projects:

  • 3proxy - Lightweight proxy server for network services
  • Caddy - Modern web server with automatic HTTPS
  • magicxor/radstudio - Original inspiration for this project

Disclaimer

Important: This code is intended for educational, personal, and non-commercial use only.

  • You must have valid Delphi licenses to use these build environments
  • The Docker images are built from official Delphi trial/beta versions
  • Please purchase official Embarcadero licenses for production use
  • Delete trial versions within 24 hours if not licensed

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.