Adding environmental parameters in a Rock-on manifest?

Hi all.

I’m trying to create a Rock-on out of an existing Docker container, but I can’t find any information on how to specify any additional details required by the container.

In this case I need to specify a username and password, documented like this in the Docker registry:

docker run \
  --env USERNAME='<your_username>' \
  --env PASSWORD='<your_password>' \

I’m guessing it’s by specifying additional objects under the “environment” section in the JSON:

            "USERNAME": {
                "description": "Username.",
                "label": "Username",
                "index": 3  
            },
            "PASSWORD": {
                "description": "Password.",
                "label": "Password",
                "index": 4  
            },

This doesn’t seem to get passed to the container though (as far as I can tell, I can’t find a way to access any logs within the container).

Is this the correct way to do it or is there another way?

Thanks.

@MainrtNr5, theoretically they should be passed into the container, if the name is the same as the environment variable (which your snippets imply).

Depending on the container you should be able to get to the logs from the command line using:
docker logs <container_name, e.g. watchtower_official>

for testing purpose only you could also put them in with the environment parameter in the json file,

Out of curiosity, what docker container are you playing around with?

2 Likes

Hi Dan.

Sorry for a late reply. I’ll check the docker logs.

I’m mucking about with the different containers for Foundry VTT. I have one up and running but it requires the user to manually download the node.js package, unzip it, and then copy it to a specific share.

If possible, I’d like to use a container that download the package from foundryvtt.com and sets it up for the user.

Martin,
interesting. I assume you’re looking at a containers like this one:
https://hub.docker.com/r/felddy/foundryvtt
At least this one seems to be doing the setup all automagically like you wish.

and, similar to your setup from above, the variables should be passed into the container, if defined similar to this:

        "environment": {
          "FOUNDRY_USERNAME": {
            "description": "Enter your Foundry VTT Account Username that will be used to set up the Virtual Tabletop",
            "label": "Foundry VTT Account Username",
            "index": 1
          },
          "FOUNDRY_PASSWORD": {
            "description": "Enter your Foundry VTT Account Password that will be used to set up the Virtual Tabletop",
            "label": "Foundry VTT Account Password",
            "index": 2
          },
         "FOUNDRY_ADMIN_KEY": {
            "description": "Enter the Foundry Admin Key, that will be used to set up the Virtual Tabletop",
            "label": "Foundry VTT Account Password",
            "index": 3
          }

I couldn’t try it, as I don’t have an account for VTT.
Of course, if any type of logon information could be managed using secrets it would be better, however, from what I understand, Docker standalone containers are not really supporting that

and short of you rolling your own container adding e.g., SecretHub:

you will be stuck with using username/password pairs passed into the container.

You probably know all that already, but wanted to put it here, so I can remember later :slight_smile:

2 Likes

Hi Dan.

Thanks for the help, and again, my apologies for a late reply - time is not my friend right now. :confused:

Yeah, the felddy container is the one I’d like to get up and running but I haven’t had time to tinker with it since my last reply. I’ll give it another go though as I think it’d be a nice Rock-On to have in the roster, so to speak. :slight_smile:

1 Like