Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ You can build and run the Dockerfile directly as a Docker container.

```sh
cd images/chromium-headful
../../shared/build-server.sh bin
IMAGE=kernel-docker ./build-docker.sh
IMAGE=kernel-docker ENABLE_WEBRTC=true ./run-docker.sh
```
Expand Down Expand Up @@ -163,4 +162,4 @@ For issues, questions, or feedback, please [open an issue](https://github.com/on
- Thank you to [xonkernel](https://github.com/xonkernel) for leading the development of our WebRTC live view.
- Thank you to the [Unikraft Cloud](https://unikraft.cloud/) team for your help with unikernels.

Made with ❤️ by the [Kernel team](https://www.onkernel.com).
Made with ❤️ by the [Kernel team](https://www.onkernel.com).
14 changes: 11 additions & 3 deletions shared/build-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,17 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"

# 1. Build the binary in the server module
pushd "$REPO_ROOT/server" >/dev/null
GOOS="$TARGET_OS" GOARCH="$TARGET_ARCH" CGO_ENABLED=0 make build
popd >/dev/null
GO_REQUIRED=$(grep -E "^go [0-9]+\.[0-9]+" "$REPO_ROOT/server/go.mod" | head -n1 | awk '{print $2}')
echo "🔨 Building kernel-images-api binary using go ${GO_REQUIRED}"
docker run --rm \
-e GOOS="$TARGET_OS" \
-e GOARCH="$TARGET_ARCH" \
-e CGO_ENABLED=0 \
-e GOFLAGS="-buildvcs=false" \
-v "$REPO_ROOT":/workspace \
-w /workspace/server \
"golang:${GO_REQUIRED}" \
make build

# 2. Copy to destination
mkdir -p "$DEST_DIR"
Expand Down
Loading