Skip to content

Commit b7324a4

Browse files
committed
Extend build instructions for kube-build
Signed-off-by: Galo Navarro <anglorvaroa@gmail.com>
1 parent d6743bd commit b7324a4

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,38 @@ source.
7373

7474
- **Run tests**: `just test`
7575
- **Run linters**: `just lint`
76-
- **Build for multiple platforms**: `just build-multi`
77-
- **Build Kubernetes artifacts**: `just kube-build`
76+
- **Build for multiple platforms**: `just build-multi` (builds hhfctl for Linux and macOS, both amd64 and arm64)
7877
- **Generate code/manifests**: `just gen`
7978

79+
### Building Kubernetes Artifacts
80+
81+
To build Docker images and Helm charts:
82+
83+
```sh
84+
just kube-build
85+
```
86+
87+
**Known Issue**: Due to a working directory issue in the justfile, `just kube-build` may fail with `cp: cannot stat 'bin/fabric'`. If this happens, manually copy the binaries and build the Docker images:
88+
89+
```sh
90+
# Copy binaries to docker build directories
91+
cp bin/fabric config/docker/fabric/
92+
cp bin/fabric-dhcpd config/docker/fabric-dhcpd/
93+
cp bin/fabric-boot config/docker/fabric-boot/
94+
95+
# Build Docker images manually
96+
cd config/docker/fabric && docker build --platform=linux/amd64 -t 127.0.0.1:30000/githedgehog/fabric/fabric:$(git describe --tags --always) -f Dockerfile .
97+
cd ../fabric-dhcpd && docker build --platform=linux/amd64 -t 127.0.0.1:30000/githedgehog/fabric/fabric-dhcpd:$(git describe --tags --always) -f Dockerfile .
98+
cd ../fabric-boot && docker build --platform=linux/amd64 -t 127.0.0.1:30000/githedgehog/fabric/fabric-boot:$(git describe --tags --always) -f Dockerfile .
99+
```
100+
101+
Built images:
102+
- `127.0.0.1:30000/githedgehog/fabric/fabric:<version>`
103+
- `127.0.0.1:30000/githedgehog/fabric/fabric-dhcpd:<version>`
104+
- `127.0.0.1:30000/githedgehog/fabric/fabric-boot:<version>`
105+
106+
Where `<version>` is determined by `git describe --tags --always`.
107+
80108
## Description
81109
// TODO(user): An in-depth paragraph about your project and overview of use
82110

0 commit comments

Comments
 (0)