Skip to content

kunai-project/kunai-build-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions Workflow Status

This repository contains a way to build kunai on any OS capable of running docker.

⚠️ The Dockerfile and the docker image provided in this repository assume a x86 host system. If you intend to run it on another host archictecture, it might require adaptation.

The Easy Way: Using a Readymade Docker Image

  1. git clone https://github.com/kunai-project/kunai.git
  2. docker run -it --rm -v $PWD/kunai:/kunai-src -w /kunai-src ghcr.io/kunai-project/kunai-builder cargo build
  3. Find compiled binary in ./kunai/target directory

The Tough Way: Building the Docker Image by Yourself

Image Building

⚠️ This step needs to be done only once to create the docker image we will use

  1. git clone https://github.com/kunai-project/kunai-build-docker.git
  2. cd kunai-build-docker
  3. docker build -t kunai-build ./

Build kunai with in a container

  1. git clone https://github.com/kunai-project/kunai.git
  2. docker run -it --rm -v $PWD/kunai:/kunai-src -w /kunai-src kunai-build cargo build
  3. Find compiled binary in ./kunai/target directory

Cross-compile

The docker image supports cross-compilation to ARM64 (aarch64) targets. You can cross-compile kunai for ARM64 systems using the following commands:

Cross-compile to aarch64-unknown-linux-musl (ARM64 with musl libc)

docker run -it --rm -v $PWD/kunai:/kunai-src -w /kunai-src ghcr.io/kunai-project/kunai-builder:latest cargo build --target aarch64-unknown-linux-musl

Note: The compiled binaries will be available in the ./kunai/target/<target-triple>/release/ directory on your host system.

About

Dockerfile to build kunai without effort

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors