Tuesday, May 15, 2018

playing Docker on ubuntu 18.04 LTS

# update package list:
$ sudo apt update

# installation:
$ sudo apt install docker

# by now, docker is sudo only.  if want to skip that 'sudo'
$ sudo groupadd docker
$ sudo useradd -aG docker $USER
doc said logout and re-login... i found it requires restarting.

# test environment, run helloworld
$ docker run hello-world
# will pull first if image not yet existed.



##  examples


# try node.js
$ docker pull node   # see online slim version
...
$ docker run node   # run and end and return
$ docker run -td node  # run in a new (t)ty, and (d)etached, end and return
$ docker run -it node   # run in a new (t)ty, (i)nteractively - prompt node's '>', ctrl-d to exit

# list downloaded images
$ docker images

# docker --help


Labels: , , , , , , ,

Sunday, May 13, 2018

HOWTO convert ubuntu 18.04 LTS ISO to bootable USB installation disk on Mac OSX


minimum 2GB size of SD card

0) find name of SD card in file system
diskutil list

1) download from ubuntu.com the 18.04 LTS image
cd ~/Downloads/
ls ubuntu-18.04-desktop-amd64.iso

2) convert ISO to dd-table binary image
hdiutil convert -format UDRW -o ubuntu1804.img ubuntu-18.04-desktop-amd64.iso

3) unmount SD card, eg. disk3
diskutil unmountDisk /dev/disk3

4) write to SD card
sudo dd if=./target.img.dmg of=/dev/rdisk3 bs=1m


Labels: , , , , , , , , ,

Tuesday, May 08, 2018

HOWTO connect to GIT repo setting up SSH credential, avoid typing password


git pull from bitbucket or github, requires user account credential, either password, or ssh key, if didn't use keychain or caching the password.

steps:

0) of course you need ssh

1) in folder ~/.ssh
    ssh-keygen
    # to generate a key pair - private key & public key

2) keep private key private (obviously), add to your ssh agent as identity
    ssh-add ~/.ssh/mykey

3) set up public key remotely, locate ssh credential, click "add key"
    copy and paste the text of public key file to, eg. bitbucket, add key text input field.

done

Labels: , , , , , , ,