
hi, my name is Ian Scrivener. I'm an Australian web technology specialist, fullstack/backend javascript web developer & cloud sysadmin. I've extensive (23 years) experience with medium to large scale web projects for .com, .gov & .org.
My main weapons include javascript; node.js,
angular.js, d3.js and mean.js, with SQL & noSQL databases; mySQL, PostgresSQL, MSSQL, MongoDB, CouchDB, redis etc
https://cloud-images.ubuntu.com/ubuntu-core/15.04/core/stable/aws_latest_images.txt
ARCH=amd64
BUILD=core
EBS_ap-northeast-1=ami-b1ba85df
EBS_ap-northeast-2=ami-12d11f7c
EBS_ap-southeast-1=ami-4d25e92e
EBS_ap-southeast-2=ami-41d3f622
EBS_BUCKET=ubuntu-devel
EBS_eu-central-1=ami-9c2831f0
EBS_eu-west-1=ami-93369ce0
EBS_sa-east-1=ami-6c119000
EBS_us-east-1=ami-fc99be96
EBS_us-west-1=ami-98b3c7f8
EBS_us-west-2=ami-ce17f2ae
IMAGE_FILE=/var/lib/jenkins/jobs/Snappy-AWS-Base/workspace/ARCH/amd64/core-stable-amd64-disk1.img
INSTANCE_ap-northeast-1=ami-ccc3fca2
INSTANCE_ap-northeast-2=ami-4fd11f21
INSTANCE_ap-southeast-1=ami-a92ae6ca
INSTANCE_ap-southeast-2=ami-5cd0f53f
INSTANCE_BUCKET=ubuntu-devel
INSTANCE_eu-central-1=ami-1e372e72
INSTANCE_eu-west-1=ami-21369c52
INSTANCE_sa-east-1=ami-6c078600
INSTANCE_us-east-1=ami-5c93b436
INSTANCE_us-west-1=ami-a7b2c6c7
INSTANCE_us-west-2=ami-9408edf4
NAME=ubuntu-15.04-Snappy-core-stable-15.04-20160120.0702
REPLICATE=1
VERSION=15.04
CHANNEL=stable
After updating to OSX El Capitan I noticed some troubles with docker-machine connecting to a Docker on an AWS EC2 Ubuntu 15.04 machine. There were quite a few posts expressing the same frustrations.. though few solutions.
(1) Get the IP address of running Docker Container
docker inspect <container_id> | grep IPAddress | cut -d '"' -f 4
docker inspect $ID | grep IPAddress | cut -d '"' -f 4
(2) Create a named clone/fork of a Docker Image
docker tag ubuntu $USER/geoserver geoserver
(3) Run you own named Docker Image
docker run -i -t z-geoserver /bin/bash
(4) List running Docker Machines
(5) List UUIDs only of Docker Images
(6) Create a easy to use alias for a Docker Image
export ID=1ecb8830ba6c
echo $ID
(7) Start a Docker Image
(8) Stop a Docker Image
(9) Connect to (attached console to) a running Docker Container
docker attach $CONTAINER_ID
(10) List the Docker Images I have installed
sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu 12.04 8dbd9e392a96 9 months ago 128 MB
ubuntu latest 8dbd9e392a96 9 months ago 128 MB
ubuntu precise 8dbd9e392a96 9 months ago 128 MB
ubuntu 12.10 b750fe79269d 10 months ago 175.3 MB
ubuntu quantal b750fe79269d 10 months ago 175.3 MB
busybox latest e9aa60c60128 10 months ago 4.964 MB
Better npm & node_modules
Here's a way to
- Install node packages globally without using sudo
- avoid node-modules sprawl.... by having a single common set of node_modules
- reduce bandwidth by avoiding download the same thing over and over again
Here's how I did it;
1) Create a new directory on our home folder for npm/node_modules
2) Tell npm to use this directory instead
echo "prefix = ~/npm_global" > ~/.npmrc
3) make sure node packages here are executable
export PATH=~/npm_global/bin:$PATH
4) Test it by installing Express
ls ~/npm_global/lib/node_modules
> #empty directory...
npm install express -g
ls ~/npm_global/lib/node_modules
>express
5) Test Express
6) Check it works
Create a directory for a 'rtest' node project
mkdir ~/npm_freedom_test
cd ~/npm_freedom_test
Link... don't install
npm link express
Check it worked
ls node_modules
Credit: http://justjs.com/posts/npm-link-developing-your-own-npm-modules-without-tears