打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
How to run Delphi apps on Docker Linux with RadStudio 10.3.3
How to run Delphi apps on Docker Linux with RadStudio 10.3.3
17/12/2019 - JARUZAFA



At last, Embarcadero has released some oficial Docker images to run Delphi apps. Another good news is that you will be able to debug linux applications running in a container.
http://yeiei.net/en/running-delphi-applications-on-linux-with-docker/

As you know, since RadStudio 10.2 you can target Linux for Delphi applications. Two years ago I wrote about how to run those apps inside Docker containers with an image created by me. But with the official images is easier!


Step by step
You need Docker for Windows or a docker server elesewhere. For this tutorial I’ll assume that you’ll use Docker for Windows, as it is the typical development setup.   https://docs.docker.com/docker-for-windows/install/

Fire up a powershell and run:

> docker pull radstudio/paserver
> docker run -it -e PA_SERVER_PASSWORD=pass -p 64211:64211 -p 8082:8082 radstudio/paserver

Now you have PAServer running on a linux container. The password is “pass”, and the port to connect to is 64211.

The next step is to connect the RadStudio IDE to your docker container.

Create a new console application and add Linux 64 as target platform. Right-click on Linux 64 platform and select “Properties…”:


At SDK combo select “Add New…”:


At “Select a profile to connect”, choose “Add New…”:


Give it a descriptive name like “paserver4docker”:


Fill the “Remote machine field” with your container IP. If you are using Docker for Windows use “localhost” as the 64211 port is mapped to your container. Password for this example is “pass”:


Click on “Test Connection” and “Finish”. It will download a bunch of SDK files, and you’re almost done:


Click Ok, and run your project. In this example I’ve run a simple “Hello from Docker!” console application.


Another interesting feature is debugging your code running in a container. Just set a breakpoint and run your program. You can perform the usual debug actions like run step-by-step, inspect variables, set breakpoints, …


Final words
This was a long-waited feature since RadStudio Tokyo release. Embarcadero should improve the IDE integration with Docker for both Windows and Linux, as other popular IDE’s are doing for a long time

If you are curious, Embarcadero has released a set of Docker images with RadServer too. You can find them at:
https://hub.docker.com/u/radstudio
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!    
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
Getting Started with Delphi and Linux Docker Support
delphi怎样编译LINUX程序
docker- 在 Windows 10 + WSL2 上运行 nvidia-docker
.net4.5部署到docker容器
利用docker安装OpenFOAM-v2112
Delphi XE4 For iOS 真机调试教程
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服