/unix-utils

Unix utilities

Primary LanguageShell

unix-utils

This repository contains genaral Unix utilities + Docker utilities.

Scripts Description
set-environment.sh Script to set the environment
set-environment.sh.template Configuration template file (see wizard inside the script dir)

Info to set docker

I'm using Ubuntu 16.04 LTM (64bit) to host Docker.

Note:

To install Docker follow the instructions here: https://store.docker.com/editions/community/docker-ce-server-ubuntu

  • sudo apt-get -y install apt-transport-https ca-certificates curl
  • curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  • sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  • sudo apt-get update
  • sudo apt-get -y install docker-ce
  • sudo docker run hello-world
  • Additional configuration
    • sudo groupadd docker
    • sudo usermod -aG docker $USER
    • ^D logout + login
    • docker run hello-world (now without using sudo)

Necessary addons (if not installed)

  • sudo apt-get -y install git

Personal addons (this repo)

In case you are inside a protected network, remember to setup the proxy:

  • Set the proxy in the Ubuntu settings (standard system proxy configuration)
  • For Docker to work properly it is also necessary to:
    • export the proxy variables
    • And then follows the instructions here: http://stackoverflow.com/questions/23111631/cannot-download-docker-images-behind-a-proxy:
      • mkdir /etc/systemd/system/docker.service.d
      • vi /etc/systemd/system/docker.service.d/http-proxy.conf
      • sudo systemctl daemon-reload
      • sudo systemctl restart docker
    • Or from the cloned stefanutti/unix-utils repo (this repo) run:
      • cd ./unix-utils
      • cp set-environment.sh.template set-environment.sh
        • Note: .template files have to be customized          - If the environment is already set you can use the wizard to change the environment
          • wizard set-environment.sh.template (it will automatically generate the set-environment.sh file)
      • Note: Edit the set-environment.sh and customize the placeholders
        • export PRJ_HOME="#{Insert root directory for your projects:Not available. To be specified manually}"
        • export PRJ_HOME="$HOME/prj"
      • source ./set-environment.sh
      • . docker-set-proxy.sh (after having customized it for your needs - See note about .template files)
      • . docker-set-no-proxy.sh (to disable the proxy for a direct connection)