Skip to content

Commit f99a9be

Browse files
Copilotjpayne3506
andcommitted
Move Docker image generation documentation to docs/README.md as requested
Co-authored-by: jpayne3506 <89417863+jpayne3506@users.noreply.github.com>
1 parent 9aadc9e commit f99a9be

File tree

3 files changed

+61
-60
lines changed

3 files changed

+61
-60
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ $ make all-binaries
3939
Then follow the instructions for the plugin in [Documentation](docs/).
4040

4141
## Docker Image Generation
42-
See [Docker Image Generation](doc/README.md) for instructions on building container images for networking components.
42+
See [Docker Image Generation](docs/README.md#docker-image-generation) for instructions on building container images for networking components.
4343

4444
## Contributions
4545
Contributions in the form of bug reports, feature requests and PRs are always welcome.

doc/README.md

Lines changed: 0 additions & 59 deletions
This file was deleted.

docs/README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,65 @@
1010
* [NPM](npm.md) - describes how to setup Azure-NPM (Azure Network Policy Manager).
1111
* [Scripts](scripts.md) - describes how to use the scripts in this repository.
1212

13+
## Docker Image Generation
14+
15+
This repository supports building Docker container images for networking components using standardized make recipes. The build system uses Docker or Podman to create multi-platform images.
16+
17+
### Prerequisites
18+
- Docker or Podman installed and running
19+
- For multi-platform builds: `make qemu-user-static` (Linux only)
20+
21+
### Available Components
22+
- **acncli** - CNI manager
23+
- **azure-ipam** - Azure IP Address Management
24+
- **cni** - Container Network Interface
25+
- **cns** - Container Network Service
26+
- **npm** - Network Policy Manager
27+
- **ipv6-hp-bpf** - IPv6 Host Policy BPF
28+
29+
### Generic Build Pattern
30+
All components follow the same make recipe pattern:
31+
32+
```bash
33+
# Build container image
34+
$ make <component>-image
35+
36+
# View image name and tag
37+
$ make <component>-image-name-and-tag
38+
39+
# Push image to registry
40+
$ make <component>-image-push
41+
42+
# Pull image from registry
43+
$ make <component>-image-pull
44+
45+
# Build multi-platform manifest
46+
$ make <component>-manifest-build
47+
$ make <component>-manifest-push
48+
```
49+
50+
### Example Usage
51+
```bash
52+
# Build CNS image
53+
$ make cns-image
54+
55+
# Build NPM image with custom platform
56+
$ PLATFORM=linux/arm64 make npm-image
57+
58+
# Build Azure-IPAM image with custom registry
59+
$ IMAGE_REGISTRY=myregistry.azurecr.io make azure-ipam-image
60+
61+
# Use Podman instead of Docker
62+
$ CONTAINER_BUILDER=podman make cni-image
63+
```
64+
65+
### Customization
66+
Environment variables for customizing builds:
67+
- `PLATFORM` - Target platform/architecture (default: linux/amd64)
68+
- `IMAGE_REGISTRY` - Custom registry (default: acnpublic.azurecr.io)
69+
- `CONTAINER_BUILDER` - Container builder (default: docker, alternative: podman)
70+
71+
Images are tagged with platform and version information and published to the configured registry.
72+
1373
## Code of Conduct
1474
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

0 commit comments

Comments
 (0)