Running inside of a custom docker container completes instantly without deploying
- Dominant language
- TypeScript
- Stars
- 64
- Forks
- 20
- Avg merge
- 15h 37m
- Merged PRs (30d)
- 4
Description
Hi,
I came across one issue - I am using a custom image to save some time installing the tools necessary:
`container: mcr.microsoft.com/azure-cli`
I am running the following job:
```yaml
- name: '🚀 Deploy Bicep'
uses: azure/bicep-deploy@v2
with:
type: deployment
operation: create
name: myDeployment
location: 'swedencentral'
scope: subscription
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
template-file: 'deploy.bicep'
parameters-file: 'deploy.${{ env.ENVIRONMENT_NAME }}.bicepparam'
```
This job completes within 2 seconds, and doesn't create the deployment. From the log it seems to try to start a docker container. So I guess this requires some additional configuration to support docker in docker?
```
##[debug]Evaluating condition for step: '🚀 Deploy Bicep'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: 🚀 Deploy Bicep
##[debug]Loading inputs
##[debug]Evaluating: format('myDeployment')
##[debug]Evaluating format:
##[debug]..Evaluating String:
##[debug]..=> 'myDeployment'
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating Index:
##[debug]........Evaluating github:
##[debug]........=> Object
##[debug]........Evaluating String:
##[debug]........=> 'event'
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'inputs'
##[debug]....=> null
##[debug]..=> null
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating Index:
##[debug]........Evaluating github:
##[debug]........=> Object
##[debug]........Evaluating String:
##[debug]........=> 'event'
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'inputs'
##[debug]....=> null
##[debug]..=> null
##[debug]..Evaluating Index:
##[debug]....Evaluating github:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'run_id'
##[debug]..=> '1825621'
##[debug]=> 'myDeployment'
##[debug]Result: 'myDeployment'
##[debug]Evaluating: vars.AZURE_SUBSCRIPTION_ID
##[debug]Evaluating Index:
##[debug]..Evaluating vars:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'AZURE_SUBSCRIPTION_ID'
##[debug]=> 'c5b....'
##[debug]Result: 'c5b...'
##[debug]Evaluating: format('deploy.***0***.bicepparam', env.ENVIRONMENT_NAME)
##[debug]Evaluating format:
##[debug]..Evaluating String:
##[debug]..=> 'deploy.***0***.bicepparam'
##[debug]..Evaluating Index:
##[debug]....Evaluating env:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'ENVIRONMENT_NAME'
##[debug]..=> 'dev'
##[debug]=> 'deploy.dev.bicepparam'
##[debug]Result: 'deploy.dev.bicepparam'
##[debug]Loading env
Run azure/bicep-deploy@v2
/usr/local/bin/docker exec bf1975ba1fb[6](https://git.selfhosteddomain.com/)2f sh -c "cat /etc/*release | grep ^ID"
##[debug]ID=azurelinux
##[debug]Running JavaScript Action with default external tool: node20
Action config: ***
"type": "deployment",
"name": "myDeployment",
"location": "swedencentral",
"templateFile": "/__w/deploy.bicep",
"parametersFile": "/__w/deploy.dev.bicepparam",
"parameters": ***,
"tags": ***,
"maskedOutputs": [],
"environment": "azureCloud",
"operation": "create",
"scope": ***
"type": "subscription",
"subscriptionId": "c5b..."
***,
"whatIf": ***
"excludeChangeTypes": []
***
***
##[debug]Node Action run completed with exit code 0
##[debug]Finishing: 🚀 Deploy Bicep
```

If the job isn't able to start a docker container, shouldn't it fail? And maybe provide some documentation around this topic?
Contributor guide
Research direction
Start by reproducing the workflow with `container: mcr.microsoft.com/azure-cli` and `azure/bicep-deploy@v2`, then inspect the logged Docker command and the action's exit behavior. Determine why the deployment does not run in this container context and whether the action should fail or document the requirement; done means the behavior is corrected or clearly documented and covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, docker, github-actions, typescript
- Domain
- ci-cd, cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100