We’re sorry to hear you’ve had some difficulties.
Regarding Octopus failing to load the image versions, this could be due to them not being SemVer. Octopus requires that versions are in SemVer form. Could this be the problem?
Also, if I understand your question correctly, you are trying to deploy a container image to an Azure Web App? If so, you will not be able to use the Docker Run step.
You will need to follow these steps:
- Add your container registry as a package feed in Octopus
- Add your Azure subscription as an account
- Add your Azure Web App as a deployment target, and give it a role.
- Add Run an Azure Powershell Script to your deployment process.
- Set the Execution Location of your script to Run on a Worker on behalf of each deployment target, and then in the On Behalf Of field select the role you used on the deployment target.
- Add your container image as a referenced package on the step
- In the script body of the step, this is where you will need to deploy the image to your web app. It should look something like the sample below:
$ResourceGroupName = $OctopusParameters["Octopus.Action.Azure.ResourceGroupName"]
$AppName = $OctopusParameters["Octopus.Action.Azure.WebAppName"]
$ImageName = $OctopusParameters["Octopus.Action.Package[aspnetapp].Image"]
$RegistryUrl = $OctopusParameters["Octopus.Action.Package[aspnetapp].Registry"]
# Set docker image
az webapp config container set `
--resource-group $ResourceGroupName `
--name $AppName `
--docker-custom-image-name $ImageName `
Note that aspnetapp should be replaced with whatever you named your container image package reference. Information on the variables available to your script can be found here.
I hope that helps. We’re aware this scenario isn’t a simple as it should be. Please reach out if we can assist further