commit 83e14cef6ec0e6411ff21d09a1f1c92945e67fb8 Author: Andrey Arapov Date: Sat Dec 22 17:30:12 2018 +0100 init diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8fce603 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +data/ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8fce603 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +data/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..416c880 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:bionic + +# To avoid problems with Dialog and curses wizards +ENV DEBIAN_FRONTEND noninteractive + +RUN dpkg --add-architecture i386 && \ + apt-get update && \ + apt-get install -y gnupg curl && \ + curl -o /tmp/winehq.key -fsSL https://dl.winehq.org/wine-builds/winehq.key && \ + apt-key add /tmp/winehq.key && \ + echo "deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main" | tee /etc/apt/sources.list.d/winehq.list && \ + apt-get update && \ + apt-get install -y --install-recommends winehq-staging && \ + apt-get install -y winbind + +# Set locale to: en_US.UTF-8 +RUN apt-get -y install locales && \ + sed -i.orig '/^# en_US.UTF-8.*/s/^#.//g' /etc/locale.gen && \ + locale-gen && \ + update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 + +RUN apt-get -y install libvulkan1 libvulkan1:i386 vulkan-utils + +COPY ./launch /launch +ENTRYPOINT [ "/bin/bash", "/launch" ] + +LABEL maintainer="Andrey Arapov " diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e813e6e --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2018, Andrey Arapov + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..64582fc --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +## wine in docker + +### WIP diff --git a/data/.keep b/data/.keep new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3bb4c0b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,48 @@ +version: '2' + +services: + wine: + # tty: true + # stdin_open: true + hostname: wine + network_mode: bridge + # image: andrey01/wine + build: . + shm_size: 4G + environment: + - DISPLAY=unix$DISPLAY + - PULSE_SERVER=unix:$XDG_RUNTIME_DIR/pulse/native + #- DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus + # - STEAM_RUNTIME=1 + devices: + # Common: + - /dev/dri + # - /dev/snd + # NVIDIA: + - /dev/nvidia0 + - /dev/nvidiactl + - /dev/nvidia-uvm + - /dev/nvidia-uvm-tools + # NVIDIA driver >= 361: + - /dev/nvidia-modeset + # AMD/ATI Radeon: + # - /dev/kfd + volumes: + - /tmp/.X11-unix:/tmp/.X11-unix:ro + - /etc/localtime:/etc/localtime:ro + - /etc/machine-id:/etc/machine-id:ro + - $XDG_RUNTIME_DIR/pulse:/run/user/1000/pulse + # - $XDG_RUNTIME_DIR/bus:/run/user/1000/bus + - ./data:/home/user + # - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro + # Location to your NVIDIA drivers: + - /usr/lib/i386-linux-gnu:/hostlibs/32:ro + - /usr/lib/x86_64-linux-gnu:/hostlibs/64:ro + # Needed for Vulkan ICD Discovery + - /usr/share/vulkan/icd.d:/usr/share/vulkan/icd.d:ro + # security_opt: + # - apparmor=unconfined + cap_add: + - SYS_PTRACE + # - ALL + # privileged: true diff --git a/launch b/launch new file mode 100644 index 0000000..3a4713c --- /dev/null +++ b/launch @@ -0,0 +1,13 @@ +#!/bin/bash + +# Make errors visible upon `docker logs -f steam` command +exec 2>&1 + +id user >/dev/null 2>&1 +[ $? -eq 0 ] || useradd -s /bin/bash -d /home/user -u ${USER_ID:-1000} user + +echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/hostlibs/32:/hostlibs/64: +export LD_LIBRARY_PATH" | tee /home/user/.bash_profile + +#su -l user -c "HOME=/home/user LD_LIBRARY_PATH=${LD_LIBRARY_PATH} bash $@" +su -l user