This file contains 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
docker search postgres | |
docker pull postgres | |
docker images | |
docker ps -a | |
docker run -e POSTGRES_PASSWORD=changeme -d postgres | |
docker log -f {name} | |
docker inspect {name} | less |
This file contains 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
# have account at https://cloud.docker.com/ | |
# have accoutn at https://hub.docker.com/ | |
1.- Click at Nodes (menu option) at docker cloud | |
2.- Click "Bring your own node" | |
3.- Run the curl command to link you host with docker cloud | |
3.1 Log into you host (loko will provide the ip/user/passw for the host) | |
ssh user@ip_provider_by_loko | |
provide the user pass | |
su - #become root |
This file contains 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
# http://sebgoa.blogspot.mx/2015/04/1-command-to-kubernetes-with-docker.html | |
# You need to have docker installed on one machine. | |
# check for docker compose installation if not install it with | |
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
# check for correct installation with | |
docker-compose version |
This file contains 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
## taken from https://stormpath.com/blog/build-nodejs-express-stormpath-app/ | |
## you will find there what is what. | |
mkdir the-app | |
cd the-app | |
## create a package.json used by Node.js to keep track what modules your projects depeneds on. | |
npm init | |
## Now let’s install the libraries we want to use. |
This file contains 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
// donwload the test app | |
git clone [email protected]:jdleesmiller/docker-chat-demo.git | |
//unsetting docker variables for old docker machines or things like that | |
unset ${!DOCKER_*} | |
// raise the app with compose | |
docker-compose up | |
//open a browser and type |
This file contains 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
//for linux systems check -> https://docs.docker.com/linux/ | |
which curl | |
sudo apt-get update | |
sudo apt-get install curl | |
curl -fsSL https://get.docker.com/ | sh | |
//check for add the user to the docker group to avoid have to run docker with sudo |
This file contains 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
# copyng files from an outside box to you directory | |
scp -i infolob-analytics.pem [email protected]:/home/ubuntu/.pm2/logs/index-out-0.log . | |
# running image, configuring port, environment var | |
docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=visualuser -e POSTGRES_USER=visualuser -d postgres | |
# running a continaer and attaching it | |
docker run -i -t centos |
This file contains 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
docker pull nginx | |
docker volume create --name barcelona | |
docker volumen ls | |
//running the container with the volume | |
docker run -it -v barcelona:/barcelona --name volumeslab nginx /bin/bash | |
//whithin the container go to the volume mounted |
This file contains 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
// here will going to see how to connect containers | |
//but wait why don't jus try simple LINKING CONTAINERS? so lets see | |
// pull the no sql redis database | |
docker pull redis | |
// run a container with the database, check for parameter -d for the daemon way of run the container | |
docker run -d --name redis1 redis | |
//run other container using the redis database |
This file contains 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
// this time we will explore the use of Docker compose | |
// first check is already installed | |
docker-compose version | |
// for windows and mac is installed with docker tools | |
// linuxs users https://docs.docker.com/v1.5/compose/install/#install-compose | |
// could need to run the commands as super user | |
curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose |
OlderNewer