alternative to binfmt, for wine in docker in kubernetes

Questions about Wine on Linux
Post Reply
sleipner
Newbie
Newbie
Posts: 2
Joined: Mon Aug 19, 2019 1:58 am

alternative to binfmt, for wine in docker in kubernetes

Post by sleipner » Mon Aug 19, 2019 3:46 am

Hi,

Please bear with me, that it is on the edge of being a question about Wine.

My DevOp is not too happy about my build-pipeline depending on binfmt to execute my (win32) compiler in a docker environment.

Binfmt is a kernel-option (/module ?), and argument is that I should not rely on that. It will e.g. cause trouble/complexity, if we were to run this in e.g. a kubernetes cluster, where the kernels does not have this.

Are there any other linux mechanisms I can use, that does roughly the same?

Was looking at:
https://proot-me.github.io/
PRoot is a user-space implementation of chroot, mount --bind, and binfmt_misc.

...

Thx
/T

User avatar
DarkShadow44
Level 7
Level 7
Posts: 973
Joined: Tue Nov 22, 2016 5:39 pm

Re: alternative to binfmt, for wine in docker in kubernetes

Post by DarkShadow44 » Tue Aug 20, 2019 3:52 am

Can't you directly invoke wine instead of using binfmt?

sleipner
Newbie
Newbie
Posts: 2
Joined: Mon Aug 19, 2019 1:58 am

Re: alternative to binfmt, for wine in docker in kubernetes

Post by sleipner » Thu Aug 22, 2019 2:16 am

Yes, I can certainly call "wine the-command.exe ..." myself.
We just have a lot of build-pipelines that don't do that a.t.m., and the quickest way was just to find a user-space equivalent to binfmt, if possible.

I am already investigating how to call "wine" myself from everywhere. This is complicated by the fact that:

1) It must run on Windows (ths developer PC's) and linux/docker (for the CI).

2)
We are using Ceedling to build some of our products. It has a tool-configuration .yml like this:
:tools:
:release_compiler:
:executable: iccarm.exe
:arguments:
- xxx
- yyy
- zzz

It turns out, that writing "wine iccarm.exe" as the executable does not work, because Ceedling is so picky about this, that it *must* be able to 'stat' that exact file. And a file called "wine iccarm.exe" does not exist ...

Likewise for our Gradle tasks:

task someTask(type:Exec) {
executable = "iccarm.exe"
args = ['xxx', 'yyy', 'zzz' ]
}

In both examples, I must put 'wine' as the executable, and move 'iccarm.exe' as first argument.
But only for linux. On windows i should not ...
Unless I make sure there is a dummy 'wine.bat' file one the windows, pc's...
This could end up being a mess...
It could also end up beeing the best option after all :-)

I was just reaching out to see, if there was a viable solution for replacing 'binfmt'.
:-)

User avatar
DarkShadow44
Level 7
Level 7
Posts: 973
Joined: Tue Nov 22, 2016 5:39 pm

Re: alternative to binfmt, for wine in docker in kubernetes

Post by DarkShadow44 » Thu Aug 22, 2019 6:06 am

I personally think a small wrapper script would be the best here, when you can't use binfmt.

Post Reply