Skip to content

Instantly share code, notes, and snippets.

@lhw
Last active December 23, 2020 11:51
Show Gist options
  • Save lhw/462f6dd6de722144982eb31dd4bd75df to your computer and use it in GitHub Desktop.
Save lhw/462f6dd6de722144982eb31dd4bd75df to your computer and use it in GitHub Desktop.
venice unleashed docker
FROM python:3.8
RUN apt-get update \
&& apt-get install -yq wget unzip
RUN wget -nc https://github.com/Imposter/otool/archive/vu.zip -O /tmp/otool-vu.zip \
&& cd / \
&& unzip /tmp/otool-vu.zip \
&& pip3 install -r otool-vu/requirements.txt
CMD ["python3", "/otool-vu/otool.py", "-d", "/data"]
VOLUME /data
#!/bin/sh
wine /vu/client/vu.com -gamepath /vu/battlefield -activate -o_mail ${ORIGIN_EMAIL} -o_pass ${ORIGIN_PASSWORD}
wine /vu/client/vu.com -gamepath /vu/battlefield -serverInstancePath /vu/instance -listen 0.0.0.0:25200 -mHarmonyPort 0.0.0.0:7949 -server -dedicated ${EXTRA_ARGS}
---
version: '3.6'
volumes:
battlefield3:
instance:
services:
# Creates and launches an image of Venice Unleashed
#
# The Battlefield 3 install has to be provided at /vu/battlefield
# The Instance path at /vu/instance/ requires the server.key and server config unter the subpath Admin
# as well as a writable Logs subpath
veniceunleashed:
image: veniceunleashed
build:
context: .
dockerfile: veniceunleashed.Dockerfile
volumes:
- battlefield3:/vu/battlefield
- instance:/vu/instance
environment:
ORIGIN_EMAIL: foobar@example.com
ORIGIN_PASSWORD: YourHopefullyLongPassword
EXTRA_ARGS: "-high60"
ports:
- 7948:7948/udp
- 25200:25200/udp
- 47200:47200/tcp
# Use the otool to download the required Battlefield 3 files for your server
#
# Execute the following command:
# `docker-compose -f venice-unleashed.yml run otool`,
# which will ask you for your origin login/password and download the
# files into the path that is mounted as /data
otool:
build:
context: .
dockerfile: otool.Dockerfile
volumes:
- battlefield3:/data
FROM ubuntu:18.04
RUN dpkg --add-architecture i386 \
&& echo 'deb [trusted=yes] http://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./' > /etc/apt/sources.list.d/wine.list \
&& apt-get update \
&& apt-get install -yq wget xvfb unzip cabextract winehq-stable winetricks \
&& adduser --home /vu --disabled-login --gecos "" vu
USER vu
WORKDIR /vu
ENV WINEPREFIX=/vu/prefix
ENV WINEARCH=win32
ENV WINEDEBUG=-all
RUN wineboot && xvfb-run winetricks -q vcrun2008
RUN wget -nc https://veniceunleashed.net/files/vu.zip -O /tmp/vu.zip \
&& mkdir -p /vu/client \
&& cd /vu/client \
&& unzip /tmp/vu.zip \
&& rm -rf /tmp/*
ADD server.sh /vu/server.sh
CMD /vu/server.sh
EXPOSE 7948/udp
EXPOSE 25200/udp
EXPOSE 47200/tcp
VOLUME /vu/battlefield
VOLUME /vu/instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment