Apple Container: erinevus redaktsioonide vahel
Allikas: Imre kasutab arvutit
Mine navigeerimisribaleMine otsikasti
| (ei näidata sama kasutaja üht vahepealset redaktsiooni) | |||
| 6. rida: | 6. rida: | ||
TODO |
TODO |
||
| + | |||
| + | Väited |
||
| + | |||
| + | * apple-container lahendus võimaldab kasutada amd64 ja arm64 virtuaalset arvutit |
||
| + | * virtuaalne arvuti võib esineda nii nö oci-konteineri kujul kui täielise virtuaalse arvuti kujul |
||
===Paigaldamine=== |
===Paigaldamine=== |
||
| 232. rida: | 237. rida: | ||
<pre> |
<pre> |
||
| + | imreoolberg@Imres-MacBook-Air ~ % container run -it --name persisttest-5 ubuntu bash |
||
| − | |||
</pre> |
</pre> |
||
Viimane redaktsioon: 10. august 2026, kell 23:46
Sissejuhatus
TODO
Tööpõhimõte
TODO
Väited
- apple-container lahendus võimaldab kasutada amd64 ja arm64 virtuaalset arvutit
- virtuaalne arvuti võib esineda nii nö oci-konteineri kujul kui täielise virtuaalse arvuti kujul
Paigaldamine
TODO
Kopeerimiseks sobib öelda
Imres-MacBook-Air:20260809 root# curl -L --output container-1.2.2-installer-signed.pkg https://github.com/apple/container/releases/download/1.2.2/container-1.2.2-installer-signed.pkg
Kontrollimiseks
Imres-MacBook-Air:20260809 root# pkgutil --check-signature /Users/imreoolberg/Downloads/container-1.2.2-installer-signed.pkg
Package "container-1.2.2-installer-signed.pkg":
Status: signed by a developer certificate issued by Apple for distribution
Notarization: trusted by the Apple notary service
Signed with a trusted timestamp on: 2026-08-08 01:47:20 +0000
Certificate Chain:
1. Developer ID Installer: Apple Inc. - Containerization (UPBK2H6LZM)
Expires: 2030-06-04 16:44:29 +0000
SHA256 Fingerprint:
45 19 B4 3D 00 F5 5E C6 31 38 D4 03 DE 1F 3C 54 23 90 EA E3 D8 2E
59 C1 84 38 46 FB DF E1 4F 5B
------------------------------------------------------------------------
2. Developer ID Certification Authority
Expires: 2031-09-17 00:00:00 +0000
SHA256 Fingerprint:
F1 6C D3 C5 4C 7F 83 CE A4 BF 1A 3E 6A 08 19 C8 AA A8 E4 A1 52 8F
D1 44 71 5F 35 06 43 D2 DF 3A
------------------------------------------------------------------------
3. Apple Root CA
Expires: 2035-02-09 21:40:36 +0000
SHA256 Fingerprint:
B0 B1 73 0E CB C7 FF 45 05 14 2C 49 F1 29 5E 6E DA 6B CA ED 7E 2C
68 C5 BE 91 B5 A1 10 01 F0 24
Imres-MacBook-Air:20260809 root# spctl -a -t install -v /Users/imreoolberg/Downloads/container-1.2.2-installer-signed.pkg
/Users/imreoolberg/Downloads/container-1.2.2-installer-signed.pkg: accepted
source=Notarized Developer ID
Paigaldamiseks
Imres-MacBook-Air:20260809 root# installer -pkg container-1.2.2-installer-signed.pkg -target / installer: Package name is container-1.2.2-installer-signed installer: Installing at base path / installer: The install was successful.
Logis
# tail -f /var/log/install.log
...
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Referenced component packages (1) trustLevel=350
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: -[IFPKGDerivedDocument sortedPackageLocations]: result = (
"file://localhost"
)
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: location = file://localhost
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: file://localhost/private/var/root/20260809/container-1.2.2-installer-signed.pkg
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Set authorization level to root for session
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Authorization is being checked, waiting until authorization arrives.
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Administrator authorization granted.
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Packages have been authorized for installation.
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Will use PK session
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Using authorization level of root for IFPKInstallElement
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Starting installation:
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Configuring volume "Macintosh HD"
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Preparing disk for local booted install.
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Free space on "Macintosh HD": 32.78 GB (32778833920 bytes).
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Create temporary directory "/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T//Install.78940FDpYBc"
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: IFPKInstallElement (1 packages)
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Current Path: /usr/sbin/installer
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Current Path: /bin/bash
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Current Path: /usr/bin/sudo
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: Current Path: /usr/bin/sudo
2026-08-10 01:37:58+03 Imres-MacBook-Air installd[939]: PackageKit: Adding client PKInstallDaemonClient pid=78940, uid=0 (/usr/sbin/installer)
2026-08-10 01:37:58+03 Imres-MacBook-Air installer[78940]: PackageKit: Enqueuing install with framework-specified quality of service (utility)
2026-08-10 01:37:58+03 Imres-MacBook-Air installd[939]: PackageKit: Set reponsibility for install to 1490
2026-08-10 01:37:58+03 Imres-MacBook-Air installd[939]: PackageKit: Hosted team responsibility for install set to team:(UPBK2H6LZM)
2026-08-10 01:37:58+03 Imres-MacBook-Air installd[939]: PackageKit: ----- Begin install -----
2026-08-10 01:37:58+03 Imres-MacBook-Air installd[939]: PackageKit: request=PKInstallRequest <1 packages, destination=/>
2026-08-10 01:37:58+03 Imres-MacBook-Air installd[939]: PackageKit: packages=(
"PKLeopardPackage <id=com.apple.container-installer, version=1.2.2, url=file://localhost/private/var/root/20260809/container-1.2.2-installer-signed.pkg>"
)
2026-08-10 01:37:58+03 Imres-MacBook-Air installd[939]: PackageKit: Extracting file://localhost/private/var/root/20260809/container-1.2.2-installer-signed.pkg (destination=/Library/InstallerSandboxes/.PKInstal
lSandboxManager/5C274BE5-0952-4A13-AEDC-87828C0B0E74.activeSandbox/Root/usr/local, uid=0)
2026-08-10 01:37:59+03 Imres-MacBook-Air installd[939]: PackageKit: prevent user idle system sleep
2026-08-10 01:37:59+03 Imres-MacBook-Air installd[939]: PackageKit: suspending backupd
2026-08-10 01:37:59+03 Imres-MacBook-Air installd[939]: PackageKit: Using trashcan path /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/PKInstallSandboxTrash/5C274BE5-0952-4A13-AEDC-87828C0B0E74.sandboxTrash
for sandbox /Library/InstallerSandboxes/.PKInstallSandboxManager/5C274BE5-0952-4A13-AEDC-87828C0B0E74.activeSandbox
2026-08-10 01:37:59+03 Imres-MacBook-Air installd[939]: PackageKit: Shoving /Library/InstallerSandboxes/.PKInstallSandboxManager/5C274BE5-0952-4A13-AEDC-87828C0B0E74.activeSandbox/Root (1 items) to /
2026-08-10 01:37:59+03 Imres-MacBook-Air install_monitor[78949]: Temporarily excluding: /Applications, /Library, /System, /bin, /private, /sbin, /usr
2026-08-10 01:37:59+03 Imres-MacBook-Air installd[939]: PackageKit: Writing receipt for com.apple.container-installer to /
2026-08-10 01:37:59+03 Imres-MacBook-Air installd[939]: PackageKit: No Intel binaries to translate.
2026-08-10 01:37:59+03 Imres-MacBook-Air installd[939]: Installed "container-1.2.2-installer-signed" ()
2026-08-10 01:37:59+03 Imres-MacBook-Air installd[939]: Successfully wrote install history to /Library/Receipts/InstallHistory.plist
2026-08-10 01:37:59+03 Imres-MacBook-Air install_monitor[78949]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr
2026-08-10 01:38:00+03 Imres-MacBook-Air installd[939]: PackageKit: releasing backupd
2026-08-10 01:38:00+03 Imres-MacBook-Air installd[939]: PackageKit: allow user idle system sleep
2026-08-10 01:38:00+03 Imres-MacBook-Air installd[939]: PackageKit: ----- End install -----
2026-08-10 01:38:00+03 Imres-MacBook-Air installd[939]: PackageKit: 1.5s elapsed install time
2026-08-10 01:38:00+03 Imres-MacBook-Air installd[939]: PackageKit: Cleared responsibility for install from 78940.
2026-08-10 01:38:00+03 Imres-MacBook-Air installd[939]: PackageKit: Hosted team responsible for install has been cleared.
2026-08-10 01:38:00+03 Imres-MacBook-Air installd[939]: PackageKit: Running idle tasks
2026-08-10 01:38:00+03 Imres-MacBook-Air installd[939]: PackageKit: Removing client PKInstallDaemonClient pid=78940, uid=0 (/usr/sbin/installer)
2026-08-10 01:38:00+03 Imres-MacBook-Air installd[939]: PackageKit: Done with sandbox removals
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]: Removing temporary directory "/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T//Install.78940FDpYBc"
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]: Finalize disk "Macintosh HD"
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]: Notifying system of updated components
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]:
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]: **** Summary Information ****
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]: Operation Elapsed time
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]: -----------------------------
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]: zero 0.00 seconds
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]: disk 0.00 seconds
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]: install 2.22 seconds
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]: -total- 2.22 seconds
2026-08-10 01:38:00+03 Imres-MacBook-Air installer[78940]:
Linux kopeerimine jms
imreoolberg@Imres-MacBook-Air ~ % container system start Launching container-apiserver... Testing access to container-apiserver... Verifying machine API server is running... No default kernel configured. Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.28.0/kata-static-3.28.0-arm64.tar.zst]? [Y/n]: Installing kernel... imreoolberg@Imres-MacBook-Air ~ %
Seadistamine
imreoolberg@Imres-MacBook-Air 20260810 % container system property ls [build] cpus = 2 image = "ghcr.io/apple/container-builder-shim/builder:0.13.1" memory = "2048mb" rosetta = true [container] cpus = 4 memory = "1gb" [dns] [kernel] binaryPath = "opt/kata/share/kata-containers/vmlinux-6.18.15-186" digest = "sha256:f63d54507d1f18635d94475077e4c2330de4d8e05cedf25f7c38f063b0e66a91" url = "https://github.com/kata-containers/kata-containers/releases/download/3.28.0/kata-static-3.28.0-arm64.tar.zst" [machine] cpus = 5 homeMount = "rw" memory = "8gb" virtualization = false [network] [registry] domain = "docker.io" [vminit] image = "ghcr.io/apple/containerization/vminit:0.40.1"
Machine image tekitamine
imreoolberg@Imres-MacBook-Air 20260810 % cat Dockerfile
FROM ubuntu:24.04
ENV container container
RUN apt-get update && \
apt-get install -y \
dbus systemd openssh-server net-tools iproute2 iputils-ping curl wget vim-tiny man sudo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
yes | unminimize
RUN >/etc/machine-id
RUN >/var/lib/dbus/machine-id
RUN systemctl set-default multi-user.target
RUN systemctl mask \
dev-hugepages.mount \
sys-fs-fuse-connections.mount \
systemd-update-utmp.service \
systemd-tmpfiles-setup.service \
console-getty.service
RUN systemctl disable \
networkd-dispatcher.service
RUN sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config
imreoolberg@Imres-MacBook-Air 20260810 % container build -t local/ubuntu-machine:latest .
imreoolberg@Imres-MacBook-Air 20260810 % container machine create local/ubuntu-machine:latest --name dev
Tõmmiste nimekirja esitamine
imreoolberg@Imres-MacBook-Air 20260810 % container image list NAME TAG DIGEST alpine latest 28bd5fe8b56d ubuntu 24.04 561618e2c15b local/ubuntu-machine latest f470db19ef25
Käsundamine
imreoolberg@Imres-MacBook-Air ~ % container ls ID IMAGE OS ARCH STATE IP CPUS MEMORY STARTED dc85cd18-cb6f-4e52-a675-dca8ace06bff docker.io/library/alpine:latest linux arm64 running 192.168.65.6/24 4 1024 MB 2026-08-10T06:14:40Z 5b4feb90-e8dd-4326-b6a8-809f50889b28 docker.io/library/alpine:latest linux arm64 running 192.168.65.3/24 4 1024 MB 2026-08-09T22:44:38Z
ning
imreoolberg@Imres-MacBook-Air ~ % container run -it --name persisttest-5 ubuntu bash
Kasulikud lisamaterjalid
- TODO