Last active
August 2, 2025 18:32
-
-
Save garystafford/07fbfe8fde48c3f5810c to your computer and use it in GitHub Desktop.
Revisions
-
garystafford revised this gist
Nov 24, 2014 . 3 changed files with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ ############################################################################### # Version 1: using ‘apt-get install’ # Installs using apt-get # Requires update to npm afterwards # Harder to get latest copy of node This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ ############################################################################### # Version 2: using curl, make, and npmjs.org’s install script # Installs using make and shell script # Easier to update node and npm versions in future # Requires sudo to use npm This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ ############################################################################### # Version 3: version 2 without requiring ‘sudo’ to use npm # Does NOT require sudo to use npm ############################################################################### -
garystafford revised this gist
Nov 22, 2014 . 1 changed file with 0 additions and 36 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,36 +0,0 @@ -
garystafford revised this gist
Nov 22, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -30,6 +30,7 @@ docker rm $(sudo docker ps --before="<container>" -q) # can also filter # remove image (remove assoc. containers first) docker rmi <image> docker rmi $(docker images | grep <container>) docker rmi $(docker images | grep "2 days ago") # other great tips: http://www.centurylinklabs.com/15-quick-docker-tips/ # fix fig / docker config: https://gist.github.com/RuslanHamidullin/94d95328a7360d843e52 -
garystafford revised this gist
Nov 21, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,6 +29,7 @@ docker rm $(sudo docker ps --before="<container>" -q) # can also filter # remove image (remove assoc. containers first) docker rmi <image> docker rmi $(docker images | grep <container>) # other great tips: http://www.centurylinklabs.com/15-quick-docker-tips/ # fix fig / docker config: https://gist.github.com/RuslanHamidullin/94d95328a7360d843e52 -
garystafford revised this gist
Nov 20, 2014 . 1 changed file with 11 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,28 +6,29 @@ # https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit # create new docker ubuntu container docker pull ubuntu # 1x pull down image ahead of time docker run -i -t ubuntu /bin/bash # drops you into container as root # list images and containers docker images # all images docker ps -a # all containers docker images | grep <search_term> # start and attach to container docker start <container> docker attach <container> # stop and remove container docker stop <container> docker rm <container> #stop and remove ALL containers docker stop $(docker ps -a -q) docker rm $(docker ps -a -q) docker rm $(sudo docker ps --before="<container>" -q) # can also filter # remove image (remove assoc. containers first) docker rmi <image> # other great tips: http://www.centurylinklabs.com/15-quick-docker-tips/ # fix fig / docker config: https://gist.github.com/RuslanHamidullin/94d95328a7360d843e52 -
garystafford revised this gist
Nov 20, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,4 +29,5 @@ sudo docker rm $(sudo docker ps --before="<container>" -q) # can also filter # remove image (remove assoc. containers first) # sudo docker rmi <image> # other great tips: http://www.centurylinklabs.com/15-quick-docker-tips/ # fix fig / docker config: https://gist.github.com/RuslanHamidullin/94d95328a7360d843e52 -
garystafford revised this gist
Nov 20, 2014 . 4 changed files with 12 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,4 +27,6 @@ docker rm $(docker ps -a -q) sudo docker rm $(sudo docker ps --before="<container>" -q) # can also filter # remove image (remove assoc. containers first) # sudo docker rmi <image> # other great tips: http://www.centurylinklabs.com/15-quick-docker-tips/ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,9 @@ # Requires sudo to use npm ############################################################################### # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root # update and install all required packages (no sudo required as root) # https://gist.github.com/isaacs/579814#file-only-git-all-the-way-sh apt-get update -yq && apt-get upgrade -yq && \ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,9 @@ # Requires sudo to use npm ############################################################################### # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root # update and install all required packages (no sudo required as root) # https://gist.github.com/isaacs/579814#file-only-git-all-the-way-sh apt-get update -yq && apt-get upgrade -yq && \ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,9 @@ # Does NOT require sudo to use npm ############################################################################### # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root # update and install all required packages (no sudo required as root) # https://gist.github.com/isaacs/579814#file-only-git-all-the-way-sh apt-get update -yq && apt-get upgrade -yq && \ -
garystafford revised this gist
Nov 19, 2014 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,5 +21,10 @@ sudo docker attach <container> sudo docker stop <container> sudo docker rm <container> #stop and remove ALL containers docker stop $(docker ps -a -q) docker rm $(docker ps -a -q) sudo docker rm $(sudo docker ps --before="<container>" -q) # can also filter # remove image (remove assoc. containers first) # sudo docker rmi <image> -
garystafford revised this gist
Nov 19, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ # https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit # create new docker ubuntu container sudo docker pull ubuntu # 1x pull down image ahead of time sudo docker run -i -t ubuntu /bin/bash # drops you into container as root # list images and containers -
garystafford revised this gist
Nov 19, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ sudo docker run -i -t ubuntu /bin/bash # drops you into container as root # list images and containers sudo docker images # all images sudo docker ps -a # all containers # start and attach to container -
garystafford revised this gist
Nov 19, 2014 . 1 changed file with 7 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,11 +8,17 @@ # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root # list images and containers sudo docker images -a # all images sudo docker ps -a # all containers # start and attach to container sudo docker start <container> sudo docker attach <container> # stop and remove container sudo docker stop <container> sudo docker rm <container> # remove image (remove assoc. containers first) # sudo docker rmi <image> -
garystafford revised this gist
Nov 18, 2014 . 4 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes. -
garystafford revised this gist
Nov 18, 2014 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ apt-get install -yq g++ libssl-dev apache2-utils curl git python make nano # https://gist.github.com/isaacs/579814#file-node-and-npm-in-30-seconds-sh mkdir ~/node-latest-install && cd $_ && \ curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 && \ make install && \ # takes a few minutes to build... curl https://www.npmjs.org/install.sh | sh # add user with sudo privileges within Docker container This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ mkdir ~/$MODULES mkdir ~/node-latest-install && cd $_ && \ curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 && \ ./configure --prefix=~/$MODULES && \ make install && \ # takes a few minutes to build... curl https://www.npmjs.org/install.sh | sh # install common fullstack JavaScript packages globally -
garystafford revised this gist
Nov 18, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,8 @@ apt-get update -yq && apt-get upgrade -yq && \ apt-get install -yq curl git nano # install from nodesource using apt-get # https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server curl -sL https://deb.nodesource.com/setup | sudo bash - && \ apt-get install -yq nodejs build-essential -
garystafford revised this gist
Nov 18, 2014 . 4 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes.File renamed without changes. -
garystafford revised this gist
Nov 18, 2014 . 4 changed files with 11 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ ############################################################################### # Helpful Docker commands to create, start, and stop containers ############################################################################### # install docker first using directions for installing latest version This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ ############################################################################### # Installs using apt-get # Requires update to npm afterwards # Harder to get latest copy of node # Requires sudo to use npm ############################################################################### # update and install all required packages (no sudo required as root) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ ############################################################################### # Installs using make and shell script # Easier to update node and npm versions in future # Requires sudo to use npm ############################################################################### # update and install all required packages (no sudo required as root) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ ############################################################################### # Installs using make and shell script # Easier to update node and npm versions in future # Does NOT require sudo to use npm ############################################################################### # update and install all required packages (no sudo required as root) -
garystafford renamed this gist
Nov 18, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
garystafford revised this gist
Nov 18, 2014 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,6 @@ # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root sudo docker images -a # all images sudo docker ps -a # all containers -
garystafford revised this gist
Nov 18, 2014 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ ############################################################################### # Helpful Docker commands to create, start, and stop containers # ############################################################################### # install docker first using directions for installing latest version -
garystafford revised this gist
Nov 18, 2014 . 4 changed files with 3 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,9 @@ # install docker first using directions for installing latest version # https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root # helpful docker commands sudo docker images -a # all images sudo docker ps -a # all containers This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,9 +3,6 @@ # Requires sudo to use npm. # ############################################################################### # update and install all required packages (no sudo required as root) # https://gist.github.com/isaacs/579814#file-only-git-all-the-way-sh apt-get update -yq && apt-get upgrade -yq && \ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,9 +3,6 @@ # Requires sudo to use npm. # ############################################################################### # update and install all required packages (no sudo required as root) # https://gist.github.com/isaacs/579814#file-only-git-all-the-way-sh apt-get update -yq && apt-get upgrade -yq && \ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,9 +3,6 @@ # Does not require sudo to use npm. # ############################################################################### # update and install all required packages (no sudo required as root) # https://gist.github.com/isaacs/579814#file-only-git-all-the-way-sh apt-get update -yq && apt-get upgrade -yq && \ -
garystafford revised this gist
Nov 18, 2014 . 4 changed files with 20 additions and 42 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ ############################################################################### # Installs using apt-get. Easier to update node version in future # # Requires sudo to use npm. # ############################################################################### # install docker first using directions for installing latest version # https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit # helpful docker commands sudo docker images -a # all images sudo docker ps -a # all containers sudo docker start <container> sudo docker attach <container> sudo docker stop <container> sudo docker rm <container> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,9 +3,6 @@ # Requires sudo to use npm. # ############################################################################### # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root @@ -35,14 +32,4 @@ sudo npm install -g yo grunt-cli bower express # optional, check locations and packages are correct which node; node -v; which npm; npm -v; \ npm ls -g --depth=0 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,9 +3,6 @@ # Requires sudo to use npm. # ############################################################################### # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root @@ -36,14 +33,4 @@ sudo npm install -g yo grunt-cli bower express # optional, check locations and packages are correct which node; node -v; which npm; npm -v; \ npm ls -g --depth=0 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,9 +3,6 @@ # Does not require sudo to use npm. # ############################################################################### # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root @@ -44,14 +41,4 @@ npm install -g yo grunt-cli bower express # optional, check locations and packages are correct which node; node -v; which npm; npm -v; \ npm ls -g --depth=0 -
garystafford revised this gist
Nov 18, 2014 . 2 changed files with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ ############################################################################### # Installs using apt-get. Requires update to npm afterwards. # # Requires sudo to use npm. # ############################################################################### # install docker first using directions for installing latest version @@ -30,7 +31,7 @@ su - $USER # switch to testuser # install common full-stack JavaScript packages globally # http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation sudo npm install -g yo grunt-cli bower express # optional, check locations and packages are correct which node; node -v; which npm; npm -v; \ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ ############################################################################### # Installs using apt-get. Easier to update node version in future # # Requires sudo to use npm. # ############################################################################### # install docker first using directions for installing latest version @@ -31,7 +32,7 @@ su - $USER # switch to testuser # install common full-stack JavaScript packages globally # http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation sudo npm install -g yo grunt-cli bower express # optional, check locations and packages are correct which node; node -v; which npm; npm -v; \ -
garystafford revised this gist
Nov 18, 2014 . 3 changed files with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ ############################################################################### # Installs using apt-get. Requires update to npm afterwards. # ############################################################################### # install docker first using directions for installing latest version # https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ ############################################################################### # Installs using apt-get. Easier to update node version in future # ############################################################################### # install docker first using directions for installing latest version # https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,8 @@ ############################################################################### # Installs using apt-get. Easier to update node version in future. # # Does not require sudo to use npm. # ############################################################################### # install docker first using directions for installing latest version # https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit -
garystafford revised this gist
Nov 18, 2014 . 1 changed file with 52 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ # install docker first using directions for installing latest version # https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root # update and install all required packages (no sudo required as root) # https://gist.github.com/isaacs/579814#file-only-git-all-the-way-sh apt-get update -yq && apt-get upgrade -yq && \ apt-get install -yq g++ libssl-dev apache2-utils curl git python make nano # add user with sudo privileges within Docker container # without adduser input questions # http://askubuntu.com/questions/94060/run-adduser-non-interactively/94067#94067 USER="testuser" && \ adduser --disabled-password --gecos "" $USER && \ sudo usermod -a -G sudo $USER && \ echo "$USER:abc123" | chpasswd && \ su - $USER # switch to testuser # setting up npm for global installation without sudo # http://stackoverflow.com/a/19379795/580268 MODULES="local" && \ echo prefix = ~/$MODULES >> ~/.npmrc && \ echo "export PATH=\$HOME/$MODULES/bin:\$PATH" >> ~/.bashrc && \ . ~/.bashrc && \ mkdir ~/$MODULES # install Node.js and npm # https://gist.github.com/isaacs/579814#file-node-and-npm-in-30-seconds-sh mkdir ~/node-latest-install && cd $_ && \ curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 && \ ./configure --prefix=~/$MODULES && \ make install # takes a few minutes to build... && \ curl https://www.npmjs.org/install.sh | sh # install common fullstack JavaScript packages globally npm install -g yo grunt-cli bower express # optional, check locations and packages are correct which node; node -v; which npm; npm -v; \ npm ls -g --depth=0 # helpful docker commands sudo docker images -a # all images sudo docker ps -a # all containers sudo docker start <container> sudo docker attach <container> sudo docker stop <container> sudo docker rm <container> -
garystafford revised this gist
Nov 18, 2014 . 1 changed file with 43 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ # install docker first using directions for installing latest version # https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root # update and install all required packages (no sudo required as root) # https://gist.github.com/isaacs/579814#file-only-git-all-the-way-sh apt-get update -yq && apt-get upgrade -yq && \ apt-get install -yq curl git nano curl -sL https://deb.nodesource.com/setup | sudo bash - && \ apt-get install -yq nodejs build-essential # fix npm - not the latest version installed by apt-get npm install -g npm # add user with sudo privileges within Docker container # without adduser input questions # http://askubuntu.com/questions/94060/run-adduser-non-interactively/94067#94067 USER="testuser" && \ adduser --disabled-password --gecos "" $USER && \ sudo usermod -a -G sudo $USER && \ echo "$USER:abc123" | chpasswd && \ su - $USER # switch to testuser # install common full-stack JavaScript packages globally # http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation npm install -g yo grunt-cli bower express # optional, check locations and packages are correct which node; node -v; which npm; npm -v; \ npm ls -g --depth=0 # helpful docker commands sudo docker images -a # all images sudo docker ps -a # all containers sudo docker start <container> sudo docker attach <container> sudo docker stop <container> sudo docker rm <container> -
garystafford revised this gist
Nov 18, 2014 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,6 @@ apt-get install -yq g++ libssl-dev apache2-utils curl git python make nano # https://gist.github.com/isaacs/579814#file-node-and-npm-in-30-seconds-sh mkdir ~/node-latest-install && cd $_ && \ curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 && \ make install # takes a few minutes to build... && \ curl https://www.npmjs.org/install.sh | sh -
garystafford created this gist
Nov 18, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ # install docker first using directions for installing latest version # https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit # create new docker ubuntu container sudo docker run -i -t ubuntu /bin/bash # drops you into container as root # update and install all required packages (no sudo required as root) # https://gist.github.com/isaacs/579814#file-only-git-all-the-way-sh apt-get update -yq && apt-get upgrade -yq && \ apt-get install -yq g++ libssl-dev apache2-utils curl git python make nano # install latest Node.js and npm # https://gist.github.com/isaacs/579814#file-node-and-npm-in-30-seconds-sh mkdir ~/node-latest-install && cd $_ && \ curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 && \ ./configure --prefix=~/$MODULES && \ make install # takes a few minutes to build... && \ curl https://www.npmjs.org/install.sh | sh # add user with sudo privileges within Docker container # without adduser input questions # http://askubuntu.com/questions/94060/run-adduser-non-interactively/94067#94067 USER="testuser" && \ adduser --disabled-password --gecos "" $USER && \ sudo usermod -a -G sudo $USER && \ echo "$USER:abc123" | chpasswd && \ su - $USER # switch to testuser # install common full-stack JavaScript packages globally # http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation npm install -g yo grunt-cli bower express # optional, check locations and packages are correct which node; node -v; which npm; npm -v; \ npm ls -g --depth=0 # helpful docker commands sudo docker images -a # all images sudo docker ps -a # all containers sudo docker start <container> sudo docker attach <container> sudo docker stop <container> sudo docker rm <container>