Skip to content

Commit

Permalink
updated src link to point to newer main version
Browse files Browse the repository at this point in the history
  • Loading branch information
MRColorR committed Nov 30, 2022
1 parent 8499c8f commit 9dd6cb7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .resources/.scripts/install-docker-mac.ps1
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# if a flag is provided it will install Docker for mac with intelCPU
param(
[Parameter(Mandatory)][string]$filePath,
[Parameter(Mandatory)][string]$filesPath,
[switch]$IntelCPU
)
$cpu = ""
Write-Host "Downloading Docker setup files, please wait... "
if ($IntelCPU) {
$cpu = "Intel"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest https://desktop.docker.com/mac/main/amd64/Docker.dmg -o "$filePath/Docker.dmg";
Invoke-WebRequest https://desktop.docker.com/mac/main/amd64/Docker.dmg -o "$filesPath/Docker.dmg";
$ProgressPreference = 'Continue'
}else {
$cpu = "Apple silicon arm"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest https://desktop.docker.com/mac/main/arm64/Docker.dmg -o "$filePath/Docker.dmg";
Invoke-WebRequest https://desktop.docker.com/mac/main/arm64/Docker.dmg -o "$filesPath/Docker.dmg";
$ProgressPreference = 'Continue'
}
Write-Output "Installing Docker for $cpu CPU, please wait..."
sudo hdiutil attach "$filePath/Docker.dmg"
sudo hdiutil attach "$filesPath/Docker.dmg"
sudo /Volumes/Docker/Docker.app/Contents/MacOS/install --accept-license
sudo hdiutil detach /Volumes/Docker
open /Applications/Docker.app
13 changes: 6 additions & 7 deletions .resources/.scripts/install-docker-win.ps1
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
set-executionpolicy -scope CurrentUser -executionPolicy Bypass -Force
param(
[Parameter(Mandatory)][string]$filesPath
)
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
# Relaunch as an elevated process:
Start-Process powershell.exe "-File", ('"{0}"' -f $MyInvocation.MyCommand.Path) -Verb RunAs
exit
}
$RESOURCES_DIR = (get-item $PWD ).parent.FullName
$SCRIPTS_DIR = "$RESOURCES_DIR\.scripts"
$FILES_DIR = "$RESOURCES_DIR\.files"


function installDoker {
Write-Host $filesPath
Write-Host "Downloading Docker setup files, please wait... "
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://desktop.docker.com/win/stable/Docker%20Desktop%20Installer.exe -OutFile DockerInstaller.exe
Expand All @@ -18,7 +17,7 @@ function installDoker {

Write-Output "Installing Docker please wait..."
start-process .\DockerInstaller.exe -Wait -NoNewWindow -ArgumentList "install --accept-license --quiet"
Copy-Item "$FILES_DIR\docker-default-settings.json" -Destination "$env:AppData\Docker\settings.json"
Copy-Item "$filesPath\docker-default-settings.json" -Destination "$env:AppData\Docker\settings.json"
Write-Output "Docker Installed successfully"
Read-Host "You must reboot the sytem to continue. After reboot re-run the script and proceed with the next steps (e.g. .env setup and start stack)"
Restart-Computer -Confirm
Expand Down Expand Up @@ -52,7 +51,7 @@ if ($wsl.State -eq "Enabled") {
installDoker
}
else {
Write-Output 'Docker installation/repair canceled.'
Write-Output 'Docker installation/repair canceled.'
Write-Output 'If docker was already correctly installed on your system you should be able to proceed with the next steps anyway'
}
}
Expand Down
10 changes: 5 additions & 5 deletions runme.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $DKCOM_SRC = "https://github.com/MRColorR/money4band/raw/main/$DKCOM_FILENAME"
$DKINST_WIN_SRC = 'https://github.com/MRColorR/money4band/raw/main/.resources/.scripts/install-docker-win.ps1'

### Docker installer script for Mac source link ##
$DKINST_MAC_SRC = 'https://github.com/MRColorR/money4band/raw/dev/.resources/.scripts/install-docker-mac.ps1'
$DKINST_MAC_SRC = 'https://github.com/MRColorR/money4band/raw/main/.resources/.scripts/install-docker-mac.ps1'


### Resources, Scripts and Files folders
Expand Down Expand Up @@ -85,8 +85,8 @@ function fn_dockerInstall {
Clear-Host
Write-Output "Starting Docker for Windows auto installation script"
Invoke-WebRequest $DKINST_WIN_SRC -o "$SCRIPTS_DIR\install-docker-win.ps1"
Start-Process PowerShell -Verb RunAs "-noprofile -executionpolicy bypass -command `"$SCRIPTS_DIR\install-docker-win.ps1`"" -Wait
$InstallStatus = 1;
Start-Process PowerShell -Verb RunAs "-noprofile -executionpolicy bypass -command `"$SCRIPTS_DIR\install-docker-win.ps1 -filesPath $FILES_DIR`"" -Wait
$InstallStatus = 1;
}
3 {
Clear-Host
Expand All @@ -98,11 +98,11 @@ function fn_dockerInstall {
$cpuSel = Read-Host
switch ($cpuSel) {
1 {
Start-Process PowerShell -Verb RunAs "-noprofile -executionpolicy bypass -command `"$SCRIPTS_DIR\install-docker-mac.ps1 -filePath $FILES_DIR`"" -Wait
Start-Process PowerShell -Verb RunAs "-noprofile -executionpolicy bypass -command `"$SCRIPTS_DIR\install-docker-mac.ps1 -filesPath $FILES_DIR`"" -Wait
$InstallStatus = 1;
}
2 {
Start-Process PowerShell -Verb RunAs "-noprofile -executionpolicy bypass -command `"$SCRIPTS_DIR\install-docker-mac.ps1 -filePath $FILES_DIR -IntelCPU `"" -Wait
Start-Process PowerShell -Verb RunAs "-noprofile -executionpolicy bypass -command `"$SCRIPTS_DIR\install-docker-mac.ps1 -filesPath $FILES_DIR -IntelCPU `"" -Wait
$InstallStatus = 1;
}
Default { fn_unknown "$cpuSel"}
Expand Down

0 comments on commit 9dd6cb7

Please sign in to comment.