| Commands | Description |
|---|---|
docker run <image-name> |
Run specific image |
docker exec -it <image-id> bash |
Get shell of running image |
docker images |
List local images |
docker build -t . |
Building Docker Images from Context |
docker tag <image-id> <Docker Hub accountname>/<image-name>:<version> |
Tagging Images |
docker push <Docker Hub accountname>/<image-name> |
Push image to Docker Hub |
docker pull / |
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 characters
| #!/bin/bash | |
| # Add Required repository | |
| sudo add-apt-repository -y ppa:keithw/mosh | |
| curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | |
| sudo apt-get update -y && sudo apt-get upgrade -y | |
| sudo apt-get install -y htop build-essential nodejs mosh | |
| sudo npm install -g pm2 servers |
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 characters
| #!/bin/bash | |
| sudo apt-get install -y curl python-software-properties python g++ make | |
| # Add Required repository | |
| sudo add-apt-repository -y ppa:keithw/mosh | |
| sudo add-apt-repository -y ppa:chris-lea/zeromq | |
| sudo add-apt-repository -y ppa:chris-lea/redis-server |
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 characters
| #!/bin/sh | |
| sudo add-apt-repository -y ppa:keithw/mosh | |
| # Prepare Installation for Elasticsaerch | |
| sudo add-apt-repository -y ppa:webupd8team/java | |
| wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
| echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list | |
| sudo apt-get update -y && sudo apt-get upgrade -y | |
| sudo echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections |
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 characters
| # Plain Ol' Node | |
| node --max-old-space-size=1024 app.js # increase to 1gb | |
| node --max-old-space-size=2048 app.js # increase to 2gb | |
| node --max-old-space-size=3072 app.js # increase to 3gb | |
| node --max-old-space-size=4096 app.js # increase to 4gb | |
| node --max-old-space-size=5120 app.js # increase to 5gb | |
| node --max-old-space-size=6144 app.js # increase to 6gb | |
| # For pm2 | |
| pm2 start app.js --node-args="--max-old-space-size=1024" # increase to 1gb |
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 characters
| #!/bin/sh | |
| # one way (older scala version will be installed) | |
| # sudo apt-get install scala | |
| #2nd way | |
| sudo apt-get remove scala-library scala | |
| wget http://www.scala-lang.org/files/archive/scala-2.11.7.deb | |
| sudo dpkg -i scala-2.11.7.deb | |
| sudo apt-get update |
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 characters
| #!/bin/bash | |
| sudo apt-get install libtool pkg-config build-essential automake autoconf uuid-dev | |
| wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.6.tar.gz | |
| tar xvzf libsodium-1.0.6.tar.gz | |
| cd libsodium-1.0.6 | |
| ./configure | |
| make && make check | |
| sudo make install |
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 characters
| curl -LO http://www.lua.org/ftp/lua-5.1.5.tar.gz | |
| tar xvzf lua-5.1.5.tar.gz | |
| cd lua-5.1.5/src | |
| make macosx | |
| sudo cp lua /usr/local/bin/lua | |
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 characters
| local http = require "socket.http" | |
| local data = "" | |
| local function collect(chunk) | |
| if chunk ~= nil then | |
| data = data .. chunk | |
| end | |
| return true | |
| end |