News for hackers. Stuff that matters.
Re:Bottles – Easily run Windows software on Linux by pipeline_peak on Tuesday July 04, 2023 @06:08PM (#36593158)
What’s the point of this isolated “bottle” concept? It seems like the bloated nature of containers is now pouring into emulation.

Why fix underlying problems when you can just put things in a bottle/container? Like that won’t use more resources.

Re:Bottles – Easily run Windows software on Linux by mmastrac on Tuesday July 04, 2023 @06:15PM (#36593204)
Bottles have been around longer than Linux containers, I'm afraid. The world of Windows emulation on Linux pre-bottle was extremely difficult to say the least.

You're juggling a dozen dependencies, some of which are closed-source binaries, some are blackbox replacements, and each game or application is a special snowflake requiring very specific versions of these (and perhaps some tweaks here and there).

Re:Bottles – Easily run Windows software on Linux by Dalewyn on Tuesday July 04, 2023 @07:14PM (#36593710)
>each game or application is a special snowflake requiring very specific versions of these (and perhaps some tweaks here and there).

It's worth emphasizing every time this subject rolls around just how impressive Microsoft's commitment to backwards compatibility in Windows really is.

Re:Bottles – Easily run Windows software on Linux by xcv123 on Tuesday July 04, 2023 @06:30PM (#36593335)
> Why fix underlying problems when you can just put things in a bottle/container? Like that won’t use more resources.

This is WINE (not an emulator). Constrained by the design of Windows. Cannot fix that underlying problem. The resource cost is only tens of megabytes of storage and it provides clean isolation. It's not an entire copy of the OS. It's mostly just configuration.

Re:Bottles – Easily run Windows software on Linux by hnlmorg on Tuesday July 04, 2023 @06:22PM (#36593265)
This uses Wine, which isn’t emulation.

Also since when were containers more “bloated” than emulation? The whole point of containers is that they don’t need to virtualise the entire stack because they are reusing parts of the host stack.

Re:Bottles – Easily run Windows software on Linux by actionfromafar on Tuesday July 04, 2023 @06:28PM (#36593320)
A rose by another name
Re:Bottles – Easily run Windows software on Linux by pareidolia on Wednesday July 05, 2023 @11:06AM (#36601447)
It's a runtime environment, like the JRE or Mono CLR. By your logic, the JRE is an emulator because it has a "java virtual machine."
Re:Bottles – Easily run Windows software on Linux by xcv123 on Wednesday July 05, 2023 @08:54PM (#36609489)
WINE is not a VM though. It is an implementation of the Windows API.

The Wine documentation admits that it is emulating the Windows API.

https://wiki.winehq.org/Wine_Developer%27s_Guide/Architectur...

Of course there is no hardware emulation, so all Windows binary code is running natively with no performance drop. That's why it was called WINE. But still there are two meanings of the word. Hardware emulation or OS emulation at API level.

Re:Bottles – Easily run Windows software on Linux by hnlmorg on Thursday July 06, 2023 @02:04AM (#36611915)
These two meaning are a little like how “theory” can mean different things to scientists vs non-scientists.

In the context of computers, “emulation” has a specific meaning and one which isn’t applicable to WINE.

Re:Bottles – Easily run Windows software on Linux by worble on Tuesday July 04, 2023 @06:13PM (#36593189)
A bottle is basically just a wine prefix, everything you run in that bottle runs in that prefix.
Re:Bottles – Easily run Windows software on Linux by beebmam on Tuesday July 04, 2023 @06:16PM (#36593208)
Can you explain how containers are bloated?
Re:Bottles – Easily run Windows software on Linux by denuoweb on Tuesday July 04, 2023 @06:27PM (#36593312)
In my case, BTCPayServer was wrapped in a docker container because the developer loves docker... but I took the docker out of the project after I forked it because I felt putting the project in a docker container was extra bloat that was convoluted and unnecessary. In other words, a "container" didn't have to wrap the project, it was just implemented because of a dev insisting on it. That is bloat to me, extra and unnecessary.
Re:Bottles – Easily run Windows software on Linux by LASR on Tuesday July 04, 2023 @06:31PM (#36593345)
> In my case, BTCPayServer was wrapped in a docker container because the developer loves docker...

Right. But one example doesn’t mean the entire world of containers is “bloat and unnecessary”.

I’ve encountered many use cases where packaging dependencies and deployments become significantly simpler due to containers.

True that there are possibly several other solutions that also solve similar problems. But that doesn’t mean containers don’t also solve actual problems.

Re:Bottles – Easily run Windows software on Linux by Jenk on Tuesday July 04, 2023 @06:33PM (#36593366)
That is remarkably a non-answer.

Not least because you don't even need to run the container at all when developing.

Re:Bottles – Easily run Windows software on Linux by mmastrac on Tuesday July 04, 2023 @06:45PM (#36593470)
It's pretty easy to Google this particular example you've cited and see that they have non-docker instructions available, and don't recommend them because you can easily screw things up.

Seems fair to me.

https://docs.btcpayserver.org/Deployment/ManualDeployment/

Re:Bottles – Easily run Windows software on Linux by naikrovek on Tuesday July 04, 2023 @06:46PM (#36593475)
given that Docker mostly (entirely?) gives a single UI to various related Linux kernel features, I don't see how it is bloat at all. Docker just tells the kernel to create a separate cgroup and networking, CPU, and RAM namespaces and then launches one or more processes within the confines set up with those things.

it's the same overhead/bloat as launching any normal process in the default cgroup and contexts.

> ... wrapped in a docker container because the developer loves docker

I think you maybe don't love Docker and that's coloring some things for you, unjustly.

Re:Bottles – Easily run Windows software on Linux by vetinari on Tuesday July 04, 2023 @08:30PM (#36594227)
It has slightly higher overhead than normal process, because the process will use a different set of userland libraries than your host normally uses (increasing memory usage) and the filesystem inside the container has a high chance to be a convoluted mess of overlaysfs mounts.

That said, it is hardly a "bloat".

Re:Bottles – Easily run Windows software on Linux by tiagod on Tuesday July 04, 2023 @06:47PM (#36593489)
Bloat is relative.

On one hand, a docker container will include duplicates of libraries, many versions, and sometimes unnecessary stuff.

On the other hand, I can run a lot of software on my machine by running a single command, without installing tools and libraries in my system I won't ever use again, and I can, with reasonable confidence, get rid of everything with another.

A lot of people prefer wasted disk space, and potentially memory and cycles, to wasted time and patience.

Re:Bottles – Easily run Windows software on Linux by mistercheph on Tuesday July 04, 2023 @07:08PM (#36593658)
It probably depends on their income more than anything.
Re:Bottles – Easily run Windows software on Linux by xcv123 on Tuesday July 04, 2023 @06:52PM (#36593539)
> That is bloat to me, extra and unnecessary.

Docker method is supported. Non-Docker method is available but unsupported, at your own risk.

It reduces the community support load. Eliminates massive amounts of wasted time dealing with distro specific configuration issues. These are volunteers who have better things to do with their spare time than debug that pointless soul destroying shit that Docker eliminates.

Re:Bottles – Easily run Windows software on Linux by ghotli on Tuesday July 04, 2023 @06:56PM (#36593578)
You've been downvoted but I suppose I'm willing to ask.

Why would defining the runtime dependencies needed for the execution environment of the software ever be a bad thing? Unless it's a statically linked binary as the final artifact I can't come up with a reason the stuff you ripped out would be anything but useful. Directly, or as executable documentation.

Re:Bottles – Easily run Windows software on Linux by tinus_hn on Tuesday July 04, 2023 @07:05PM (#36593637)
Spend the resources and get the reward, or don’t spend the resources and don’t get the reward. That’s not bloat, bloat contributes nothing, it’s just waste.

Here the reward for the developer is not needing to debug your operating system installation, because the container specifies what, as far as the application can see, is the operating system installation. Your reward is an application that has been tested in the environment it is running in.

Re:Bottles – Easily run Windows software on Linux by mise_en_place on Tuesday July 04, 2023 @10:39PM (#36594940)
BTCPayServer’s container setup was quite trivial, granted I used it last a few years ago. I had no issues with the container itself. You are free to install deps in whichever you want, but not sure how containerizing setup makes it bloat and/or unnecessary.
Re:Bottles – Easily run Windows software on Linux by wtfishackernews on Tuesday July 04, 2023 @06:13PM (#36593190)
Storage space is cheap
Re:Bottles – Easily run Windows software on Linux by rzzzt on Tuesday July 04, 2023 @06:47PM (#36593480)
Settings like which version of Windows to impersonate, what TrueType fonts and DLLs need to be downloaded, what runtime to use (classic Wine or Proton), etc. can change from one application/game to another.

DOSBox also has similar front-ends that can start Doom with a Sound Blaster 16 but Duke Nukem with a Sound Canvas by applying different configuration files.

Re:Bottles – Easily run Windows software on Linux by risho on Tuesday July 04, 2023 @08:30PM (#36594231)
wine isn't emulation and wine prefixes are not containers. whenever you use wine you are using a wine prefix. all bottles is is a tool for managing wine prefixes.
Re:Bottles – Easily run Windows software on Linux by pmarreck on Tuesday July 04, 2023 @08:59PM (#36594402)
WINE = Wine Is Not-an Emulator