question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to create a docker container (X server + wine)

See original GitHub issue

I wan’t to create a Docker container to build my app on an headless server online (Ubuntu server). I tried lot of solutions but no one function. The main problem here it’s the wine application that without an X server can’t update the exe file! I’ll share what I created so far:

FROM ubuntu:14.04

# Installing wine for windows icon and git
RUN apt-get update
RUN apt-get install -y software-properties-common
RUN dpkg --add-architecture i386 
RUN add-apt-repository ppa:wine/wine-builds
RUN apt-get update && apt-get install --install-recommends -y \
  winehq-devel \
  git \
  curl

# Installing nodejs
RUN curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
RUN apt-get install -y nodejs

#Putting mono in wine folder
RUN mkdir /root/.wine/
RUN mkdir /root/.wine/mono
RUN curl -o /root/.wine/mono/wine-mono-4.6.0.msi http://dl.winehq.org/wine/wine-mono/4.6.0/wine-mono-4.6.0.msi

# Headless wine config
# Don't work... :(
RUN apt-get install -y Xvfb
#RUN Xvfb :1 &
#RUN export DISPLAY=:1
#RUN sleep 4

# Start wine config
#RUN DISPLAY=:1 wine wineboot --init

# Copy current folder and files
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
# Installing nwbuilder dependency
RUN npm install

CMD [ "sh", "start.sh" ]

Where start.sh just git clone and start node webkit builder.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Klemen1337commented, May 29, 2017

So what is the solution?

0reactions
evshironcommented, Jun 8, 2017

Hmmm? nwjs-builder used to test in Travis CI and the .travis.yml was copied from somewhere to enable testing built NW.js apps headlessly, but nwjs-builder-phoenix hasn’t been tested in these environments yet.

By the way, nw-builder uses winresourcer to accomplish resource editing, while nwjs-builder uses node-resourcehacker and nwjs-builder-phoenix uses node-rcedit. These tools should have been discussed before, and I switched to node-rcedit because it’s open source and focused on this task for Electron apps, and it doesn’t have a GUI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic video test fails · Issue #44 · scottyhardy/docker-wine
hey there, i can't seem to get the image or script to work. it pulls the image fine, and running the script without...
Read more >
Running Wine within Docker - Ales Nosek
The complete Dockerfile to build our Wine image looks as follows: ... we can see that our application is unable to access the...
Read more >
Wine on Docker - Lei Mao's Log Book
In this blog post, I would like to discuss how to run Windows applications, such as WeChat, via Wine in a Linux Docker...
Read more >
Unable to init Xserver inside a docker container on PopOS
I have a use-case where I need to run a GUI application from Docker and display it on either a Windows or a...
Read more >
scottyhardy/docker-wine - Docker Image
Docker image that includes Wine and Winetricks for running Windows applications on Linux and macOS.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found