Skip to content

Commit 94e06e2

Browse files
authored
Refine user documentation. (#24)
- Extract README sections into BUILDING and CONTRIBUTING documents. This should work better than sections in README as it keeps the README short, and the BUILDING and CONTRIBUTING files will stand out in the file list. - Merged localdev document into BUILDING. - Fixed broken links. - Changed DNS setup so later DNS-dependent steps should work. - Added h1 and link to SECURITY document.
1 parent 007f9a4 commit 94e06e2

File tree

6 files changed

+54
-55
lines changed

6 files changed

+54
-55
lines changed
Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,35 @@
1-
# Develop using a local copy of Containerization
1+
# Building the project
22

3-
This page describes how to build and run container using a local copy of [`Containerization`](https://github.com/apple/containerization).
3+
To build the Containerization package, your system needs either:
44

5-
## Use the local copy of containerization
5+
- macOS 15 or newer and Xcode 17 beta.
6+
- macOS 16 Developer Preview.
7+
8+
## Compile and test
9+
10+
Build `container` and the background services from source, and run basic and integration tests:
11+
12+
```bash
13+
make all test integration
14+
```
15+
16+
Copy the binaries to `/usr/local/bin` and `/usr/local/libexec` (requires entering the an administrator password):
17+
18+
```bash
19+
make install
20+
```
21+
22+
## Compile protobufs
23+
24+
`container` uses gRPC to communicate to the builder virtual machine that creates images from `Dockerfile`s, and depends on specific versions of `grpc-swift` and `swift-protobuf`. If you make changes to the gRPC APIs in the [container-builder-shim](https://github.com/apple/container-builder-shim) project, install the tools and re-generate the gRPC code in this project using:
25+
26+
```bash
27+
make protos
28+
```
29+
30+
## Develop using a local copy of Containerization
31+
32+
To make changes to `container` that require changes to the Containerization project, or vice versa:
633

734
1. Clone the [Containerization](https://github.com/apple/containerization) repository such that it sits next to your clone of the `container` repository.
835

@@ -43,7 +70,7 @@ This page describes how to build and run container using a local copy of [`Conta
4370
bin/container system start
4471
```
4572
46-
## Revert to the versioned Containerization package
73+
To revert to using the Containerization dependency from your `Package.swift`:
4774
4875
1. Unset your `CONTAINERIZATION_PATH` environment variable, and update `Package.resolved`.
4976

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing
2+
3+
Contributions are welcome and encouraged! Read our [main contributing guide](https://github.com/apple/containerization/blob/main/CONTRIBUTING.md) to get started.

README.md

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# `container`
2-
31
![introductory movie showing some basic commands](./docs/assets/landing-movie.gif)
42

3+
# `container`
4+
55
`container` is an application that you can use to create and run Linux containers as lightweight virtual machines on your Mac. It's written in Swift, and optimized for Apple Silicon.
66

77
The application consumes and produces OCI-compliant container images, so you can pull and run images from any standard container registry. You can push images that you build to those registries as well, and run the images in any other OCI-compliant application.
@@ -14,14 +14,9 @@ Install the `container` application on your Mac.
1414

1515
### Requirements
1616

17-
You need an Apple Silicon Mac to build and run `container`.
18-
19-
To build the Containerization package, your system needs either:
20-
21-
- macOS 15 or newer and Xcode 17 beta.
22-
- macOS 16 Developer Preview.
17+
You need an Apple Silicon Mac to run `container`. To build the application, see the [BUILDING](./BUILDING.md) document.
2318

24-
`container` is designed to take advantage of the features of the macOS 16 Developer Preview. You can run the application on macOS Sequoia, but the `container` maintainers typically will not address Sequoia issues that cannot be reproduced on the macOS 16 Developer Beta.
19+
`container` is designed to take advantage of the features of the macOS 16 Developer Preview. You can run the application on macOS Sequoia, but the `container` maintainers typically will not address Sequoia issues that cannot be reproduced on the macOS 16 Developer Preview.
2520

2621
There are [significant networking limitations](https://github.com/apple/container#macos-sequoia-limitations) that impact the usability `container` on macOS Sequoia.
2722

@@ -51,36 +46,9 @@ To retain your user data so that it is available should you reinstall later, run
5146
uninstall-container.sh -k
5247
```
5348

54-
## Build the application from source
55-
56-
Build `container` and the background services from sources and run basic and integration tests:
57-
58-
```bash
59-
make all test integration
60-
```
61-
62-
Copy the binaries to `/usr/local/bin` and `/usr/local/libexec` (requires entering the administrator's password):
63-
64-
```bash
65-
make install
66-
```
67-
68-
### Protobufs
69-
70-
`container` depends on specific versions of `grpc-swift` and `swift-protobuf`. You can install them and re-generate RPC interfaces with:
71-
72-
```bash
73-
make protos
74-
```
75-
76-
## Contributing
77-
78-
Contributions are welcome and encouraged! Read our [main contributing guide](https://github.com/apple/containerization/blob/main/CONTRIBUTING.md) to get started. If you're developing using a local copy of
79-
Containerization read the [docs here](./docs/localSwiftContainerization.md)
80-
81-
## More Info:
49+
## Next steps
8250

8351
- Take [a guided tour of `container`](./docs/tutorial.md) by building, running, and publishing a simple web server image.
84-
- Read through [How to use the features of `container`.](./docs/how-to.md)
85-
- A brief description and [technical overview](./docs/technical-overview.md) of `container`.
52+
- Learn how to [use various `container` features](./docs/how-to.md).
53+
- Read a brief description and [technical overview](./docs/technical-overview.md) of `container`.
8654

SECURITY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
If you believe that you have discovered a security or privacy vulnerability in our open source software, please report it to us using the GitHub private vulnerability feature. Reports should include specific product and software version(s) that you believe are affected; a technical description of the behavior that you observed and the behavior that you expected; the steps required to reproduce the issue; and a proof of concept or exploit.
1+
# Security process
2+
3+
If you believe that you have discovered a security or privacy vulnerability in our open source software, please report it to us using the [GitHub private vulnerability feature](https://github.com/apple/container/security/advisories/new). Reports should include specific product and software version(s) that you believe are affected; a technical description of the behavior that you observed and the behavior that you expected; the steps required to reproduce the issue; and a proof of concept or exploit.
24

35
The project team will do their best to acknowledge receiving all security reports within 7 days of submission. This initial acknowledgment is neither acceptance nor rejection of your report. The project team may come back to you with further questions or invite you to collaborate while working through the details of your report.
46

docs/technical-overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ The process `container-apiserver` is a launch agent that launches when you run t
4040

4141
When `container-apiserver` starts, it launches an XPC helper `container-core-images` that exposes an API for image management and manages the local content store, and another XPC helper `container-network-vmnet` for the virtual network. For each container that you create, `container-apiserver` launches a container runtime helper `container-runtime-linux` that exposes the management API for that specific container.
4242

43-
![diagram showing application functional organization](./docs/assets/functional-model-light.svg)
43+
![diagram showing application functional organization](/docs/assets/functional-model-light.svg)
4444

4545
## What limitations does `container` have today?
4646

47-
With the initial release of `container`, you get basic facilities for building and running containers, but many common containerization features remain to be implemented. Consider [contributing](/community) new features and bug fixes to `container` and the Containerization projects!
47+
With the initial release of `container`, you get basic facilities for building and running containers, but many common containerization features remain to be implemented. Consider [contributing](/CONTRIBUTING.md) new features and bug fixes to `container` and the Containerization projects!
4848

4949
### Container to host networking
5050

docs/tutorial.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@ If you have not installed a Linux kernel yet, the command will prompt you to ins
1919
```shellsession
2020
% container system start
2121
Verifying apiserver is running...
22-
Done
23-
Missing required runtime dependencies:
24-
1. Initial Filesystem
25-
2. Kernel
26-
Would like to install them now? [Y/n]: Y
27-
Installing default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]...
28-
Installing initial filesystem from [ghcr.io/apple/containerization/vminit:0.1.34]...
29-
%
22+
Installing base container filesystem...
23+
No default kernel configured.
24+
Install the recommended default kernel from [https://github.com/kata-containers/kata-containers/releases/download/3.17.0/kata-static-3.17.0-arm64.tar.xz]? [Y/n]: y
25+
Installing kernel...
3026
```
3127

3228
Then, verify that the application is working by running a command to list all containers:
@@ -100,9 +96,12 @@ Use the `--help` flag to see which abbreviations exist.
10096

10197
```bash
10298
sudo container system dns create test
99+
container system dns default set test
103100
```
104101

105-
Enter your administrator password when prompted. The command requires administrator privileges to create a file containing the domain configuration under the `/etc/resolver` directory, and to tell the macOS DNS resolver to reload its configuration files.
102+
Enter your administrator password when prompted. The first command requires administrator privileges to create a file containing the domain configuration under the `/etc/resolver` directory, and to tell the macOS DNS resolver to reload its configuration files.
103+
104+
The second command makes `test` the default domain to use when running a container with an unqualified name. For example, if the default domain is `test` and you use `--name my-web-server` to start a container, queries to `my-web-server.test` will respond with that container's IP address.
106105

107106
## Build an image
108107

0 commit comments

Comments
 (0)