I am able to run the docker image and container works fine in local as expected.
After pushing the docker image to Azure Container Registry, I've tried to run through Azure Container Instance and throwing below error. Whereas the PS file is located in the WORKDIR and its working in local. Would be great if someone can help.
Dockerfile
WORKDIR c:/inetpub/wwwroot
ENTRYPOINT powershell .\InitializeContainer
Error:
.\InitializeContainer : The term '.\InitializeContainer' is not recognized as
the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ .\InitializeContainer
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (.\InitializeContainer:String) [
], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Related
i'm getting the below error while registering the IoT Device via Powershell Command
Register-IoTDevice : The term 'Register-IoTDevice' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:11
$device = Register-IoTDevice #deviceParams
~~~~~~~~~~~~~~~~~~
CategoryInfo : ObjectNotFound: (Register-IoTDevice:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
I'm trying to run a windows vm in virtualbox and use it as a runner in git lab, following https://docs.gitlab.com/runner/executors/virtualbox.html#use-native-openssh-and-powershell
I installed native open ssh, git for windows and configured the default shell to be pwsh as they request:
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "$PSHOME\pwsh.exe" -PropertyType String -Force
however SSH does not work. When I try to ssh to localhost:
ssh MACHINE_NAME\username#localhost
I get Permission denied, try again
when I do this. If I do
reg add HKLM\SOFTWARE\OpenSSH /v DefaultShell /d C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe
then I can ssh into my machine. THe gitlab can also, but then it complains that bash is not a command on power shell:
00:02
bash : The term 'bash' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path
is correct and try again.
At line:1 char:1
+ bash -l
+ ~~~~
+ CategoryInfo : ObjectNotFound: (bash:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
ERROR: Job failed: prepare environment: Process exited with status 1. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
To fix that, I installed WSL and ubuntu on Windows, but then it gives
ERROR: Job failed: prepare environment: Process exited with status 1. Check https://docs.gitlab.com/runner/shells/index.html#shell-profile-loading for more information
this is a known problem in ubuntu which is fixed by removing .bash_logout but I can't do this to the WSL image. Also, installing WSL shouldn't be the way here, it should work without WSL.
npx : The term 'npx' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
npx create-react-app myapp
+ CategoryInfo : ObjectNotFound: (npx:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
**Create React App not showing error message with ErrorBoundary
npx : The term 'npx' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
npx create-react-app myapp
+ CategoryInfo : ObjectNotFound: (npx:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
**
I have tried installing the Azure and AZ cmdlet via the command with AllowClobber and that successfully installed. I am running PowerShell as administrator and have connected my Azure account by signing in. However, when running the command "Get-AzurePublishSettingFile" the following error appears:
Get-AzurePublishSettingFile : The term 'Get-AzurePublishSettingFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
Get-AzurePublishSettingFile
+ CategoryInfo : ObjectNotFound: (Get-AzurePublishSettingFile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Make sure you have installed the ASM PowerShell module Azure, and I notice you missed an s in your command, it should be Get-AzurePublishSettingsFile, not Get-AzurePublishSettingFile.
Reference - https://learn.microsoft.com/en-us/powershell/module/servicemanagement/azure.service/get-azurepublishsettingsfile?view=azuresmps-4.0.0
How should we seed data in asp.net preview web applications. I tried to use
Enable-Migrations
command but it gave me the following error:
Enable-Migrations : The term 'Enable-Migrations' is not recognized as
the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify
that the path is correct and try again. At line:1 char:1
+ Enable-Migrations
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Enable-Migrations:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException