Created
February 16, 2022 14:23
-
-
Save hebertcisco/076d40706c2f62bd53ce566d21373a1f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env pwsh | |
function Docker-Build() { | |
$AppName = Read-Host -Prompt "Enter the name of the application: " | |
$Executor = 'docker ' | |
$ExecutorArgs = 'build -t' | |
$GetArgsFinal = Read-Host -Prompt "Build to production OR development?: " | |
$ArgsFinal = '--target ' + $GetArgsFinal + ' .' | |
$Command = $Executor + $ExecutorArgs + ' ' + $AppName + ' ' + $ArgsFinal | |
Write-Output $Command | |
Invoke-Expression $Command | |
} | |
Export-ModuleMember -Alias Docker-Build -Function Docker-Build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment