Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
d63adef
Create README.md
Mcrich23 Jun 19, 2025
f24d3a8
Merge branch 'main' of https://github.com/Mcrich23/Container-Compose
Mcrich23 Jun 19, 2025
1ce806d
compartmentalized actions into subcommands
Mcrich23 Jun 19, 2025
7f11e0c
build optimization fix
Mcrich23 Jun 19, 2025
35271cc
added color to container and build outputs and fix pulling images
Mcrich23 Jun 19, 2025
95e84ff
image pulling optimization fixes
Mcrich23 Jun 19, 2025
95b6664
Update ComposeUp.swift
Mcrich23 Jun 19, 2025
92a67fe
Update ComposeDown.swift
Mcrich23 Jun 19, 2025
f79597e
Create Makefile
Mcrich23 Jun 19, 2025
510c673
Create formulae
Mcrich23 Jun 19, 2025
35ecb17
Update README.md
Mcrich23 Jun 19, 2025
28e3eef
Update README.md
Mcrich23 Jun 19, 2025
b2ba13d
Update README.md
Mcrich23 Jun 20, 2025
b194532
Update README.md
Mcrich23 Jun 20, 2025
8876f1e
add container specification for compose up
Mcrich23 Jun 20, 2025
2e1d7e6
Merge branch 'main' of https://github.com/Mcrich23/Container-Compose
Mcrich23 Jun 20, 2025
af9acc7
Added service specification to down as well
Mcrich23 Jun 20, 2025
4f51f5d
update codable structs documentation to be docc
Mcrich23 Jun 20, 2025
1de2267
Delete Codable Structs.zip
Mcrich23 Jun 20, 2025
4c32ed6
Update ComposeDown.swift
Mcrich23 Jun 20, 2025
a680bc7
update stopOldStuff
Mcrich23 Jun 20, 2025
f18bc53
Updated to pull in compose logic from container pull request branch
Mcrich23 Jul 9, 2025
93ab7b3
Update Package.resolved
Mcrich23 Aug 21, 2025
8701c8e
Update dependencies
Mcrich23 Aug 21, 2025
7bbdafe
Add GitHub Sponsors username
Mcrich23 Sep 8, 2025
312e54e
Update compose
Mcrich23 Sep 14, 2025
f377405
Update Package.resolved
Mcrich23 Oct 4, 2025
229ac89
moved compose source to this repository
Mcrich23 Oct 4, 2025
7a7a1e2
compose file detection fix
Mcrich23 Oct 4, 2025
ea2402d
Add package outline
Mcrich23 Oct 4, 2025
6976c16
Revise installation steps in README.md to reflect addition to homebre…
Mcrich23 Oct 4, 2025
3ce8a5d
Revert "Add package outline"
Mcrich23 Oct 6, 2025
49ed6b6
fix: add version command and arg (#9)
bassco Oct 8, 2025
b18bfd5
Revise supported versions and vulnerability reporting
Mcrich23 Oct 12, 2025
ce0e136
Change pullImage call to include the proper platform string (#13)
Mcrich23 Oct 14, 2025
28a3fed
Adjust File Headers to Use Proper Container-Compose License (#17)
Copilot Oct 14, 2025
c1c6a93
Add comprehensive Swift Testing suite for Container-Compose (#15)
Copilot Oct 14, 2025
1d6ef82
Update tests.yml
Mcrich23 Oct 14, 2025
11c43c6
Update .gitignore
Mcrich23 Oct 14, 2025
1d0c7a4
Debug fixes (#19)
Mcrich23 Oct 22, 2025
c6d661e
Enable Port Binding/Mapping #20
Mcrich23 Oct 22, 2025
81b89f7
Cleanup tests (#23)
Mcrich23 Oct 25, 2025
9a50792
Update Package.resolved
Mcrich23 Nov 5, 2025
1dca026
version string fix
Mcrich23 Nov 18, 2025
f6dea7a
add platform to runCommandArgs so container executes as the correct p…
Mcrich23 Nov 18, 2025
e180ca2
update version to v0.6.1
Mcrich23 Nov 20, 2025
2c24fef
Update README.md
Mcrich23 Nov 24, 2025
b907436
Upgrade to container 0.7 (#41)
Mcrich23 Dec 4, 2025
630b5f7
Update to container 0.8 (#46)
Mcrich23 Jan 29, 2026
f7e9af1
Revise contribution steps in README
Mcrich23 Jan 31, 2026
304203c
Create CONTRIBUTING.md with contribution guidelines
Mcrich23 Jan 31, 2026
e453d8b
Sanitize project name when using directory name (#47)
oxisto Feb 4, 2026
a4d6be7
update to container v0.9
Mcrich23 Feb 4, 2026
5d78e69
fix version
Mcrich23 Feb 4, 2026
dd0b9a1
feat: Providing tests for `ComposeDown` (#50)
oxisto Feb 4, 2026
04fd69c
chore: fix typo in detach flag name and help text (#53)
pstoeckle Feb 4, 2026
dabb2d4
feat: Support for --cpus and --memory resource options (#56)
cstea Feb 20, 2026
b1badf8
fix: use full destination path for named volumes
amazon1148 Feb 20, 2026
8edb8a9
test: add named volume full path preservation test
amazon1148 Feb 20, 2026
1d284fb
ci: add release build step
amazon1148 Feb 20, 2026
84201f9
fix: place --entrypoint flag before image name in container run
amazon1148 Feb 21, 2026
98b7fc4
Add automated release workflow
explicitcontextualunderstanding Feb 21, 2026
3f20dbf
Add automated release workflow
explicitcontextualunderstanding Feb 21, 2026
4968a86
added information about what command is being run for easier debugging
TomasLudvik Nov 25, 2025
02ca646
added support for multi stage build target
TomasLudvik Nov 25, 2025
d509f8a
added support for dnsSearch to enable communication between container…
TomasLudvik Nov 25, 2025
eeddb26
there is no longer 30 second timeout when container is already started
TomasLudvik Nov 25, 2025
8a4e5bb
fixed incorrect waiting for running container
TomasLudvik Nov 25, 2025
c509a2f
fix: remove RuntimeStatus type that doesn't exist
Feb 23, 2026
ad0a2db
chore: bump version to 0.9.1 and add FORK_CHANGES.md
amazon1148 Feb 25, 2026
1f67b56
docs: expand FORK_CHANGES with upstream PR/commit links
amazon1148 Feb 25, 2026
db5b5f7
docs: add CHANGELOG v0.9.1 and improve CLI help text
amazon1148 Feb 25, 2026
8b1a7ad
TDD: add ComposeUp makeRunArgs helper and tests\n\nAdd public helper …
amazon1148 Feb 27, 2026
714ae98
feat: add runtime and init_image mapping to ComposeUp (TDD)\n\nAdds r…
amazon1148 Feb 27, 2026
db68bfd
fix: initialize runtime/init/init_image and dependedBy in Service ini…
amazon1148 Feb 27, 2026
d7496e3
fix: correct extension placement in ComposeUp to make makeRunArgs and…
amazon1148 Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: mcrich23 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
36 changes: 36 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# GitHub Actions Workflows

This directory contains GitHub Actions workflows for Container-Compose.

## Available Workflows

### Tests (`tests.yml`)

A required status check for pull requests that must be run manually before merging.

**How to run:**
1. Go to the "Actions" tab in the GitHub repository
2. Select "Tests" workflow from the left sidebar
3. Click "Run workflow" button
4. Select the branch (e.g., your PR branch)
5. Click "Run workflow" to start the tests

**Requirements:** macOS 15 runner (tests require macOS environment)

**Note:** Tests are configured as a required check but do NOT run automatically on each commit. This allows you to control when tests run (e.g., after you're done with a series of commits) while still enforcing that tests must pass before merging.

## Test Environment

All tests run on macOS 15 with Swift 6.0+ because:
- Container-Compose depends on `apple/container` package
- The upstream dependency requires macOS-specific `os` module
- Swift Package Manager dependencies are cached for faster builds

## Troubleshooting

If tests fail to run:
1. Check that the workflow was triggered on the correct branch
2. Verify Package.swift is valid
3. Check the Actions tab for detailed logs
4. Ensure macOS 15 runners are available
5. If the workflow doesn't appear as a status check, you may need to run it once first
65 changes: 65 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release

on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g., v1.0.0)'
required: false
type: string

jobs:
build-release:
runs-on: macos-26

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Swift
uses: maartene/setup-swift@main
with:
swift-version: '6.2'

- name: Build Release
run: swift build -c release

- name: Create Release
if: github.event_name == 'push'
uses: softprops/action-gh-release@v1
with:
name: ${{ github.ref_name }}
draft: false
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') }}
files: |
.build/release/container-compose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload to Release
if: github.event_name == 'workflow_dispatch'
run: |
# Create release if it doesn't exist
VERSION="${{ github.inputs.version || 'latest' }}"
TAG="v${VERSION#v}"

# Create or get release ID
RELEASE_ID=$(gh api repos/${{ github.repository }}/releases/tags/$TAG --jq '.id' 2>/dev/null || echo "")

if [ -z "$RELEASE_ID" ]; then
RELEASE_ID=$(gh api repos/${{ github.repository }}/releases -X POST \
--field tag_name="$TAG" \
--field name="$TAG" \
--field draft=false \
--jq '.id')
fi

# Upload asset
gh api repos/${{ github.repository }}/releases/$RELEASE_ID/assets \
-F "file=@.build/release/container-compose" \
-F "name=container-compose"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88 changes: 88 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Tests and Release

on:
# Manual trigger only - run via workflow_dispatch
workflow_dispatch:
# Required status check for PRs (but doesn't auto-run on commits)
push:
branches: [main]
paths:
- "Sources/**"
- "Tests/**"
- "Package.swift"
- ".github/workflows/tests.yml"
pull_request:
branches: [main]
paths:
- "Sources/**"
- "Tests/**"
- "Package.swift"
- ".github/workflows/tests.yml"

jobs:
test:
name: Run Swift Static Tests
runs-on: macos-26

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Swift
uses: maartene/setup-swift@main
with:
swift-version: "6.2"

- name: Cache Swift dependencies
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: Build
run: swift build --build-tests

- name: Run static tests
run: swift test --filter Container-Compose-StaticTests.

- name: Upload static test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: .build/debug/*.xctest
if-no-files-found: ignore

build-release:
name: Build Release Binary
runs-on: macos-26
needs: test

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Swift
uses: maartene/setup-swift@main
with:
swift-version: "6.2"

- name: Cache Swift dependencies
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-release-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-release-

- name: Build Release
run: swift build -c release

- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: container-compose-release
path: .build/release/container-compose
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
.vscode/launch.json
48 changes: 45 additions & 3 deletions .swiftpm/xcode/xcshareddata/xcschemes/Container-Compose.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,38 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Container-ComposeTests"
BuildableName = "Container-ComposeTests"
BlueprintName = "Container-ComposeTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Container-Compose-StaticTests"
BuildableName = "Container-Compose-StaticTests"
BlueprintName = "Container-Compose-StaticTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Container-Compose-DynamicTests"
BuildableName = "Container-Compose-DynamicTests"
BlueprintName = "Container-Compose-DynamicTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -39,7 +71,9 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
allowLocationSimulation = "YES"
consoleMode = "0"
structuredConsoleMode = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
Expand All @@ -52,17 +86,25 @@
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "down"
argument = "up"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "down"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-d"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--build"
argument = "db"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--build"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--cwd=/Users/mcrich/Xcode/Assignment-Manager-API"
isEnabled = "YES">
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# CHANGELOG

## v0.9.1 - Fork release (explicitcontextualunderstanding)

This release bundles several upstream fixes and improvements merged into this fork. Highlights and user-facing notes:

- dnsSearch support
- Commit: https://github.com/Mcrich23/Container-Compose/commit/d509f8af30f9d2382c1804f575ea0f22eb4e5734
- User note: Services can now specify dns_search/dnsSearch entries so containers can resolve each other by name using custom DNS search domains. Configure in your service's networks or service definition.

- Multi-stage Docker build target support
- Commit: https://github.com/Mcrich23/Container-Compose/commit/02ca6462b84121c1553bd7adb862ee22aabc4997
- User note: When using build: with Dockerfiles that include multiple stages, the `target` field is respected so you can build a specific stage (e.g., `build: { context: ".", target: "release" }`).

- Improved volume handling and named-volume destination preservation
- Commits/PRs: https://github.com/Mcrich23/Container-Compose/commit/b1badf86a4faf5c6ed512643e255760073d38988, https://github.com/Mcrich23/Container-Compose/pull/32, https://github.com/Mcrich23/Container-Compose/pull/42
- User note: Named volumes now preserve full destination paths (e.g., `- elasticsearch-data:/usr/share/elasticsearch/data`), and relative host paths are normalized to absolute paths for bind mounts.

- Correct --entrypoint placement
- Commit: https://github.com/Mcrich23/Container-Compose/commit/84201f9416f4a5f1bd383763679f8e2fd7579e94
- User note: Entrypoint overrides in compose files are now passed to the container run command properly (as `--entrypoint <cmd>` before the image), preventing unexpected immediate container exit.

- Startup/wait fixes and improved command debugging
- Commits: https://github.com/Mcrich23/Container-Compose/commit/8a4e5bb0e634155d122ac5d93905a75dcbf5b3da, https://github.com/Mcrich23/Container-Compose/commit/eeddb266a45686c99f53f300c2c5d049b1f3b157, https://github.com/Mcrich23/Container-Compose/commit/4968a8669babe7822ada82cc90328f102edfd02e
- User note: Waiting logic no longer times out incorrectly when a container is already running; the tool prints the exact container run command being executed to aid debugging.

- CI and release automation (fork-specific)
- Origin commits: https://github.com/explicitcontextualunderstanding/Container-Compose/commit/3f20dbf6a6268a93fa196632caa2c178214892f7 and https://github.com/explicitcontextualunderstanding/Container-Compose/commit/98b7fc4a50467067158d15eb47d9acca78121719
- User note: This fork adds GitHub Actions for release automation used by the maintainers of this fork.


For full details and links to the source commits/PRs, see FORK_CHANGES.md.
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Contributing to Container-Compose

Contributions are welcome! Please open issues or submit pull requests to help improve this project.

1. Fork the repository.
2. Create your feature branch (`git checkout -b feat/YourFeature`).
3. Commit your changes (`git commit -am 'Add new feature'`).
4. Add tests to you changes.
5. Push to the branch (`git push origin feature/YourFeature`).
6. Open a pull request.
Loading