Docker Toolboox error in Windows

rajeshkumar created the topic: Docker Toolboox error in Windows

Error
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/info: open
//./pipe/docker_engine: The system cannot find the file specified. In the defau
lt daemon configuration on Windows, the docker client must be run elevated to co
nnect. This error may also indicate that the docker daemon is not running.

Solution
stackoverflow.com/questions/37527888/doc…nds-fails-in-windows

The following environment properties need to be set:
set DOCKER_CERT_PATH=%USERPROFILE%\.docker\machine\machines\default
set DOCKER_HOST=tcp://192.168.99.100:2376
set DOCKER_MACHINE_NAME=default
set DOCKER_TLS_VERIFY=1

$ docker-machine rm default
$ docker-machine create –driver virtualbox default

Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Top 10 DevOps Tools which is mostly used by DevOps Engineers | scmGalaxy

top-10-devops-tools
DevOps is an important component for software industry today. Developing and implementing a DevOps culture helps to focus IT results and to save time and money as the gap between developers and IT operations teams closes. Just as the term and culture are new, so are many of the best DevOps tools these DevOps engineers use to do their jobs efficiently and productively. To help you in your DevOps process, we have searched and created this list of DevOps tools which is mostly used by DevOps Engineers in their projects.

1. Chef

devops-tool-chef

Chef is an extremely popular tool among DevOps engineers. From IT automation to configuration management, Chef relies on recipes and resources so you can manage unique configurations and feel secure knowing Chef is checking your nodes and bringing them up to date for you.
Key Features:
  • Manage nodes from a single server
  • Cross-platform management for Linux, Windows, Mac OS, and more
  • Integrates with major cloud providers
  • Premium features available

2. Jenkins

devops-tool-jenkins

 

An extensible continuous integration engine, Jenkins is a top tool for DevOps engineers who want to monitor executions of repeated jobs. With Jenkins, DevOps engineers have an easier time integrating changes to projects and have access to outputs to easily notice when something goes wrong.
Key Features:
  • Permanent links
  • RSS/email/IM integration
  • After-the-fact tagging
  • JUnit/TestNG test reporting
  • Distributed builds
3. Puppet

devops-tool-puppet

Puppet is an open-source configuration management tool. It runs on many Unix-like systems as well as on Microsoft Windows, and includes its own declarative language to describe system configuration. DevOps engineers often rely on Puppet for IT automation. Get a handle on configuration management and software while making rapid, repeatable changes with Puppet.
Key Features:
  • Automatically enforce consistency of environments
  • Works across physical and virtual machines
  • A common tool-chain
  • Support key DevOps best practices, including continuous delivery

4. Ant

 

devops-tool-ant

A Java library and command-line tool, Apache Ant looks “to drive processes described in build files as targets and extension points dependent upon each other.” This build automation tool is one that saves DevOps engineers a great deal of time.
Key Features:
  • Supplies a number of built-in tasks for compiling, assembling, testing, and running Java applications
  • Builds non-Java applications, such as C or C++ applications
  • Pilot any type of process which can be described in terms of targets and tasks
  • Extremely flexible and does not impose coding conventions or directory layouts to the Java projects which adopt it as a build tool

5. Apache Maven

devops-tool-apache-maven

DevOps engineers can manage a project’s build, reporting, and documentation from a central piece of information with Apache Maven. A software project management and comprehension tool, Maven has been a reliable tool for DevOps engineers.
Key Features:
  • Simple project setup follows best practices
  • Easily work with multiple projects at one time
  • Large repository of libraries and metadata that continue to grow
  • Extensible, with the ability to write plugins in Java or scripting languages
6. Logstash

devops-tool-logstash

For open source log processing, search, and analytics, Logstash is a popular tool among DevOps engineers. Because Logstash is licensed under Apache 2.0, you can use it in the way that best suits your needs.

Key Features:
  • Collects, parses, and stores logs for later use
  • Includes a web interface for searching and drilling into all of your logs
  • Ship logs from any source, parse them, timestamp them correctly, index them, and search them

7. Docker

devops-tool-docker

 

An open platform for distributed applications, Docker is an application for DevOps engineers who want to “build, ship, and run any app, anywhere.” With Docker, you can quickly assemble apps from components and work collaboratively.
Key Features:
  • Assemble multi-container apps and run on any infrastructure
  • Compose an app using both proprietary containers and Docker Hub Official Repos
  • Manage all containers of an app as a single group
  • Cluster an app’s containers to optimize resources and provide high-availability
8. New Relic

devops-tool-new-relic

With New Relic APM, DevOps engineers spend less time monitoring applications and more time on building and deploying. A popular, reliable tool, New Relic APM is a great choice for DevOps engineers.
Key Features:
  • Helps in the build, deployment, and maintenance of web software
  • Application monitoring in one place
  • Cross application and transaction tracing
  • Database and availability and error monitoring
9. Gradle

devops-tool-gradle

 

Gradle is a robust tool for automating building, testing, publishing, and deploying software packages and other projects. With the combined power and flexibility of Ant and Maven, Gradle is an open source build automation system which is perfect and very useful for DevOps engineers.
Key Features:
  • Declarative builds and build-by-convention
  • Language for dependency-based programming
  • Structure your build
  • Deep API
  • Multi-project builds
  • Ease of migration
10. Git 

devops-tool-git 

 

Git is a mature, actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel. Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Key Features:
  • Working offline
  • Fast to Work With
  • Repositories Are Smaller
  • Moving or Adding files
  • Ignore Certain Files
  • Branches
  • Check the Status of Your Changes
  • Stash Branches
  • Cherry Pick Changes from Branches
  • Find version that Introduced a bug using Binary Search
These are the most popular DevOps tools which are used by DevOps engineers or practitioners these days. But to make most out of these tools you need to have proper knowledge of these tools like installation process, implementation process, where to you use, how to use, troubleshooting and much more. So, if you think you need help or training for these tools or for DevOps related helps than we are here to assist you with our industry expertise professionals.
Tagged : / / / / / / / / / / / / / / / / / / / /

Docker Command line Reference | Docker Tutorial | Docker Guide

One liner to stop all of Docker containers:
> docker stop $(docker ps -a -q)
One liner to remove all of Docker containers:
> docker rm $(docker ps -a -q)
OR
> docker rm $(docker images -q)
OR
> docker rmi $(docker images -q)
In case of error message Get http:///var/run/docker.sock/v1.14/containers/json?all=1: dial unix /var/run/docker.sock: permission denied
> sudo docker rm $(sudo docker ps -a -q)
To only stop exited containers and delete only non-tagged images.:
> docker ps –filter ‘status=Exited’ -a | xargs docker stop
> docker images –filter “dangling=true” -q | xargs docker rmi
Remove all containers that aren’t currently running:
> docker rm $(docker ps -a -q -f “status=exited*”)
if not the volumes will not be delete !!! (like if you are using a mysql docker image) and all the volumes will be orphans !
> sudo docker rm -f -v $(sudo docker ps -a -q)
Tagged : / / / / / / / /

Docker Training | Docker Course | Agenda | scmGalaxy

docker-training-agenda

Need to learn Docker? This is the training for you! This training provides a soup-to-nuts learning experience for core Docker technologies, including the Docker Engine, Images, Containers, Registries, Networking, Storage, and more. All of the behind the scenes theory is explained, and all concepts are clearly demonstrated on the command line. No prior knowledge of Docker or Linux is required. Training Overview Training

Introduction

o Training Introduction
o What We’ll Learn
o Prerequisites
Introducing Containers
o The Rise of the Virtual Machine
o The Ugly Virtual Machine
o What Are Containers?3
o Containers Under the Hood
o Docker6
o The Future of Docker and Containers
Installing Ubuntu Linux and CentOS Linux
o Module Intro
o Downloading Ubuntu
o Creating a VM to Install Ubuntu
o Installing Ubuntu
o Downloading CentOS
o Creating a VM to Install CentOS
o Installing CentOS
Installing and Updating Docker
o Module Intro1m 22s
o Docker on Ubuntu
o Installing Docker on CentOS
o Updating Docker
o Granting Docker Control to Non-root Users
o Configuring Docker to Communicate Over the Network
o Playing Around with Our First Docker Container
o Wrap-up
Major Docker Components
o Module Intro
o The High Level Picture
o The Docker Engine
o Docker Images
o Docker Containers
o Docker Hub
o Wrap-up
A Closer Look at Images and Containers
o Module Intro
o Image Layers
o Union Mounts
o Where Images Are Stored
o Copying Images to Other Hosts
o The Top Writeable Layer of Containers
o One Process per Container
o Commands for Working with Containers
o Wrap-up
Container Management
o Module Intro56s
o Starting and Stopping Containers
o PID 1 and Containers
o Deleting Containers
o Looking Inside of Containers
o Low-level Container Info
o Getting a Shell in a Container
o Wrap-up
Building from a Dockerfile
o Module Intro
o Introducing the Dockerfile
o Creating a Dockerfile
o Building an Image from a Dockerfile
o Inspecting a Dockerfile from Docker Hub
o Wrap-up
Working with Registries
o Module Intro1m 25s
o Creating a Public Repo on Docker Hub
o Using Our Public Repo on Docker Hub
o Introduction to Private Registries
o Building a Private Registry
o Using a Private Registry
o Docker Hub Enterprise
o Wrap-up
Diving Deeper with Dockerfile
o Module Intro
o The Build Cache
o Dockerfile and Layers
o Dockerfile
o Launching the Web Server Container
o Reducing the Number of Layers in an Image
o The CMD Instruction
o The ENTRYPOINT Instruction
o The ENV Instruction
o Volumes and the VOLUME Instruction
o Module Recap
Docker Networking
o Module Intro
o The docker0 Bridge
o Virtual Ethernet Interfaces
o Network Configuration Files
o Exposing Ports
o Viewing Exposed Ports
o Linking Containers
Troubleshooting
o Module Intro
o Docker Daemon Logging
o Container Logging
o Planning Image Builds
o Intermediate Images
o The docker0 Bridge
o IPTables
o Wrap-up
Lightning Fast Recap
o Module Intro
o Recapping Some of What We’ve Learned
Tagged : / / / / / /

How to Install Jenkins using Docker | Step by step guide | scmGalaxy

Step 1: Installing Docker
$ apt-get install docker (Ubuntu)
$ yum install docker  (RHEL/CENTOS)
Step 2:  First, pull the official jenkins image from Docker repository.
$ docker pull jenkins 

Step 3: Next, run a container using this image and map data directory from the container to the host; e.g in the example below /var/jenkins_home from the container is mapped to jenkins/ directory from the current path on the host. Jenkins 8080 port is also exposed to the host as 49001.

Mapping port 8080 on the host to the container (the web ui), port 50000 to port 50000 (for build agents). Run with `-p 50000:50000` so you can connect JNLP slaves. For port 50000. This is to handle connections from JNLP based build slaves. This will store the workspace in /var/jenkins_home. All Jenkins data lives in there including plugins and configuration.

$ docker run -d -p 8080:8080 -p 50000:50000 jenkins 
This will store the jenkins data in /your/home on the host. Ensure that /your/home is accessible by the jenkins user in container (jenkins user – uid 1000) or use -u some_other_user parameter with docker run.
$ docker run -d -p 8080:8080 -p 50000:50000 -u root -v $PWD/jenkins:/var/jenkins_home jenkins 
 Other Example:
docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins -u root 
This will store the jenkins data in /your/home on the host. Ensure that /your/home is accessible by the jenkins user in container (jenkins user – uid 1000) or use -u some_other_user parameter with docker run. This information is also found in the Dockerfile. So all you need to do is to ensure that the directory $PWD/jenkins is own by UID 1000:
$ mkdir jenkins
$ chown 1000 jenkins
$ docker run -d -p 49001:8080 -v $PWD/jenkins:/var/jenkins_home -t jenkins
How to see the Jenkins log?
$ docker exec name tail -f /var/log/jenkins/jenkins.log
Where name = --name 
Step 3:  Access to j=Jenkins
As we have successfully run Jenkins Container, we can browse Jenkins Web Interface using our Web Browser by pointint to http://ip-address:49001 or http://localhost:49001 according to the configuration.
Tagged : / / / / / / / / / / / / /

Simple Docker workflow – Quick start | Docker Tutorial

docker-workflow
Simple Docker workflow – Quick start
In this tutorials, I am trying to cover the simple quickstart Docker workflow and for the example, I am creating Ubantu containee and using it to showcase this tutorial.
Step 1 – Download the Ubantu image container from the Docker Hub
# docker pull -a ubuntu
Step 2 – Run the ubuntu container and access to ther /bin/bash commands prompt
# docker run -it ubuntu /bin/bash
Step 3 – Stop the container 
# docker stop container_id
How to get the container id?
# docker ps -a
Step 4: Start the container again?
# docker start container_id
Step 5: Exit the running container without stopping the container
# exit
Step 6: Login the running container for bash prompt
# sudo docker exec -i -t 2e56ad1705b1 /bin/bas
For more – Refer 
Tagged : / / / / / / / / /

How to Install Docker in Linux?

install-docker-in-linux
How to Install Docker in Linux?
Note – You should install Docker using root or with sudo access.
Install Docker on Ubantu 
# apt-get update
# apt-get install -y docker.io
# service docker.io start
Install Docker on Redhar / Centos
# yum update
# yum install -y docker.io
# systemctl start docker.service
How to verify the version of docker?
# docker -v
# docker version
How to know docker running?
# service docker.io status (Ubantu)
# systemctl status docker.service (Redhat)
How to check details of Docker clients, deamon, containers, images, drivers, etc
# docker info
How to update Docker version?
==============================================
# wget -q0- https://get.docker.com/gpg | apt-key add –
# echo deb http://get.docker.com/ubantu docker main > /etc/apt/sources.list.d/docker.list
# apt-get update
# apt-get install lxc-docker
# docker version
Configuration post docker installation:
Adding Users to the Docker Group for non-root user
==============================================
# docker run -it ubuntu /bin/bash (as a non-root)
[ permission denied]
# cat /etc/group
# sudo gpasswd -a username docker
# cat /etc/group
# docker run -it ubuntu /bin/bash (as a non-root)
# logout
# login username
Tagged : / / / / / / / / / /

How to get bash or ssh into a running container in background mode?

bash-or-ssh-into-a-running-container
How to get bash or ssh into a running container in background mode?
Step 1: First of all, try to find your active container by running
# docker ps
or
# docker ps -a
Step 2: If the container is not running,
# docker start your_id
Step 3: If we use attach we can use only one instance of shell.
# sudo docker attach 665b4a1e17b6 #by ID
or
# sudo docker attach loving_heisenberg #by Name
If we want open new terminal with new instance of container’s shell, we just need run the following:
# sudo docker exec -i -t 2e56ad1705b1 /bin/bash #by ID
or
# sudo docker exec -i -t loving_heisenberg /bin/bash #by Name
# root@665b4a1e17b6:/#
Step 4: To exit bash without leaving bash running in a rogue process
# exit
Notes:
A reminder for boot2docker users: remove sudo
If you are using docker in Linux, you will have to use sudo along with docker commands.
You should try not to run commands as sudo, rather add your user to the docker group and just run normally.
Tagged : / / / / / / / /

How to install Atlassian Jira using Docker?

install-atlassian-jira-using-docker
Install Atlassian Jira using Docker
Download and Run the jira latest:
docker run –detach –publish 8080:8080 cptactionhank/atlassian-jira:latest
Then simply navigate your preferred browser to http://[dockerhost]:8080 and finish the configuration.
Notes:
JIRA Home location: /var/atlassian/jira
JIRA Installation location: /opt/atlassian/jira
Reference:
Tagged : / / / / / / / / / /

Sonatype Nexus installation using Docker

sonatype-nexus-installation-using-docker

Sonatype Nexus Repository Manager 2

Install a Docker Engine
Installation Instructions can be found here – http://www.devopsschool.com/tutorial/docker/docker-install-and-configuration.html

Download a Sonatype Nexus Image
> docker pull sonatype/nexus

For Sonatype Nexus Repository Manager 2 OSS, To run (if port 8081 is open on your host):
> docker run -d -p 8081:8081 –name nexus sonatype/nexus:oss

For Sonatype Nexus Repository Manager 2 PRO, To run (if port 8081 is open on your host):
> docker run -d -p 8081:8081 –name nexus sonatype/nexus:pro

To determine the port that the container is listening on:
> docker ps -l

To Test
> curl http://localhost:8081/nexus/service/local/status

Browse Following URL
http://localhost:8081/nexus/

It can take some time (2-3 minutes) for the service to launch in a new container. You can tail the log to determine once Nexus is ready:
> docker logs -f nexus

Note
Default credentials are: admin / admin123
Installation of Nexus is to /opt/sonatype/nexus
Notably: /opt/sonatype/nexus/conf/nexus.properties is the properties file.
Parameters (nexus-work and nexus-webapp-context-path) defined
here are overridden in the JVM invocation.

Sonatype Nexus Repository Manager 3

Install a Docker Engine
Installation Instructions can be found here – http://www.devopsschool.com/tutorial/docker/docker-install-and-configuration.html

Clone the Repostory from Gihub
> git clone https://github.com/sonatype/docker-nexus3
> cd docker-nexus3

Build a Image for Sonatype Nexus Repository Manager 3 OSS
> docker build –rm –tag sonatype/nexus oss/

Build a Image for Sonatype Nexus Repository Manager 3 PRO
> docker build –rm –tag sonatype/nexus:pro pro/

For Sonatype Nexus Repository Manager 2 OSS, To run (if port 8081 is open on your host):
> docker run -d -p 8081:8081 –name nexus sonatype/nexus:oss

For Sonatype Nexus Repository Manager 2 PRO, To run (if port 8081 is open on your host):
> docker run -d -p 8081:8081 –name nexus sonatype/nexus:pro

To determine the port that the container is listening on:
> docker ps -l

To Test
> curl http://localhost:8081/nexus/service/local/status

Browse Following URL
http://localhost:8081/nexus/

It can take some time (2-3 minutes) for the service to launch in a new container. You can tail the log to determine once Nexus is ready:
> docker logs -f nexus

Note
Default credentials are: admin / admin123
Installation of Nexus is to /opt/sonatype/nexus
Notably: /opt/sonatype/nexus/conf/nexus.properties is the properties file.
Parameters (nexus-work and nexus-webapp-context-path) defined
here are overridden in the JVM invocation.

Reference
https://hub.docker.com/r/sonatype/nexus/

Tagged : / / / / / / / / / / / /