Unable to create a docker container (X server + wine)
See original GitHub issueI 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:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So what is the solution?
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, butnwjs-builder-phoenix
hasn’t been tested in these environments yet.By the way,
nw-builder
useswinresourcer
to accomplish resource editing, whilenwjs-builder
usesnode-resourcehacker
andnwjs-builder-phoenix
usesnode-rcedit
. These tools should have been discussed before, and I switched tonode-rcedit
because it’s open source and focused on this task for Electron apps, and it doesn’t have a GUI.