Skip to main content

Environment settings

sealos only support linux now, you need a linux server to test it.

Some tools can be very handy to help you start a virtual machine such as multipass

Build the project

git clone https://github.com/labrirng/sealos
cd sealos
make build

You can scp the bin file to your linux host.

If you use multipaas, you can mount the bin dir to the vm:

multipass mount /your-bin-dir <name>[:<path>]

Then test it locally.

Notes about cross-platform building

All the binaries except sealos can be built anywhere since they have CGO_ENABLED=0. However, sealos needs to support overlay driver when running some subcommands like images, which relies on CGO. Therefore CGO is switched on when building sealos, making it impossible to build sealos binaries on platforms other than Linux.

Both Makefile and GoReleaser in this project have this setting.

Notes about go workspace

As sealos is using go1.18's workspace feature, once you add a new module, you need to run go work usr -r . at root directry to update the workspace synced.