Deploying and debugging RAD Studio applications has never been easier. With our new Docker image and our revamped run.sh
script, this process is now streamlined and more user-friendly. This post introduces our optimized PAServer Docker solution, highlighting significant improvements, including a whopping 64% reduction in image size.
Table of Contents
What is PAServer?
PAServer (Platform Assistant Server) is a tool that facilitates cross-platform development and deployment for RAD Studio, Delphi, and C++Builder. It enables remote compilation and debugging, allowing developers to build and debug applications on different platforms, such as Windows, Linux, macOS, iOS, and Android, from a single development environment. This integration streamlines the development process, enhancing efficiency and productivity by managing file transfers and remote sessions easily.
Why use Docker for Linux development?
Using Docker for development offers several key benefits that streamline the development process and enhance productivity. The key factors for using Docker are:
- Consistency and Reproducibility: Docker makes sure your app and environment work the same everywhere, from your computer to production, so no more “it works on my machine” problems.
- Isolation and Independence: Thanks to Docker’s container isolation, multiple instances of the same app with different setups can be run on the same machine without interfering with each other.
- Rapid Setup and Deployment: Setting up a new environment is a breeze with Docker. A few commands and you’re good to go.
- Scalability and Resource Efficiency: Docker containers are lightweight, using fewer resources than virtual machines. This means better performance and you can run more stuff on the same hardware.
- CI/CD Integration: Docker works great with CI/CD pipelines, automating testing, building, and deployment in a consistent environment, making your life easier.
What’s New?
- Optimized Image Size: The base Docker image has been reduced by 64%, resulting in faster downloads and less storage usage.
- Enhanced
run.sh
Script: Simplifies setup and deployment with flexible configuration options.
Key Features
Our Docker image and run.sh
script offer a range of features to make developing and deploying RAD Studio applications easier:
- Customizable Container Names: Easily assign unique names to your PAServer containers.
- Flexible Volume Mapping: Designate custom paths for data storage and access the compiled binaries directly from your computer.
- Background Running: Option to run containers in detach mode.
- Configurable Ports: Customize the port where PAServer runs.
- Production Mode: Toggle production mode on.
- Version: Specify which specific PAServer version to deploy.
- Password Protection: Secure your PAServer with a custom password.
All these options have been integrated into the new run.sh
script and you can easily access all the info through the handy --help
arg.
Accessing the new image and repo code
The new image is available on DockerHub, and the run.sh
script and the rest of the code to build your own images can be downloaded from GitHub.
Using run.sh
Script
Pull the repo from GitHub and navigate to the directory containing run.sh
in your terminal. Execute the script with your preferred options:
./run.sh [OPTIONS]
Options
--name
or-n
: Container’s name (e.g.,--name=myPAServer
).--path
or-pa
: Bind path for volume mapping (e.g.,--path=/my/custom/path
).--detach
or-d
: Run the container in detach mode (background).--port
or-p
: Port for PAServer (e.g.,--port=64211
).--production
or-pr
: Enable production mode (true
).--version
or-v
: PAServer version (e.g.,--version=latest
).--password
or-pw
: Set a password for PAServer (e.g.,--password=securepass
).--help
or-h
: Access the help of the script.
Example 1: Production Mode
1 |
./run.sh --name=myPAServer --port=65000 --production --password=mysupersecurepassword |
Example 2: Detach Mode with Specific Version
1 |
./run.sh --detach --version=12.1 --path=/my/custom/path --password=mysupersecurepassword |
Other functionalities
The updated GitHub repo contains a brand new, in-depth readme that explains more advanced solutions in detail. Using docker run
instead of the new script, docker compose
or create your own image version customizing the Dockerfile
are just some examples.
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition
And now I only want to do unit and e2e testing for my application written in Delphi and C++ Builder in gitlab CI with docker(so it is super parallelized).
But no. Windows docker image don’t support running GUI apps so zero way how to use windows docker for UI testing
Thanks for your comment Michal.
Docker runs under Linux, so using it to test apps for other platforms (VCL/FMX) is not possible. Microsoft released Windows Containers, but we don’t currently support this tech, and I’m not certain if it allows GUI testing.
E2E testing in just one integrated platform is tricky to achieve, especially if you are aiming for a multi-platform application. You could potentially do the unit testing using Docker, but for the GUI, the only option I know is using tools like Ranorex (or similar GUI testing tools) and integrating those in your CI pipelines using self-hosted runners in VMs.
The article states that you can also BUILD applications for Windows with the PAServer. Does this also apply to a VCL application? I.e. only the compilation of this application and no tests, as asked in another comment.
We need a solution to build an application in our Gitlab pipelines and I am unsure if PAServer is the right solution for this.
Yes, PAServer is available for Linux, MacOS and also Windows.
While this article discusses a new Docker version of PAServer (which simplifies compiling for Linux), for VCL applications you must use the Windows version of PAServer.
Note that PAServer doesn’t include any compilers built-in: it’s a way to deploy to remote machines and allow RAD Studio to pull the required libraries from that OS to complete the compilation (if it’s needed).
Check this link for further information:
https://docwiki.embarcadero.com/RADStudio/en/PAServer,_the_Platform_Assistant_Server_Application
If you need to integrate CI/CD pipelines using GitLab, I’d recommend using “Runners” running in build machines with RAD Studio installed.
Oh yes! A Windows Docker image containing a RAD Studio installation (or just a slimmed down installation containing only the libraries and command line compilation tools) would be golden! It would save so much effort if it was possible to compile Delphi in, for instance bitbucket pipelines.