Skip to content

Commit f8aac22

Browse files
authored
docs: reduce duplication between readme and copilot-instructions
1 parent 174e19c commit f8aac22

File tree

2 files changed

+41
-67
lines changed

2 files changed

+41
-67
lines changed

.github/copilot-instructions.md

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,26 @@
11
# Project Overview
22

3-
This repository contains devcontainers tailored towards modern software development. The containers try to be as "batteries included" as possible without being overly opinionated, and are usable for both local development and continuous integration. All containers are multi-platform and can be used on x64 (x86-64) and arm64 hardware on an operating system that supports an [OCI](https://opencontainers.org/) compatible container engine. This includes Windows, Linux, and macOS on both Intel and Apple silicon.
3+
This repository contains devcontainers tailored towards modern software development.
4+
The containers try to be as "batteries included" as possible without being overly opinionated, and are usable for both local development and continuous integration.
5+
All containers are multi-platform and can be used on x64 (x86-64) and arm64 hardware on an operating system that supports an [OCI](https://opencontainers.org/) compatible container engine.
6+
This includes Windows, Linux, and macOS on both Intel and Apple silicon.
47

5-
The devcontainers include modern, up-to-date, tooling for C++ and Rust development, and are fully compatible with GitHub Codespaces and Visual Studio Code. The containers are versioned using [Semantic Versioning](https://semver.org/) and are designed with supply-chain security in mind. They can be used with [Dependabot](https://dependabot.com/) to keep dependencies up to date.
8+
The devcontainers include modern, up-to-date, tooling for C++ and Rust development, and are fully compatible with GitHub Codespaces and Visual Studio Code.
9+
The containers are versioned using [Semantic Versioning](https://semver.org/) and are designed with supply-chain security in mind.
10+
They can be used with [Dependabot](https://dependabot.com/) to keep dependencies up to date.
611

712
The container images should provide a secure foundation for regulated software development in e.g. the medical, automotive, aviation, and railroad domains.
813

914
## Key Features
1015

11-
- **Batteries Included** 🔋: Pre-configured tools for local development and continuous integration.
12-
- **Multi-platform Support** ⚙️: Compatible with x64 and arm64 hardware on Windows, Linux, and macOS.
13-
- **Image Flavors** 🍨: Dedicated containers for C++ and Rust development.
14-
- **IDE Integration** 💻: Fully compatible with GitHub Codespaces and VS Code.
15-
- **Semantic Versioning** 🔢: Clear versioning strategy for container images.
16-
- **Secure** 🔒: Emphasis on supply-chain security and compatible with Dependabot.
17-
- **Tested** ✅: Includes verification tests.
16+
The key features of this project are described in the top-level README.md, read them from there to prevent duplication and mismatches.
1817

1918
## Folder Structure
2019

20+
The folder structure of amp-devcontainer is described below, adhere to the existing folder structure.
21+
2122
- `/.devcontainer`: Contains the source code for the container flavors with a top-level devcontainer.json file to enable `clone in container volume` of this repository.
2223
- `/.devcontainer/[flavor]`: Contains the Dockerfile and configuration for each container flavor (e.g., `cpp`, `rust`).
2324
- `/.devcontainer/[flavor]-test`: Contains a devcontainer.json file for testing the container flavor.
2425
- `/.github`: Contains the GitHub workflows for CI/CD, linter configuration, issue templates and re-usable actions.
2526
- `/test/[flavor]`: Contains [Bats](https://bats-core.readthedocs.io/en/stable/) integration- and Playwright verification tests for the containers.
26-
27-
## Libraries and Frameworks
28-
29-
- Dockerfiles for building the container images.
30-
- Python and pip to install and manage dependencies.
31-
- GitHub Actions for CI/CD workflows.
32-
- CMake, Conan, CPM, Mull, and other tools for C++ development.
33-
- Rust, Cargo, Clippy, cargo-binstall for Rust development.
34-
- Visual Studio Code for development environment.
35-
- MegaLinter for code linting.
36-
- Google's release-please for automated releases.
37-
38-
## Values
39-
40-
- **Security First**: Prioritizing supply-chain security and best practices.
41-
- **Developer Experience**: Focusing on ease of use and seamless integration with popular IDEs.
42-
- **Open Source**: Committed to transparency and community collaboration.
43-
- **Quality Assurance**: Emphasizing consistency, testing and reliability.
44-
- **Continuous Improvement**: Regular updates and enhancements based on user feedback.

README.md

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ This repository contains [devcontainers](https://docs.github.com/en/codespaces/s
2929
### Key Features
3030

3131
- **Batteries Included** 🔋: Pre-configured tools for local development and continuous integration.
32+
- **Developer Experience** 👩‍💻: Minimal set-up time and shift-left where possible.
3233
- **Multi-platform Support** ⚙️: Compatible with x64 and arm64 hardware on Windows, Linux, and macOS.
3334
- **Image Flavors** 🍨: Dedicated containers for C++ and Rust development.
3435
- **IDE Integration** 💻: Fully compatible with GitHub Codespaces and VS Code.
@@ -38,7 +39,8 @@ This repository contains [devcontainers](https://docs.github.com/en/codespaces/s
3839

3940
The containers try to be as "batteries included" as possible without being overly opinionated, and are usable for both local development and continuous integration.
4041

41-
All containers are multi-platform and can be used on x64 (x86-64) and arm64 hardware on an operating system that supports an [OCI](https://opencontainers.org/) compatible container engine. This includes Windows, Linux, and macOS on both Intel and Apple silicon.
42+
All containers are multi-platform and can be used on x64 (x86-64) and arm64 hardware on an operating system that supports an [OCI](https://opencontainers.org/) compatible container engine.
43+
This includes Windows, Linux, and macOS on both Intel and Apple silicon.
4244

4345
## State
4446

@@ -55,7 +57,8 @@ The following devcontainers are published towards the [GitHub Container Registry
5557

5658
Both containers include a full [Visual Studio Code](https://code.visualstudio.com/) configuration that is compatible with [GitHub Codespaces](https://github.com/features/codespaces).
5759

58-
A summary of the included tools can be found below. For the full list of all included tools and tool versions see the [Dependency Graph](https://github.com/philips-software/amp-devcontainer/network/dependencies), the SBOM published with a [release](https://github.com/philips-software/amp-devcontainer/releases), or the SBOM attached to the image.
60+
A summary of the included tools can be found below.
61+
For the full list of all included tools and tool versions see the [Dependency Graph](https://github.com/philips-software/amp-devcontainer/network/dependencies), the SBOM published with a [release](https://github.com/philips-software/amp-devcontainer/releases), or the SBOM attached to the image.
5962

6063
#### amp-devcontainer-cpp
6164

@@ -75,7 +78,11 @@ For embedded development and flashing and debugging [probe-rs](https://probe.rs/
7578

7679
### Versioning
7780

78-
The amp-devcontainer repository follows a [semantic versioning](https://semver.org/spec/v2.0.0.html) strategy for its container images. This ensures clear communication of updates and compatibility. The versioning format used is `<major>.<minor>.<patch>`. Released containers are tagged with `<major>`, `<major>.<minor>`, `<major>.<minor>.<patch>` and `v<major>.<minor>.<patch>`. The latest build on the default branch is tagged with `edge` and pull request builds are tagged with `pr-<number>`.
81+
The amp-devcontainer repository follows a [semantic versioning](https://semver.org/spec/v2.0.0.html) strategy for its container images.
82+
This ensures clear communication of updates and compatibility.
83+
The versioning format used is `<major>.<minor>.<patch>`.
84+
Released containers are tagged with `<major>`, `<major>.<minor>`, `<major>.<minor>.<patch>` and `v<major>.<minor>.<patch>`.
85+
The latest build on the default branch is tagged with `edge` and pull request builds are tagged with `pr-<number>`.
7986

8087
| Branch | Tag |
8188
|--------------|----------------------------|
@@ -86,17 +93,24 @@ The amp-devcontainer repository follows a [semantic versioning](https://semver.o
8693
| | `<major>.<minor>` |
8794
| | `<major>` |
8895

89-
Released containers will never be cleaned-up, pull request builds are cleaned up when the pull request is merged, and edge builds may be cleaned up after being stale for a while.
96+
Released containers will never be cleaned-up, pull request builds are cleaned up when the pull request is closed, and edge builds will be cleaned up shortly after a new edge version has been published.
9097

91-
The release notes always contain an overview of the corresponding image versions that include the full SHA next to the version number. This makes it possible for humans to easily see what version is used while still pinning to an exact version. This is the recommended way to refer to an image.
98+
The release notes always contain an overview of the corresponding image versions that include the full SHA next to the version number.
99+
This makes it possible for humans to easily see what version is used while still pinning to an exact version.
100+
This is the recommended way to refer to an image.
92101

93-
All container images are included in a release. This might change in the future when the need arises to have separate releases per container.
102+
All container images are included in a release.
103+
This might change in the future when the need arises to have separate releases per container.
94104

95-
This versioning strategy is implemented as GitHub Actions workflows, ensuring consistency and security across releases. Only the GitHub Action workflow is allowed to create a release, and the resulting images are [signed](#verify-image-signature).
105+
This versioning strategy is implemented as GitHub Actions workflows, ensuring consistency and security across releases.
106+
Only the GitHub Action workflow is allowed to create a release, and the resulting images are [signed](#verify-image-signature).
96107

97108
### Visual Studio Code
98109

99-
Both containers can be used in Visual Studio Code or GitHub Codespaces without any additional configuration. All included tools are set-up and necessary plug-ins will be installed at container start. This behavior is implemented by appending devcontainer metadata to an image label according to these [specifications](https://containers.dev/implementors/reference/#labels). It is possible to override, amend or change the options following this [merge logic](https://containers.dev/implementors/spec/#merge-logic).
110+
All containers can be used in Visual Studio Code or GitHub Codespaces without any additional configuration.
111+
All included tools are set-up and necessary plug-ins will be installed at container start.
112+
This behavior is implemented by appending devcontainer metadata to an image label according to these [specifications](https://containers.dev/implementors/reference/#labels).
113+
It is possible to override, amend or change the options following this [merge logic](https://containers.dev/implementors/spec/#merge-logic).
100114

101115
## Usage
102116

@@ -108,16 +122,10 @@ The container images are signed with [SigStore](https://www.sigstore.dev/) [Cosi
108122

109123
The signature can be [verified](https://docs.sigstore.dev/cosign/verifying/verify/) with the following command (using Docker), verifying that the image is actually signed by the GitHub CI system:
110124

111-
> amp-devcontainer-cpp
125+
> amp-devcontainer-<🍨 flavor>
112126
113127
```sh
114-
docker run --rm gcr.io/projectsigstore/cosign verify ghcr.io/philips-software/amp-devcontainer-cpp --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp https://github.com/philips-software/amp-devcontainer
115-
```
116-
117-
> amp-devcontainer-rust
118-
119-
```sh
120-
docker run --rm gcr.io/projectsigstore/cosign verify ghcr.io/philips-software/amp-devcontainer-rust --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp https://github.com/philips-software/amp-devcontainer
128+
docker run --rm gcr.io/projectsigstore/cosign verify ghcr.io/philips-software/amp-devcontainer-<🍨 flavor> --certificate-oidc-issuer https://token.actions.githubusercontent.com --certificate-identity-regexp https://github.com/philips-software/amp-devcontainer
121129
```
122130

123131
</details>
@@ -126,43 +134,27 @@ The container images are signed using the [attest-build-provenance](https://gith
126134

127135
The attestations can be checked with the following command, verifying that the image is actually built by the GitHub CI system:
128136

129-
> amp-devcontainer-cpp
137+
> amp-devcontainer-<🍨 flavor>
130138
131139
```sh
132-
gh attestation verify --repo philips-software/amp-devcontainer oci://ghcr.io/philips-software/amp-devcontainer-cpp
133-
```
134-
135-
> amp-devcontainer-rust
136-
137-
```sh
138-
gh attestation verify --repo philips-software/amp-devcontainer oci://ghcr.io/philips-software/amp-devcontainer-rust
140+
gh attestation verify --repo philips-software/amp-devcontainer oci://ghcr.io/philips-software/amp-devcontainer-<🍨 flavor>
139141
```
140142

141143
### Local development
142144

143145
The resulting containers can be used in a `.devcontainer.json` file or in a `.devcontainer` folder.
144146

145-
> [!NOTE]
146-
> While the following examples use the `latest` tag, it is recommended to pin to a specific version. Or better yet, a specific SHA.
147+
> [!IMPORTANT]
148+
> While the following example use the `latest` tag, it is recommended to pin to a specific version. Or better yet, a specific SHA.
147149
> See the [releases](https://github.com/philips-software/amp-devcontainer/releases) for the SHA corresponding to a specific release.
148150
149-
#### amp-devcontainer-cpp
150-
151-
> .devcontainer/devcontainer.json or .devcontainer.json
152-
153-
```json
154-
{
155-
"image": "ghcr.io/philips-software/amp-devcontainer-cpp:latest"
156-
}
157-
```
158-
159-
#### amp-devcontainer-rust
151+
#### amp-devcontainer-<🍨 flavor>
160152

161153
> .devcontainer/devcontainer.json or .devcontainer.json
162154
163155
```json
164156
{
165-
"image": "ghcr.io/philips-software/amp-devcontainer-rust:latest"
157+
"image": "ghcr.io/philips-software/amp-devcontainer-<🍨 flavor>:latest"
166158
}
167159
```
168160

@@ -174,7 +166,7 @@ The resulting containers can be used in a GitHub workflow by using the [`contain
174166
jobs:
175167
container-job:
176168
runs-on: ubuntu-latest
177-
container: ghcr.io/philips-software/amp-devcontainer-cpp:latest
169+
container: ghcr.io/philips-software/amp-devcontainer-<🍨 flavor>:latest
178170
```
179171
180172
## Community

0 commit comments

Comments
 (0)