Unity Docker



Running Unity headless unix build in Docker container on Docker Cloud

Download and install Docker; Run Docker as administrator if logged user is not a local admin: Open Command Prompt or PowerShell in admin mode; Run docker -version or docker run hello-world to ensure you have a supported version of Docker: After Docker desktop is installed, share the drive where you would place configuration files. As a follow up to the previous Multiplayer Overview video ( ), I wanted to do a small tutorial on how you can go about self host. Unity doesn’t run in a Windows Docker container! Inside a Windows Docker container, Unity.exe simply fails to start, with no output. This is regardless of the the arguments you pass it, activation, etc. It just doesn’t seem like this is supported, although some people claim to have gotten it working. As a follow up to the previous Multiplayer Overview video ( ), I wanted to do a small tutorial on how you can go about self host.

Unity Server in Docker Container
Unity docker ci
build_and_compose.sh
#!/bin/bash
cd /Users/bobmoff/Projects/CocktailCruise/server
docker build -t bobmoff/cocktail-server -f Dockerfile-dev .
docker-compose up
build_and_push.sh
#!/bin/bash
echo'Building ...'
docker build -t bobmoff/cocktail-server -f Dockerfile-prod .
echo'Pushing ..'
docker push bobmoff/cocktail-server
# echo 'Deploying ..'
curl -X POST https://cloud.docker.com/api/app/v1/service/xxxxxxxxxxxxxxxxxxxxxx
echo'Done!'
docker-compose.yml
version: '2'
services:
server:
image: bobmoff/cocktail-server
ports:
- '7777:7777'
- '7777:7777/udp'
volumes:
- ./shared:/shared
Docker-dev
FROM ubuntu
MAINTAINER Fille Åström fille@imgnry.com
EXPOSE 7777
VOLUME /shared
WORKDIR /shared
CMD ./cocktailserver.x86_64 -logfile output.log & touch output.log ; tail -f output.log
Docker-prod
FROM ubuntu
MAINTAINER Fille Åström fille@imgnry.com
EXPOSE 7777
COPY ./shared /shared
WORKDIR /shared
CMD ./cocktailserver.x86_64 -logfile output.log &
tail -f output.log
docker-stack.yml
server:
image: bobmoff/cocktail-server
ports:
- '7777:7777'
- '7777:7777/udp'
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
Running Unity headless unix build in Docker container on Docker Cloud
Unity Server in Docker Container
Unity docker container
build_and_compose.sh
#!/bin/bash
cd /Users/bobmoff/Projects/CocktailCruise/server
docker build -t bobmoff/cocktail-server -f Dockerfile-dev .
docker-compose up
build_and_push.sh
#!/bin/bash
echo'Building ...'
docker build -t bobmoff/cocktail-server -f Dockerfile-prod .
echo'Pushing ..'
docker push bobmoff/cocktail-server
# echo 'Deploying ..'
curl -X POST https://cloud.docker.com/api/app/v1/service/xxxxxxxxxxxxxxxxxxxxxx
echo'Done!'
docker-compose.yml
Docker
version: '2'
services:
server:
image: bobmoff/cocktail-server
ports:
- '7777:7777'
- '7777:7777/udp'
volumes:
- ./shared:/shared

Unity Docker

Docker-dev
FROM ubuntu
MAINTAINER Fille Åström fille@imgnry.com
EXPOSE 7777
VOLUME /shared
WORKDIR /shared
CMD ./cocktailserver.x86_64 -logfile output.log & touch output.log ; tail -f output.log
Docker

Unity Docker Container

Docker-prod
FROM ubuntu
MAINTAINER Fille Åström fille@imgnry.com
EXPOSE 7777
COPY ./shared /shared
WORKDIR /shared
CMD ./cocktailserver.x86_64 -logfile output.log &
tail -f output.log
docker-stack.yml

Unity Docker Gitlab

server:
image: bobmoff/cocktail-server
ports:
- '7777:7777'
- '7777:7777/udp'
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment