.. | ||
readme.md |
Note: This is unmaintained, try on your own responsibility
MacOS Developer
0-OS (v2) uses a Linux kernel and is really build with a linux environment in mind. As a developer working from a MacOS environment you will have troubles running the 0-OS code.
Using Docker you can work from a Linux development environment, hosted from your MacOS Host machine. In this README we'll do exactly that using the standard Ubuntu Docker container as our base.
Setup
- Make sure to have Docker installed, and configured (also make sure you have your code folder path shared in your Docker preferences).
- Start an Ubuntu Docker container with your shared code directory mounted as a volume:
docker run -ti -v "$HOME/oss":/oss ubuntu /bin/bash
- Make sure your environment is updated and upgraded using
apt-get
. - Install Go (
1.13
) from src using the following link or the one you found on the downloads page:
wget https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz
sudo tar -xvf go1.13.3.linux-amd64.tar.gz
sudo mv go /usr/local
- Add the following to your
$HOME/.bashrc
andsource
it:
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
- Confirm you have Go installed correctly:
go version && go env
- Go to your
zos
codepkg
directory hosted from your MacOS development machine within your docker/bin/bash
:
cd /oss/github.com/threefoldtech/zos/pkg
- Install the dependencies for testing:
make getdeps
- Run tests and verify all works as expected:
make test
- Build
zos
:
make build
If you can successfully do step (8) and step (9) you
can now contribute to zos
as a MacOS developer.
Testing and compiling you'll do from within your container's shell,
coding you can do from your beloved IDE on your MacOS development environment.