Skip to content

ksigurdsson/tools

Repository files navigation

Tools

1. Overview

This repository provides development tools that I use regularly. To make these tools portable across macOS, Linux and Windows they are typically packaged to run as Docker containers.

2. Prerequisites

  • Windows Subsystem for Linux (WSL)

  • Environment Modules

  • Homebrew (macOS package manager)

  • Docker

3. Environment Modules

Install and configure environment modules

3.1. Windows

sudo apt-get install environment-modules

Add the following to .cshrc source /usr/share/modules/init/tcsh setenv MODULEPATH ${HOME}/tools/modulefiles

3.2. macOS

brew install modules

4. Install Docker

Due to some tools requiring access to USB (namely sigrok logic analyser) use Docker Toolbox rather than native Docker for Mac/Windows as it uses VirtualBox to run the virtual machine which (unlike Hyper-V or bHyve).

4.1. Windows

Download and install DockerToolBox: https://download.docker.com/win/stable/DockerToolbox.exe

Install packages to allow apt to use a repository over HTTPS

sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

Add Docker’s official GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Set up the repository

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Update source lists

sudo apt-get update

Install Docker

sudo apt-get install docker-ce

5. Create a Docker Machine

5.1. Windows

module add docker
docker-machine create --driver virtualbox --virtualbox-memory=4096 --virtualbox-cpu-count=2 --virtualbox-disk-size=20000 main

6. Start Docker Machine

docker-machine start main
setenv DOCKER_TLS_VERIFY "1";
setenv DOCKER_HOST "tcp://192.168.99.103:2376";
setenv DOCKER_CERT_PATH "/mnt/c/Users/karls/.docker/machine/machines/main";
setenv DOCKER_MACHINE_NAME "main";

7. Stop Docker Machine

docker-machine stop main

8. Windows WSL Usage Instructions

  1. Enable the WSL tools module add wsl

  2. Start docker machine docker-machine start main

  3. Setup docker machine docker-machine env main --shell=tcsh

  4. Now set the environment variables - converting to a wsl path (script this in future)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published