Project

General

Profile

WT and Docker (Linux/Windows)

Added by Claudio White almost 7 years ago

Docker (docker.com) seems to be a great possibility to work in harmony with WT-Apps.

Because of the fantatisc possibilites working together i did create this issue where anyone can add tips and tricks how we can create docker Linux and/or Windows Images with WT-Apps and how the interact with other docker Images where e.g. Apache or NGinx is running.

Look: a solution with a Linux docker Image NginX together with a windows docker Image WT-App is possible with the newest docker Version where the base docker System can run on a Windows or on a Linux pc/Server.

Hopefully you users will share your docker experience and examples (great would be step by step) here with us.


Replies (6)

RE: WT and Docker (Linux/Windows) - Added by Claudio White almost 7 years ago

One issue is described here "XUbuntu 18.04 / Apache LAMP no more FastCGI - how using WT?" - https://redmine.webtoolkit.eu/boards/2/topics/15042?r=15046#message-15046

Another i did found here "How to deploy Wt App on server? help" - https://redmine.webtoolkit.eu/boards/2/topics/15018?r=15020#message-15020

A possible WT-Bug is described here - "Wt 4.0.0-rc1 examples segfault on Alpine": https://redmine.webtoolkit.eu/issues/5808

That's all i did found within WT-Forums about Docker and WT since now.

RE: WT and Docker (Linux/Windows) - Added by Claudio White almost 7 years ago

First Try creating a easy Hello-WT-App.exe with VisualStudio 2017 (CE), creating a Windows-Docker-Image and starting this Container under Windows.

You should have a working Visual-Studio Environment and you can run your WT-Apps.

For using Docker für Windows you need before activating Virtualization in the BIOS of your PC (note: you cannot use VirtualBox together), after that please install Docker for Windows (will activate Hyper-V if you did activate Virtualization in the BIOS before). If you need VirtualBox later again you can easily switch back - deactivating Hyper-V.

Use Windows-PowerShell for putting in the docker commands.

First Switch Docker to use Windows-Container.

Create a Directory like /dev/dummy and /dev/dummy/binaries/

Create Textfile Dockerfile (without Extension) within /dev/dummy/

Type into this file the following 2 lines:

FROM microsoft/nanoserver

ADD ./binaries/ /bin/

Save and Close this file.

Copy following files to /dev/dummy/binaries/

Hello-WT-App.exe

wt-config.xml

libeay32.dll

libhpdf.dll

libpng14.dll

ssleay32.dll

wt.dll

wthttp.dll

zlib.dll

At this point you should do a local test on your PC if this is running, start from this directory:

Hello-WT-App.exe ---docroot . ---http-address 0.0.0.0 ---http-port 8099 ---config ./wt_config.xml

And check it within your Browser with:

http://localhost:8099

If Errors are coming up have a look to it, i guess you have to add more DLL's you are using in your WT-App...Windows-Error-Dialogs should Show you stept by step each DLL which is missing.

If no Errors are coming up and your WT-App is running you can go on:-) But please kill the running Hello-WT-App.exe now!!

Now we create our new Docker-Image based on Windows-Nanoserver, type in within the Powershell and check you are in Directory /dev/dummy/:

docker build -t yourauthorname/hellowt .

You have to use the dot after hellowt!!

Now you can start the docker Container, type in within the Powershell:

docker run -it -p 8099:8099 yourauthorname/hellowt

Now you will move automaticly from the powershell directly into the Container's landing Zone which is DOS-Environment C:\

Change to /bin Directory

Now all the files you Need to run your WT-App should be here including your Hello-WT-App.exe!

You can start now as you to this normaly like this command:

Hello-WT-App.exe ---docroot . ---http-address 0.0.0.0 ---http-port 8099 ---config ./wt_config.xml

Normaly from your HOST-PC you should now call "http://localhost:8099" and Hello-WT-App.exe should give you the result you expect.

But although it seems that everything is working, i do not get any result....maybe Microsoft/Nanoserver is not enough to use it with WT...then next try is to use WindowsServerCore or i just have a wrong parametrization using the ports forwarding...but i do not see a wrong parametrization:-(

If i have a better and full working solution i will post it here, maybe before another user has a solution before:-)

Btw.: With command Exit you can leave the Container and you are back in the Powershell of the Host.

For now i hope you can use this as an entrypoint using WT and Docker within Windows.

RE: WT and Docker (Linux/Windows) - Added by Claudio White almost 7 years ago

Update: Using of WindowsServerCore does not Change anything, the reason must be another thing.

RE: WT and Docker (Linux/Windows) - Added by Claudio White almost 7 years ago

Update:

windows-insider:latest (2018-07-24) also does not work.

Installing VCRedist also does not help.

Using a Linux-Docker-Container and WINE also not working.

Google searches for hints and tipps does not help currently.

So for the moment i give up:-(

I will concentrate me more to develop and debug WT-Apps using a Linux-Docker-Image with installed gcc, gdb and geany ide and run this container on my Windows-PC (VNC for displaying GEANY IDE on my Windows GUI). See more here: https://redmine.webtoolkit.eu/boards/2/topics/15108?r=15117#message-15117

RE: WT and Docker (Linux/Windows) - Added by lm at almost 7 years ago

I'm not sure I'm following. You're wanting to run a WT application in a Microsoft Windows docker container? I can't imagine why, but if that's your goal, good luck to you!

RE: WT and Docker (Linux/Windows) - Added by Claudio White almost 7 years ago

Yes you imagine right:) It is not my favorite solution....but my chief suggesting me to find such a solution:( But for the Moment he did understand that this not possible:-)

    (1-6/6)