Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. 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!