Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question How to access server.json in docker image

Discussion in 'Game Server Hosting' started by bkiac, Dec 19, 2022.

  1. bkiac

    bkiac

    Joined:
    Dec 19, 2022
    Posts:
    2
    I know launch parameters are passed to the entry point but I’m very confused about the server.json behavior. If I understand correctly the server.json will be copied next to my game files and executable. But how can I access this file if I want to use a Docker image? How am I supposed to mount the server.json so my server code can access it inside the container?
     
  2. danri

    danri

    Unity Technologies

    Joined:
    Jun 21, 2019
    Posts:
    27
    Hello,

    The server.json file should already be mounted into your container. Look for the $HOME environment variable (assuming you are running a Linux container), this will give you the path to the directory where the server.json exists
     
    bkiac likes this.
  3. bkiac

    bkiac

    Joined:
    Dec 19, 2022
    Posts:
    2
    Thanks!