Azure-sdk-for-js: need an example of syntax of a command to pass to a container when using "azure-arm-containerinstance"

Created on 8 Apr 2019  路  4Comments  路  Source: Azure/azure-sdk-for-js

Hi, just looking for some guidance on how to properly invoke a command when a container starts, when creating it via azure-arm-containerinstance package.

return client.containerGroups
                    .beginCreateOrUpdate(process.env.AZURE_RESOURCE_GROUP, containerInstanceName, {
                        tags: ['server'],
                        location: process.env.AZURE_INSTANCE_LOCATION,
                        containers: [
                            {
                                image: process.env.CONTAINER_IMAGE,
                                name: containerInstanceName,
                                command: ["./some-executable","?Type=Fall?"],
                                ports: [
                                    {
                                        port: 1111,
                                        protocol: 'UDP',
                                    },
                                ],
                                resources: {
                                    requests: {
                                        cpu: Number(process.env.INSTANCE_CPU),
                                        memoryInGB: Number(process.env.INSTANCE_MEMORY),
                                    },
                                },
                            },
                        ],
                        imageRegistryCredentials: [
                            {
                                server: process.env.CONTAINER_REGISTRY_SERVER,
                                username: process.env.CONTAINER_REGISTRY_USERNAME,
                                password: process.env.CONTAINER_REGISTRY_PASSWORD,
                            },
                        ],

specifically this part, is this correct? Just an array of strings? Are there any good examples anywhere? (tried both google and bing) Is this equivalent of docker's CMD ["command","argument"]?

command: ["./some-executable","?Type=Fall?"],
Container Instances Mgmt Service Attention customer-reported question

All 4 comments

This is a service specific question. @yangl900, @samkreter, @xuto2 from the container instance service team, can you please answer the question posted by the customer?

Thank you for opening this issue! We are routing it to the appropriate team for follow up.

@avieru are you still experiencing this issue?

@lilyjma gave up and no longer working on that project. can close it.

Was this page helpful?
0 / 5 - 0 ratings