Skip to content

Latest commit

 

History

History
57 lines (50 loc) · 1.93 KB

readme.md

File metadata and controls

57 lines (50 loc) · 1.93 KB

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

  1. Make sure to have Docker installed, and configured (also make sure you have your code folder path shared in your Docker preferences).
  2. Start an Ubuntu Docker container with your shared code directory mounted as a volume:
docker run -ti -v "$HOME/oss":/oss ubuntu /bin/bash
  1. Make sure your environment is updated and upgraded using apt-get.
  2. 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
  1. Add the following to your $HOME/.bashrc and source it:
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
  1. Confirm you have Go installed correctly:
go version && go env
  1. Go to your zos code pkg directory hosted from your MacOS development machine within your docker /bin/bash:
cd /oss/github.com/threefoldtech/zos/pkg
  1. Install the dependencies for testing:
make getdeps
  1. Run tests and verify all works as expected:
make test
  1. 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.