Skip to content

Comments

Update docker.sh#1679

Merged
scriptingosx merged 1 commit intoInstallomator:mainfrom
kenchan0130:fix-docker
Mar 21, 2025
Merged

Update docker.sh#1679
scriptingosx merged 1 commit intoInstallomator:mainfrom
kenchan0130:fix-docker

Conversation

@kenchan0130
Copy link
Contributor

The current installation method is inconvenient because the flow requires end users to have separate administrative privileges.
Since a command line installation method is officially provided, I have changed to use this method.

$ ./utils/assemble.sh docker DEBUG=0 INSTALL=force BLOCKING_PROCESS_ACTION=kill
2024-05-31 15:33:50 : REQ   : docker : ################## Start Installomator v. 10.6beta, date 2024-05-31
2024-05-31 15:33:50 : INFO  : docker : ################## Version: 10.6beta
2024-05-31 15:33:50 : INFO  : docker : ################## Date: 2024-05-31
2024-05-31 15:33:50 : INFO  : docker : ################## docker
2024-05-31 15:33:50 : DEBUG : docker : DEBUG mode 1 enabled.
2024-05-31 15:33:50 : INFO  : docker : setting variable from argument DEBUG=0
2024-05-31 15:33:50 : INFO  : docker : setting variable from argument INSTALL=force
2024-05-31 15:33:50 : INFO  : docker : setting variable from argument BLOCKING_PROCESS_ACTION=kill
2024-05-31 15:33:50 : DEBUG : docker : name=Docker
2024-05-31 15:33:50 : DEBUG : docker : appName=
2024-05-31 15:33:50 : DEBUG : docker : type=dmg
2024-05-31 15:33:50 : DEBUG : docker : archiveName=
2024-05-31 15:33:50 : DEBUG : docker : downloadURL=https://desktop.docker.com/mac/stable/arm64/Docker.dmg
2024-05-31 15:33:50 : DEBUG : docker : curlOptions=
2024-05-31 15:33:50 : DEBUG : docker : appNewVersion=4.30.0
2024-05-31 15:33:50 : DEBUG : docker : appCustomVersion function: Not defined
2024-05-31 15:33:50 : DEBUG : docker : versionKey=CFBundleShortVersionString
2024-05-31 15:33:50 : DEBUG : docker : packageID=
2024-05-31 15:33:50 : DEBUG : docker : pkgName=
2024-05-31 15:33:50 : DEBUG : docker : choiceChangesXML=
2024-05-31 15:33:50 : DEBUG : docker : expectedTeamID=9BNSXJN65R
2024-05-31 15:33:50 : DEBUG : docker : blockingProcesses=Docker Desktop
2024-05-31 15:33:50 : DEBUG : docker : installerTool=
2024-05-31 15:33:50 : DEBUG : docker : CLIInstaller=Docker.app/Contents/MacOS/install
2024-05-31 15:33:50 : DEBUG : docker : CLIArguments=--accept-license --user kenchan0130
2024-05-31 15:33:50 : DEBUG : docker : updateTool=
2024-05-31 15:33:50 : DEBUG : docker : updateToolArguments=
2024-05-31 15:33:50 : DEBUG : docker : updateToolRunAsCurrentUser=
2024-05-31 15:33:50 : INFO  : docker : BLOCKING_PROCESS_ACTION=kill
2024-05-31 15:33:50 : INFO  : docker : NOTIFY=success
2024-05-31 15:33:50 : INFO  : docker : LOGGING=DEBUG
2024-05-31 15:33:50 : INFO  : docker : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2024-05-31 15:33:50 : INFO  : docker : Label type: dmg
2024-05-31 15:33:50 : INFO  : docker : archiveName: Docker.dmg
2024-05-31 15:33:50 : DEBUG : docker : Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.DqeyCoMV
2024-05-31 15:33:50 : INFO  : docker : App(s) found: /Applications/Docker.app
2024-05-31 15:33:50 : INFO  : docker : found app at /Applications/Docker.app, version 4.30.0, on versionKey CFBundleShortVersionString
2024-05-31 15:33:50 : INFO  : docker : appversion: 4.30.0
2024-05-31 15:33:50 : INFO  : docker : Label is not of type “updateronly”, and it’s set to use force to install or ignoring app store apps, so not using updateTool.
2024-05-31 15:33:50 : INFO  : docker : Latest version of Docker is 4.30.0
2024-05-31 15:33:50 : INFO  : docker : There is no newer version available.
2024-05-31 15:33:50 : REQ   : docker : Downloading https://desktop.docker.com/mac/stable/arm64/Docker.dmg to Docker.dmg
2024-05-31 15:33:50 : DEBUG : docker : No Dialog connection, just download
2024-05-31 15:34:01 : DEBUG : docker : File list: -rw-r--r--  1 root  wheel   411M  5 31 15:34 Docker.dmg
2024-05-31 15:34:01 : DEBUG : docker : File type: Docker.dmg: XZ compressed data, checksum NONE
2024-05-31 15:34:01 : DEBUG : docker : curl output was:
*   Trying 54.239.168.78:443...
* Connected to desktop.docker.com (54.239.168.78) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
} [323 bytes data]
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* (304) (IN), TLS handshake, Unknown (8):
{ [19 bytes data]
* (304) (IN), TLS handshake, Certificate (11):
{ [5104 bytes data]
* (304) (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* (304) (IN), TLS handshake, Finished (20):
{ [36 bytes data]
* (304) (OUT), TLS handshake, Finished (20):
} [36 bytes data]
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=*.docker.com
*  start date: Oct  2 00:00:00 2023 GMT
*  expire date: Oct 31 23:59:59 2024 GMT
*  subjectAltName: host "desktop.docker.com" matched cert's "*.docker.com"
*  issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M01
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://desktop.docker.com/mac/stable/arm64/Docker.dmg
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: desktop.docker.com]
* [HTTP/2] [1] [:path: /mac/stable/arm64/Docker.dmg]
* [HTTP/2] [1] [user-agent: curl/8.4.0]
* [HTTP/2] [1] [accept: */*]
> GET /mac/stable/arm64/Docker.dmg HTTP/2
> Host: desktop.docker.com
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/2 301
< content-length: 0
< location: https://desktop.docker.com/mac/main/arm64/Docker.dmg
< date: Fri, 31 May 2024 02:38:38 GMT
< server: AmazonS3
< x-cache: Hit from cloudfront
< via: 1.1 3c3be6aa0993c54a165cc8a390c3ccc2.cloudfront.net (CloudFront)
< x-amz-cf-pop: KIX56-C2
< x-amz-cf-id: VUki0KxqFCe-9EK-PK3u4-3hgA4QL9o1L7goMnlqNXu9pf9ngaWw2A==
< age: 14113
<
{ [0 bytes data]
* Connection #0 to host desktop.docker.com left intact
* Issue another request to this URL: 'https://desktop.docker.com/mac/main/arm64/Docker.dmg'
* Found bundle for host: 0x600003dd4450 [can multiplex]
* Re-using existing connection with host desktop.docker.com
* [HTTP/2] [3] OPENED stream for https://desktop.docker.com/mac/main/arm64/Docker.dmg
* [HTTP/2] [3] [:method: GET]
* [HTTP/2] [3] [:scheme: https]
* [HTTP/2] [3] [:authority: desktop.docker.com]
* [HTTP/2] [3] [:path: /mac/main/arm64/Docker.dmg]
* [HTTP/2] [3] [user-agent: curl/8.4.0]
* [HTTP/2] [3] [accept: */*]
> GET /mac/main/arm64/Docker.dmg HTTP/2
> Host: desktop.docker.com
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/2 200
< content-length: 431147839
< last-modified: Fri, 17 May 2024 16:03:16 GMT
< x-amz-version-id: 9Z_bdf2jadbkZBmYr_ISgMmvD.nrW0dt
< server: AmazonS3
< date: Fri, 31 May 2024 01:52:58 GMT
< etag: "a90611aa271a17b8bfb8a1e9519cad68"
< vary: Accept-Encoding
< x-cache: Hit from cloudfront
< via: 1.1 3c3be6aa0993c54a165cc8a390c3ccc2.cloudfront.net (CloudFront)
< x-amz-cf-pop: KIX56-C2
< x-amz-cf-id: uVlYIe8Cwj9KlHIiAVDiSgXtjC8Thuv3iSQYlK2r5alVYEZN9n0Xqw==
< age: 20057
<
{ [16020 bytes data]
* Connection #0 to host desktop.docker.com left intact

2024-05-31 15:34:01 : REQ   : docker : no more blocking processes, continue with update
2024-05-31 15:34:01 : REQ   : docker : Installing Docker
2024-05-31 15:34:01 : INFO  : docker : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.DqeyCoMV/Docker.dmg
2024-05-31 15:34:23 : DEBUG : docker : Debugging enabled, dmgmount output was:
Protective Master Boot Record (MBR : 0)のチェックサムを計算中…
Protective Master Boot Record (MBR :: 検証済み CRC32 $BBCF6169
GPT Header (Primary GPT Header : 1)のチェックサムを計算中…
GPT Header (Primary GPT Header : 1): 検証済み CRC32 $1354C779
GPT Partition Data (Primary GPT Table : 2)のチェックサムを計算中…
GPT Partition Data (Primary GPT Tabl: 検証済み CRC32 $86DEEACF
(Apple_Free : 3)のチェックサムを計算中…
(Apple_Free : 3): 検証済み CRC32 $00000000
EFI System Partition (C12A7328-F81F-11D2-BA4B-00A0C93EC93B : 4)のチェックサムを計算中…
EFI System Partition (C12A7328-F81F-: 検証済み CRC32 $B54B659C
disk image (Apple_HFS : 5)のチェックサムを計算中…
disk image (Apple_HFS : 5): 検証済み CRC32 $391414F4
(Apple_Free : 6)のチェックサムを計算中…
(Apple_Free : 6): 検証済み CRC32 $00000000
GPT Partition Data (Backup GPT Table : 7)のチェックサムを計算中…
GPT Partition Data (Backup GPT Table: 検証済み CRC32 $86DEEACF
GPT Header (Backup GPT Header : 8)のチェックサムを計算中…
GPT Header (Backup GPT Header : 8): 検証済み CRC32 $950C28F4
検証済み CRC32 $2473DCCD
/dev/disk4          	GUID_partition_scheme
/dev/disk4s1        	EFI
/dev/disk4s2        	Apple_HFS                      	/Volumes/Docker

2024-05-31 15:34:23 : INFO  : docker : Mounted: /Volumes/Docker
2024-05-31 15:34:23 : INFO  : docker : Verifying: /Volumes/Docker/Docker.app
2024-05-31 15:34:23 : DEBUG : docker : App size: 1.6G	/Volumes/Docker/Docker.app
2024-05-31 15:34:48 : DEBUG : docker : Debugging enabled, App Verification output was:
/Volumes/Docker/Docker.app: accepted
source=Notarized Developer ID
origin=Developer ID Application: Docker Inc (9BNSXJN65R)

2024-05-31 15:34:48 : INFO  : docker : Team ID matching: 9BNSXJN65R (expected: 9BNSXJN65R )
2024-05-31 15:34:48 : INFO  : docker : Downloaded version of Docker is 4.30.0 on versionKey CFBundleShortVersionString, same as installed.
2024-05-31 15:34:48 : INFO  : docker : Using force to install anyway.
2024-05-31 15:34:48 : INFO  : docker : App has LSMinimumSystemVersion: 11.0
2024-05-31 15:34:48 : INFO  : docker : CLIInstaller exists, running installer command /Volumes/Docker/Docker.app/Contents/MacOS/install --accept-license --user kenchan0130
2024-05-31 15:35:06 : INFO  : docker : Succesfully ran /Volumes/Docker/Docker.app/Contents/MacOS/install --accept-license --user kenchan0130
2024-05-31 15:35:06 : DEBUG : docker : Debugging enabled, update tool output was:
Log

2024-05-31 15:35:06 : INFO  : docker : Finishing...
2024-05-31 15:35:09 : INFO  : docker : App(s) found: /Applications/Docker.app
2024-05-31 15:35:09 : INFO  : docker : found app at /Applications/Docker.app, version 4.30.0, on versionKey CFBundleShortVersionString
2024-05-31 15:35:09 : REQ   : docker : Installed Docker, version 4.30.0
2024-05-31 15:35:09 : INFO  : docker : notifying
2024-05-31 15:35:10 : DEBUG : docker : Unmounting /Volumes/Docker
2024-05-31 15:35:10 : DEBUG : docker : Debugging enabled, Unmounting output was:
"disk4" ejected.
2024-05-31 15:35:10 : DEBUG : docker : Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.DqeyCoMV
2024-05-31 15:35:10 : DEBUG : docker : Debugging enabled, Deleting tmpDir output was:
/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.DqeyCoMV/Docker.dmg
2024-05-31 15:35:10 : DEBUG : docker : /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.DqeyCoMV
2024-05-31 15:35:10 : INFO  : docker : Installomator did not close any apps, so no need to reopen any apps.
2024-05-31 15:35:10 : REQ   : docker : All done!
2024-05-31 15:35:10 : REQ   : docker : ################## End Installomator, exit code 0

CLIArguments+=(--user "${currentUser}")
fi
expectedTeamID="9BNSXJN65R"
blockingProcesses=( "Docker Desktop" "Docker" )
Copy link
Contributor Author

@kenchan0130 kenchan0130 May 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ ps aux | grep -i "docker"
kenchan0130          68931   0.1  0.4 411138208 150352   ??  S     3:12PM   0:00.97 /Applications/Docker.app/Contents/MacOS/com.docker.backend
kenchan0130          68964   0.1  0.2 442390288  64560   ??  S     3:13PM   0:00.43 /Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/Frameworks/Docker Desktop Helper (GPU).app/Contents/MacOS/Docker Desktop Helper (GPU) --type=gpu-process --user-data-dir=/Users/kenchan0130/Library/Application Support/Docker Desktop --enable-features=kWebSQLAccess --disable-features=SpareRendererForSitePerProcess --variations-seed-version --seatbelt-client=58
kenchan0130          69061   0.0  0.0 407962448     48 s004  S+    3:13PM   0:00.00 grep --color=always -i docker
kenchan0130          68968   0.0  0.1 442366048  38352   ??  S     3:13PM   0:00.05 /Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/Frameworks/Docker Desktop Helper.app/Contents/MacOS/Docker Desktop Helper --type=utility --utility-sub-type=network.mojom.NetworkService --lang=ja --service-sandbox-type=network --user-data-dir=/Users/kenchan0130/Library/Application Support/Docker Desktop --standard-schemes=app --secure-schemes=app --fetch-schemes=scout-graphql,docker-hub,docker-extensions-be,project-api --shared-files --field-trial-handle=1718379636,r,17224225255580469348,7527058344799599953,262144 --enable-features=kWebSQLAccess --disable-features=SpareRendererForSitePerProcess --variations-seed-version --seatbelt-client=58
kenchan0130          68948   0.0  0.6 1586311488 195760   ??  S     3:13PM   0:02.44 /Applications/Docker.app/Contents/MacOS/Docker Desktop.app/Contents/MacOS/Docker Desktop --reason=open-tray --analytics-enabled=true --name=dashboard
kenchan0130          68942   0.0  0.1 410860560  29984   ??  S     3:13PM   0:00.06 /Applications/Docker.app/Contents/MacOS/com.docker.virtualization --kernel /Applications/Docker.app/Contents/Resources/linuxkit/kernel --cmdline init=/init loglevel=1 root=/dev/vdb rootfstype=erofs ro vsyscall=emulate panic=0 linuxkit.unified_cgroup_hierarchy=0 console=hvc0   virtio_net.disable_csum=1 eth0.IPNet=192.168.65.3/24 eth0.router=192.168.65.1 eth0.mtu=1500 eth1.dhcp vpnkit.connect=connect://2/1999 --boot /Applications/Docker.app/Contents/Resources/linuxkit/boot.raw --services /Applications/Docker.app/Contents/Resources/linuxkit/services.raw --disk /Users/kenchan0130/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw --networkType gvisor --macaddr-filename-prefix vms/0/macaddr --cpus 10 --memoryMiB 8092 --console-log log/vm/console.log --console /Users/kenchan0130/Library/Containers/com.docker.docker/Data/vms/0/console.sock --api /Users/kenchan0130/Library/Containers/com.docker.docker/Data/virtualization.sock --watchdog --kernel-for-udp --virtiofs /Users --virtiofs /Volumes --virtiofs /private --virtiofs /tmp --virtiofs /var/folders
kenchan0130          68941   0.0  0.1 409831792  38624   ??  S     3:13PM   0:00.07 com.docker.build
kenchan0130          68940   0.0  0.1 409796096  37024   ??  S     3:13PM   0:00.05 docker serve --address unix:///Users/kenchan0130/.docker/run/docker-cli-api.sock
kenchan0130          68939   0.0  0.0 409759616  14368   ??  S     3:13PM   0:00.01 com.docker.dev-envs -watchdog
root             68834   0.0  0.0 409777520   7616   ??  Ss    3:12PM   0:00.02 /Library/PrivilegedHelperTools/com.docker.vmnetd
$ pgrep -xq "Docker" && echo "found" || echo "not found"
not found
$ pkill "Docker Desktop"                                                                                                           
$ ps aux | grep -i "docker"
kenchan0130          77338   0.0  0.0 408636560   1776 s006  S+    3:41PM   0:00.00 grep --color=always -i docker
root             75693   0.0  0.0 409777520   7616   ??  Ss    3:35PM   0:00.02 /Library/PrivilegedHelperTools/com.docker.vmnetd

The above results show that there is no process called Docker and only Docker Desktop needs to be killed.

By the way com.docker.vmnetd is started via LaunchDaemon, it is ignored because killing it will cause an infinite loop.

@acodega
Copy link
Collaborator

acodega commented Sep 10, 2024

Would you like to combine this with #1867 ? (Since the downloadURL def needs to be updated)

@acodega acodega added the application adds or improves an application label label Sep 10, 2024
@acodega acodega added this to the v10.7 milestone Sep 10, 2024
@kenchan0130
Copy link
Contributor Author

@acodega

Would you like to combine this with #1867 ? (Since the downloadURL def needs to be updated)

The temporary xml data update delay is unavoidable.
Since we are currently getting the expected values, this pull request takes that issue out of scope.

@scriptingosx scriptingosx modified the milestones: v10.7, v10.8 Jan 24, 2025
@scriptingosx
Copy link
Collaborator

Thank you!

@scriptingosx scriptingosx merged commit 4aba1ac into Installomator:main Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application adds or improves an application label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants