Command and Arguments

You can replace the ENTRYPOINT and the CMD declared in your Dockerfile from your application version or when making a deployment.

Concept

When creating your application version, you can optionally specify the command and the arguments to override the default value null. If left to null, the container runtime will use the ENTRYPOINT and the CMD declared in your Dockerfile.

Otherwise, it will replace the ENTRYPOINT and the CMD of your container runtime in all deployments of this version.

You can also pass those override parameters inside a Deployment JSON body to override the Application Version.

{
  "app_name": "example",
  "version_name": "v1",
  "ip_list": ["1.2.3.4", "4.3.2.1"],
  "command": "/app/entrypoint.sh",
  "arguments": "--debug"
}

The deployment body will always override the application version parameters.

The order of override is Deployment > Application Version > Container Default

Example

From this Dockerfile:

FROM alpine
COPY . /app
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["--debug", "--port", "$(ARBITRIUM_PORT_GAME_EXTERNAL)"]

You can see your container runtime invoked like this: /app/entrypoint.sh --debug --port 12345

To change this behavior from the application or the deployment, you can specify it this way:

{
    [...]
    "command": "/app/entrypoint.sh",
    "arguments": "--production --port $(ARBITRIUM_PORT_GAME_EXTERNAL)"
}

Which will result in a container runtime invoked like this: /app/entrypoint.sh --production --port 12345

Please use injected context variables if you want to use the command and arguments override with ports like this example.

Last updated

Was this helpful?