diff --git a/.github/256.png b/.github/256.png index 3f74f9c..df99ac7 100644 Binary files a/.github/256.png and b/.github/256.png differ diff --git a/.github/workflows/containers-release.yml b/.github/workflows/containers-release.yml new file mode 100644 index 0000000..6d7d927 --- /dev/null +++ b/.github/workflows/containers-release.yml @@ -0,0 +1,87 @@ +name: Publish containers release + +permissions: + contents: write + +# App Store Connect can't notify GitHub directly, so this polls the public +# App Store lookup and publishes a release once a version is live. A relay for +# App Store Connect webhooks can send the app-store-release dispatch instead. +on: + schedule: + - cron: '17 */6 * * *' + workflow_dispatch: + repository_dispatch: + types: [app-store-release] + +concurrency: + group: app-store-release + +jobs: + release: + name: Publish release + if: github.repository == 'try-containers/Containers' + runs-on: ubuntu-latest + env: + BUNDLE_ID: app.containers.Containers + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ github.token }} + + steps: + - name: Look up the App Store version + id: store + run: | + LOOKUP_PATH="${RUNNER_TEMP}/lookup.json" + curl --fail --silent --show-error --output "${LOOKUP_PATH}" "https://itunes.apple.com/lookup?bundleId=${BUNDLE_ID}" + + VERSION=$(jq -r '.results[0].version // empty' "${LOOKUP_PATH}") + STORE_URL=$(jq -r '.results[0].trackViewUrl // empty' "${LOOKUP_PATH}" | sed 's/[?].*//') + + if [ -z "${VERSION}" ] || [ -z "${STORE_URL}" ] ; then + echo "::error::The App Store has no app with bundle ID ${BUNDLE_ID}." + false + fi + + echo "Version ${VERSION} is live at ${STORE_URL}" + echo "version=${VERSION}" >> "${GITHUB_OUTPUT}" + echo "url=${STORE_URL}" >> "${GITHUB_OUTPUT}" + + - name: Check for a release + id: check + env: + VERSION: ${{ steps.store.outputs.version }} + run: | + if gh release view "${VERSION}" > /dev/null 2>&1 ; then + echo "Release ${VERSION} already exists." + echo "publish=false" >> "${GITHUB_OUTPUT}" + elif ! gh api "repos/${GH_REPO}/git/ref/tags/${VERSION}" > /dev/null 2>&1 ; then + echo "::warning::Version ${VERSION} is live, but there's no tag ${VERSION} to release." + echo "publish=false" >> "${GITHUB_OUTPUT}" + else + echo "publish=true" >> "${GITHUB_OUTPUT}" + fi + + # The notes are the version's What's New text from App Store Connect. + # A first version can't have any; its release is written by hand. + - name: Publish release + if: steps.check.outputs.publish == 'true' + env: + VERSION: ${{ steps.store.outputs.version }} + STORE_URL: ${{ steps.store.outputs.url }} + run: | + NOTES=$(jq -r '.results[0].releaseNotes // empty' "${RUNNER_TEMP}/lookup.json") + + if [ -z "${NOTES}" ] ; then + echo "::warning::Version ${VERSION} has no What's New text, so its release needs writing by hand." + exit 0 + fi + + { + printf '%s\n\n' "${NOTES}" + echo "[Download Containers ${VERSION} on the Mac App Store](${STORE_URL})" + } > "${RUNNER_TEMP}/notes.md" + + gh release create "${VERSION}" \ + --verify-tag \ + --latest \ + --title "Containers ${VERSION}" \ + --notes-file "${RUNNER_TEMP}/notes.md" diff --git a/.github/workflows/containers-testflight.yml b/.github/workflows/containers-testflight.yml new file mode 100644 index 0000000..96e680c --- /dev/null +++ b/.github/workflows/containers-testflight.yml @@ -0,0 +1,175 @@ +name: Deploy containers to TestFlight + +permissions: + contents: read + +# Version tags, such as 0.2 or 0.2.1. A tag push can't be filtered by branch, +# so the validate job checks that the tag is on main. +on: + push: + tags: + - '[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+' + +concurrency: + group: testflight + +jobs: + validate: + name: Validate tag + if: github.repository == 'try-containers/Containers' + runs-on: ubuntu-latest + env: + VERSION: ${{ github.ref_name }} + + steps: + - name: Checkout repository + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + with: + fetch-depth: 0 + + - name: Check that the tag is on main + run: | + if ! git merge-base --is-ancestor "${GITHUB_SHA}" origin/main ; then + echo "::error::Tag ${VERSION} points to a commit that isn't on main." + false + fi + + containers: + needs: validate + uses: ./.github/workflows/containers-build-template.yml + secrets: inherit + with: + release: true + + deploy: + name: Upload to TestFlight + needs: containers + timeout-minutes: 60 + runs-on: macos-26 + env: + DEVELOPER_DIR: "/Applications/Xcode_26.6.app/Contents/Developer" + VERSION: ${{ github.ref_name }} + DEVELOPMENT_TEAM: ${{ vars.DEVELOPMENT_TEAM }} + + steps: + - name: Checkout repository + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + + # The runner context isn't available to job-level env, so the paths + # under the runner's temporary directory are set here. + - name: Set paths + run: | + echo "KEYCHAIN_PATH=${RUNNER_TEMP}/signing.keychain-db" >> "${GITHUB_ENV}" + echo "API_KEY_PATH=${RUNNER_TEMP}/AuthKey.p8" >> "${GITHUB_ENV}" + echo "ARCHIVE_PATH=${RUNNER_TEMP}/Containers.xcarchive" >> "${GITHUB_ENV}" + + - name: Show Xcode version + run: xcodebuild -version + + - name: Install signing certificates + env: + SIGNING_CERTIFICATES_P12: ${{ secrets.SIGNING_CERTIFICATES_P12 }} + SIGNING_CERTIFICATES_PASSWORD: ${{ secrets.SIGNING_CERTIFICATES_PASSWORD }} + run: | + CERTIFICATES_PATH="${RUNNER_TEMP}/certificates.p12" + KEYCHAIN_PASSWORD="$(uuidgen)" + echo -n "${SIGNING_CERTIFICATES_P12}" | base64 --decode > "${CERTIFICATES_PATH}" + + security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN_PATH}" + security set-keychain-settings -lut 21600 "${KEYCHAIN_PATH}" + security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN_PATH}" + security import "${CERTIFICATES_PATH}" -P "${SIGNING_CERTIFICATES_PASSWORD}" -A -t cert -f pkcs12 -k "${KEYCHAIN_PATH}" + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN_PATH}" + security list-keychains -d user -s "${KEYCHAIN_PATH}" $(security list-keychains -d user | tr -d '"') + rm "${CERTIFICATES_PATH}" + + - name: Install App Store Connect API key + env: + APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }} + run: printf '%s\n' "${APP_STORE_CONNECT_PRIVATE_KEY}" > "${API_KEY_PATH}" + + - name: Resolve packages + run: | + xcodebuild -resolvePackageDependencies \ + -project Containers.xcodeproj \ + -scheme "Containers (macOS)" + + - name: Check the version + run: | + PROJECT_VERSION=$( + xcodebuild -showBuildSettings -json \ + -project Containers.xcodeproj \ + -scheme "Containers (macOS)" \ + -configuration Release \ + | jq -r '.[] | select(.target == "Containers") | .buildSettings.MARKETING_VERSION' + ) + + if [ "${PROJECT_VERSION}" != "${VERSION}" ] ; then + echo "::error::Tag ${VERSION} doesn't match MARKETING_VERSION ${PROJECT_VERSION}." + false + fi + + # macOS requires every upload's build number to be higher than the last, + # across versions; a UTC timestamp always is, even when a run is retried. + - name: Archive + env: + APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} + APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} + run: | + set -o pipefail + xcodebuild archive \ + -project Containers.xcodeproj \ + -scheme "Containers (macOS)" \ + -configuration Release \ + -destination 'generic/platform=macOS' \ + -archivePath "${ARCHIVE_PATH}" \ + -allowProvisioningUpdates \ + -authenticationKeyPath "${API_KEY_PATH}" \ + -authenticationKeyID "${APP_STORE_CONNECT_KEY_ID}" \ + -authenticationKeyIssuerID "${APP_STORE_CONNECT_ISSUER_ID}" \ + DEVELOPMENT_TEAM="${DEVELOPMENT_TEAM}" \ + CURRENT_PROJECT_VERSION="$(date -u +%Y%m%d%H%M)" + + - name: Upload + env: + APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} + APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} + run: | + EXPORT_OPTIONS_PATH="${RUNNER_TEMP}/ExportOptions.plist" + cat > "${EXPORT_OPTIONS_PATH}" < + + + + method + app-store-connect + destination + upload + teamID + ${DEVELOPMENT_TEAM} + signingStyle + automatic + manageAppVersionAndBuildNumber + + uploadSymbols + + + + EOF + + set -o pipefail + xcodebuild -exportArchive \ + -archivePath "${ARCHIVE_PATH}" \ + -exportOptionsPlist "${EXPORT_OPTIONS_PATH}" \ + -exportPath "${RUNNER_TEMP}/Export" \ + -allowProvisioningUpdates \ + -authenticationKeyPath "${API_KEY_PATH}" \ + -authenticationKeyID "${APP_STORE_CONNECT_KEY_ID}" \ + -authenticationKeyIssuerID "${APP_STORE_CONNECT_ISSUER_ID}" + + - name: Remove signing credentials + if: always() + run: | + security delete-keychain "${KEYCHAIN_PATH}" || true + rm -f "${API_KEY_PATH}" diff --git a/AGENTS.md b/AGENTS.md index 6130c16..8b689db 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -107,6 +107,11 @@ Rules for where logic goes: - Tests read `@Test("Short sentence-case phrase") func camelCaseName()`, with no `test` prefix. - Each test works in its own `TemporaryDirectory` (`ContainerSystemTests/Support`) and removes it with `defer`. Tests that need managers use `MockContainerRuntime` (`ContainerSystemTests/Mocks`); service tests build the service directly over a temporary folder. +## Releases + +- To release, set `MARKETING_VERSION` (such as `0.2`), then push a tag with that number on `main`. `containers-testflight.yml` checks that the tag is on `main` and matches the version, then uploads the build to TestFlight. +- Release notes are the What's New text in App Store Connect; the repository keeps no changelog. `containers-release.yml` polls the App Store and, once a version is live, publishes a GitHub release for its tag with those notes and a Mac App Store link. + ## Requirements - macOS 26 or later on Apple silicon. diff --git a/Containers/Supporting Files/Assets.xcassets/container.stack.symbolset/container.stack.svg b/Containers/Supporting Files/Assets.xcassets/container.stack.symbolset/container.stack.svg index 9f19759..df7796d 100644 --- a/Containers/Supporting Files/Assets.xcassets/container.stack.symbolset/container.stack.svg +++ b/Containers/Supporting Files/Assets.xcassets/container.stack.symbolset/container.stack.svg @@ -91,13 +91,13 @@ PUBLIC "-//W3C//DTD SVG 1.1//EN" - + - + - + diff --git a/Containers/Supporting Files/Containers.icon/Assets/server-stack.svg b/Containers/Supporting Files/Containers.icon/Assets/server-stack.svg new file mode 100644 index 0000000..5e849ea --- /dev/null +++ b/Containers/Supporting Files/Containers.icon/Assets/server-stack.svg @@ -0,0 +1,9 @@ + + + + diff --git a/Containers/Supporting Files/Containers.icon/icon.json b/Containers/Supporting Files/Containers.icon/icon.json index 3ec53c5..d8946b8 100644 --- a/Containers/Supporting Files/Containers.icon/icon.json +++ b/Containers/Supporting Files/Containers.icon/icon.json @@ -21,15 +21,14 @@ "hidden" : false, "layers" : [ { - "glass" : true, "hidden" : false, - "image-name" : "server-stack-new.png", - "name" : "server-stack-new", + "image-name" : "server-stack.svg", + "name" : "server-stack", "position" : { "scale" : 1, "translation-in-points" : [ - -13, - -16.5 + -9.5, + 0.5 ] } } @@ -47,6 +46,19 @@ { "hidden" : true, "layers" : [ + { + "glass" : true, + "hidden" : false, + "image-name" : "server-stack-new.png", + "name" : "server-stack-old", + "position" : { + "scale" : 1, + "translation-in-points" : [ + -13, + -16.5 + ] + } + }, { "glass" : true, "image-name" : "Layer 2.png", diff --git a/Containers/Views/Containers/CreateContainerView.swift b/Containers/Views/Containers/CreateContainerView.swift index 8c515f1..f969c54 100644 --- a/Containers/Views/Containers/CreateContainerView.swift +++ b/Containers/Views/Containers/CreateContainerView.swift @@ -47,9 +47,9 @@ struct CreateContainerView: View { } enum Tab: String, CaseIterable, Identifiable { - case info = "Info" + case general = "General" case process = "Process" - case options = "Options" + case management = "Management" var id: String { rawValue } } @@ -86,7 +86,7 @@ struct CreateContainerView: View { @SwiftUI.State private var showPickLocalImage: Bool = false // Tabs - @SwiftUI.State private var selectedTab: Tab = .info + @SwiftUI.State private var selectedTab: Tab = .general @SwiftUI.State private var isVolumesExpanded = false @SwiftUI.State private var isMountsExpanded = false @SwiftUI.State private var isPortsExpanded = false @@ -105,8 +105,8 @@ struct CreateContainerView: View { progressTitle: mode.progressTitle, width: Self.sheetWidth, height: 460, - scrollsContent: selectedTab == .options, - contentPadding: selectedTab == .info ? 20 : 0, + scrollsContent: selectedTab == .management, + contentPadding: selectedTab == .general ? 20 : 0, contentID: showProgressView ? AnyHashable("progress") : AnyHashable(selectedTab), contentTransition: stepTransition, @@ -262,16 +262,16 @@ struct CreateContainerView: View { @ViewBuilder private var tabContent: some View { switch selectedTab { - case .info: - infoTab + case .general: + generalTab case .process: processTab - case .options: - optionsTab + case .management: + managementTab } } - private var infoTab: some View { + private var generalTab: some View { FormStack { imageSelectionField @@ -355,7 +355,7 @@ struct CreateContainerView: View { ) } - private var optionsTab: some View { + private var managementTab: some View { VStack(alignment: .leading, spacing: 0) { FormStack { FormRow( @@ -380,7 +380,7 @@ struct CreateContainerView: View { ) } - FormRow(title: "Management") { + FormRow(title: "Options") { VStack(alignment: .leading) { Toggle( "Remove the container after it stops", diff --git a/Containers/Views/Images/Create/CreateImageView.swift b/Containers/Views/Images/Create/CreateImageView.swift index 34c5edf..a8d7f35 100644 --- a/Containers/Views/Images/Create/CreateImageView.swift +++ b/Containers/Views/Images/Create/CreateImageView.swift @@ -139,13 +139,18 @@ struct CreateImageView: View { } private func paneTitle(for step: Step) -> String? { - guard step == .configuration, - selectedMethod == .build || selectedMethod == .pull - else { + guard step == .configuration else { return nil } - return "Choose options for your new image" + switch selectedMethod { + case .build: + return "Choose options for your new image" + case .pull: + return "Choose an image from a registry" + case .load, .none: + return nil + } } @ViewBuilder diff --git a/Containers/Views/System/WhatsNewView.swift b/Containers/Views/System/WhatsNewView.swift index 7190287..1c6f222 100644 --- a/Containers/Views/System/WhatsNewView.swift +++ b/Containers/Views/System/WhatsNewView.swift @@ -43,10 +43,10 @@ struct WhatsNewView: View { onContinue() } label: { Text("Continue") - .foregroundStyle(.white) + .foregroundStyle(Color(nsColor: .windowBackgroundColor)) } .buttonStyle(.borderedProminent) - .tint(foregroundColor) + .tint(.primary) .controlSize(.large) .keyboardShortcut(.defaultAction) .frame(maxWidth: .infinity) diff --git a/Containers/Views/Volumes/CreateVolumeView.swift b/Containers/Views/Volumes/CreateVolumeView.swift index d176f9e..d8e1203 100644 --- a/Containers/Views/Volumes/CreateVolumeView.swift +++ b/Containers/Views/Volumes/CreateVolumeView.swift @@ -11,7 +11,7 @@ import SwiftUI struct CreateVolumeView: View { enum Tab: String, CaseIterable, Identifiable { - case info = "Info" + case general = "General" case options = "Options" var id: String { rawValue } @@ -29,7 +29,7 @@ struct CreateVolumeView: View { @SwiftUI.State private var showProgressView: Bool = false // : Tabs - @SwiftUI.State private var selectedTab: Tab = .info + @SwiftUI.State private var selectedTab: Tab = .general @SwiftUI.State private var isLabelsExpanded = true @SwiftUI.State private var isOptionsExpanded = true @@ -42,7 +42,7 @@ struct CreateVolumeView: View { width: 550, height: 450, scrollsContent: true, - contentPadding: selectedTab == .info ? 20 : 0, + contentPadding: selectedTab == .general ? 20 : 0, tabBar: { CreateViewTabBar(selection: $selectedTab) }, @@ -81,14 +81,14 @@ struct CreateVolumeView: View { @ViewBuilder private var tabContent: some View { switch selectedTab { - case .info: - infoTab + case .general: + generalTab case .options: optionsTab } } - private var infoTab: some View { + private var generalTab: some View { FormStack { FormRow( title: "Name", @@ -159,7 +159,7 @@ struct CreateVolumeView: View { FormList( items: $options, - title: "Driver Specific Options", + title: "Driver Options", isExpanded: $isOptionsExpanded, columnTitles: ["Key", "Value"], addLabel: "Add Option", diff --git a/README.md b/README.md index becaf26..b7a4079 100644 --- a/README.md +++ b/README.md @@ -21,15 +21,13 @@ Containers pulls, builds and runs OCI images, and manages the containers and vol Download Containers from the [Mac App Store](). On first launch it sets up the container system, downloading the Linux kernel and init image it needs, and then opens the dashboard. -## Documentation +## Next steps -Guides and reference live in the [Containers wiki](https://github.com/try-containers/Containers/wiki): - -- Getting started with images, containers and volumes -- Building images from a Dockerfile -- Reports, logs and troubleshooting -- Settings and storage -- Building the app from source +- Do the [initial setup](https://try-containers.github.io/documentation/containers/gettingstarted) of Containers. +- [Pull](https://try-containers.github.io/documentation/containers/pullinganimage) your first image and [run](https://try-containers.github.io/documentation/containers/runningacontainer) your first container. +- Read the [technical overview](https://try-containers.github.io/documentation/containers/understandinghowcontainersworks) of Containers. +- Find out how to run Containers along Apple's [container](https://github.com/apple/container) CLI. +- Browse the complete [documentation](https://try-containers.github.io/documentation/). ## Community @@ -44,8 +42,7 @@ This is a community-led effort, so we welcome as many contributors who can help. [![Build](https://github.com/try-containers/Containers/actions/workflows/containers-build.yml/badge.svg)](https://github.com/try-containers/Containers/actions/workflows/containers-build.yml) -- Open `Containers.xcodeproj` in Xcode 26 or later. Copy `Configuration/Local.xcconfig.example` to `Configuration/Local.xcconfig` and set your team ID to sign the app. -- [AGENTS.md](AGENTS.md) describes the architecture, conventions and commands, for contributors and coding agents alike. +Open `Containers.xcodeproj` in Xcode 26 or later. To sign the app, copy `Configuration/Local.xcconfig.example` to `Configuration/Local.xcconfig` and set your team ID. ## License @@ -83,4 +80,4 @@ license, open an issue. Containers is an independent project and is not affiliated with, endorsed by or sponsored by Apple Inc. Apple, Mac, macOS and Mac App Store are trademarks of Apple Inc., registered in the U.S. and other countries. -Copyright © 2026 Axel Martinez. +Copyright © 2026 Containers.