Skip to content

Instantly share code, notes, and snippets.

@informationsea
Created March 24, 2020 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save informationsea/47ee0e5ddc45918ce721162b3047eea3 to your computer and use it in GitHub Desktop.
Save informationsea/47ee0e5ddc45918ce721162b3047eea3 to your computer and use it in GitHub Desktop.
Build Wine for CentOS 7
FROM centos:7 AS download-wine
WORKDIR /download
RUN curl -OL https://dl.winehq.org/wine/source/5.x/wine-5.4.tar.xz
RUN tar xJf wine-5.4.tar.xz
FROM centos:7
RUN yum update -y
RUN yum install samba-winbind-clients -y
RUN yum -y groupinstall base "Development tools" --setopt=group_package_types=mandatory,default,optional
RUN yum install -y libjpeg-turbo-devel libtiff-devel freetype-devel glibc-devel.{i686,x86_64} libgcc.{i686,x86_64} \
libX11-devel.{i686,x86_64} freetype-devel.{i686,x86_64} gnutls-devel.{i686,x86_64} \
libxml2-devel.{i686,x86_64} libjpeg-turbo-devel.{i686,x86_64} libpng-devel.{i686,x86_64} \
libXrender-devel.{i686,x86_64} alsa-lib-devel.{i686,x86_64} libxrandr.i686 mesa-libGL-devel.{i686,x86_64} \
mesa-libGLES-devel.{i686,x86_64} mesa-libGLU-devel.{i686,x86_64} mesa-libGLw-devel.{i686,x86_64} \
mesa-libOSMesa-devel.{i686,x86_64}
ENV WINE_VERSION 5.4
WORKDIR /build
COPY --from=download-wine /download/wine-${WINE_VERSION} /build/wine-${WINE_VERSION}
WORKDIR /build/wine-${WINE_VERSION}/wine64
RUN ../configure --enable-win64 --prefix=/home/okamura/Applications/wine/wine64
RUN make -j4
WORKDIR /build/wine-${WINE_VERSION}/wine32
RUN ../configure --with-wine64=../wine64 --prefix=/home/okamura/Applications/wine/wine32
RUN make -j4
RUN make install
WORKDIR /build/wine-${WINE_VERSION}/wine64
RUN make install
WORKDIR /home/okamura/Applications/
RUN mkdir -p /result
RUN tar czf /result/wine-${WINE_VERSION}.tar.gz wine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment