Interactive containers in Azure

%3CLINGO-SUB%20id%3D%22lingo-sub-250719%22%20slang%3D%22en-US%22%3EInteractive%20containers%20in%20Azure%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-250719%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20figure%20out%20how%20to%20run%20an%20interactive%20container%20in%20azure.%20What%20I%20would%20do%20for%20a%20local%20container%20on%20docker%3A%3C%2FP%3E%3CP%3Edocker%20run%20-t%20-i%20dockerID%20%2Fbin%2Fbash%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20i%20can%20create%20the%20container%20on%20azure%2C%20but%20if%20it%20doesn't%20have%20an%20active%20back%20ground%20process%2C%20it%20just%20exits%20immediately.%20I%20could%20probably%20just%20create%20a%20shell%20script%20that%20keeps%20the%20container%20alive%20in%20the%20background%20and%20then%20use%20az%20container%20exec%20to%20get%20a%20bash%20shell%2C%20but%20it%20seems%20wasteful%20to%20leave%20the%20container%20running%20all%20the%20time%20and%20not%20the%20right%20way%20to%20do%20things%20in%20container%20land%20from%20understanding.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo...%20what%20is%20the%20right%20way%20to%20create%20an%20interactive%20container%20in%20azure%20(like%20this%20one%20for%20example%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fbrimstone%2Fdocker-kali%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fbrimstone%2Fdocker-kali%3C%2FA%3E)%3F%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-250719%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Containers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Regular Visitor

Hello All,

 

I'm trying to figure out how to run an interactive container in azure. What I would do for a local container on docker:

docker run -t -i dockerID /bin/bash

 

Now i can create the container on azure, but if it doesn't have an active back ground process, it just exits immediately. I could probably just create a shell script that keeps the container alive in the background and then use az container exec to get a bash shell, but it seems wasteful to leave the container running all the time and not the right way to do things in container land from understanding.

 

So... what is the right way to create an interactive container in azure (like this one for example

https://github.com/brimstone/docker-kali)? ?

0 Replies