Category Archives: Dockers
Docker – 3 Different Ways to Create Images
This article represents 3 different ways using which one could create a Docker image. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. In the command below, hub-user is the name of your user account on http://hub.docker.com, repo-name is the repository name that you create and tag is the name you assign to specific image (e.g., dev, testing etc). Following are the different ways: docker build -t <hub-user>/<repo-name>[:<tag>] -t <dockerfile> . docker tag <existing-image> <hub-user>/<repo-name>[:<tag>]. The “existing-image” uis the name of image which already exists in your local repository. docker commit <exiting-container> <hub-user>/<repo-name>[:<tag>]. This command is handy when you …
Docker – Quick Java 8 or Java 7 Dev Environment with Dockers
This article represents code samples which could be used to build and start Java 7 or Java 8 Docker containers appropriately based on the needs with a single script and command such as “./startJava.sh -v 7 Java7” for Java 7 and “./startJava.sh -v 8 java8” for Java 8. This would be useful to try and test your Java code against Java 7 and Java 8 versions very easily based on the fact that you could start both Java7 and Java8 containers simultaneously and, run your code in these containers at the same time for testing. Please feel free to comment/suggest if I missed to mention one or more important points. …
Docker – How to Build & Get Started with Java 7 Container
This article represents tips and code samples on how to build a Java7 docker image and start Java 7containers. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Dockerfile to Build Java 7 Image Command to Start Java 7 Container Dockerfile to Build Java 7 Image Following is the code for Dockerfile which could be used to build Java 7 image: FROM centos:centos6 RUN mkdir /opt/jdk RUN cd /opt RUN yum -y install wget tar RUN wget –header “Cookie: oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz RUN tar -zxf jdk-7u79-linux-x64.tar.gz -C /opt/jdk RUN …
Docker – How to Access Root User without Password
If you have been trying different passwords to access root user in a docker machine terminal, do not worry. Following is the command which would get you access to root user without needing you to enter any password 🙂 sudo -i One could access the docker machine from docker terminal with following command: docker-machine ssh <docker-machine name such as default>
Docker – How to Install Docker Compose on Windows
This article represents tips and code samples which could be used to install Docker-compose on Windows. The instructions could also be found on this page. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points: Make sure you have Docker Engine version 1.7.1 or greater. Open a putty terminal accessing the “default” docker-machine or do “docker-machine ssh default”. You could put name of any other machine based on docker-machine in which you want to install docker-compose. Login as a Superuser using command “sudo -i” Install the docker-compose using following command: Do note that one would …
Dockers – How to Get Started with Spark on Windows
This article represents tips on how to get started with Apache Spark on Windows using Dockers. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. If you are familiar with Dockers, the instructions below would help you get started with Spark in no time. Download the Spark from https://spark.apache.org/downloads.html page. Remember to select a package type with option such as “Pre-built…”. Once the zipped files are downloaded, unzip the files under the location “C:\Users\<Username>” Build Java8 image and start the container. Follow the instructions on this page, http://vitalflux.com/dockers-how-to-get-started-with-java8-dev-environment/. Once the container is started, go to the folder where you …
Dockers – How to Get Started with Java8 Dev Environment
This article represents take away code samples and tips on how to setup Java8 container using Dockers and get started. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Java 8 Image Dockerfile Install Scripts to Install and Start Java8 Env Java 8 Image Dockerfile Following is Dockerfile for creating Java8 image. Name the file as java8_base.df. # Base is the Centos environment FROM centos:centos6 # Make the directories under which Java 8 will get installed RUN mkdir /opt/jdk RUN cd /opt # Install wget and tar which …
Code Samples to SSH into Docker Machine Virtualbox
This article represents quick code sample which would help you ssh into a docker machine. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. As you double-click Docker Quickstart Terminal, it opens up a terminal window thereby starting “default” docker-machine. If you want to login to this docker-machine, you could do that using following: Use Putty to login. As you open Putty, enter the IP such as 192.168.99.100 and click open. It would open up a terminal. Enter “docker” as username and “tcuser” as password and that is it. Use command such as “docker-machine ssh default” in the docker …
Top 7 Reasons to use Dockers for Testing Your Application
This article represents some of the key reasons on why one should consider using dockers for testing their applications. Some of the points in this blog is taken from the video, Stop being Lazy and Test your Software presented by Laura Frank, currently working in CodeShip. Do check out videos for gathering greater details. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: What are key testing bottlenecks? How could Dockers alleviate Testing Bottlenecks Key Testing Bottlenecks Slower performing tests or slower running tests due to bad coding or not sufficient infrastructure Traditional testing …
Dockers – How to Get Started with Cloudera
This article represents information and code/scripts which could be used to get started with Cloudera using Dockers. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Docker machine configuration Cloudera & Dockers Test the Cloudera installation Scripts to install & run Cloudera Docker Machine Configuration To run the cloudera in docker container, one would require to do following configuration to the Docker machine. Open Oracle VM Virtualbox Manager. Stop the default machine. Then, change the settings as shown below. Change the processor (core) setting to 2 Change the memory …
Docker – Create Javascript Development Environment
This article represents Dockerfile code sample which could be used to create Javascript Development environment. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Javascript Development environment Dockerfile representing JS Development Environment One script used for Images/Containers Javascript Development Environment Following tools are installed to make Javascript development environment. NodeJS runtime Typescript compiler Grunt-cli Bower JSHint for code quality check Jasmine for unit tests Dockerfile representing JS Development Environment Following dockerfile (nodejs_base.df) could be used to create NodeJS base image and represents NodeJS runtime. # Use centos6 base image …
TypeScript Hello World Program – Code Sample
This article represents code samples on writing Hello World program with TypeScript. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Setting up Typescript Development environment TypeScript Hello World Program Setting up Typescript Development environment Use the instructions on following page to setup the TypeScript development environment. Docker – How to setup Typescript Development Environment TypeScript Hello World Program interface Person { firstname: string; lastname: string; } function hello(person: Person) { return “Hello, ” + person.firstname + ” ” + person.lastname; } var calvin = {firstname: “Calvin”, lastname: “Hobbes”}; …
Docker – How to Create Javascript Runtime using NodeJS
This article represents information on how to install Javascript runtime in order to compile/interpret JS file for the purpose of testing. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Install NodeJS Runtime with Docker Container Script to Create NodeJS Container Test JS script execution Many a times, we come across the need to write the Javascript file and run it using a Runtime without the need to test the Javascript code using an HTML page. We could achieve this objective using NodeJS runtime. We shall use Docker to …
Docker – How to Setup Typescript Development Environment
This article represents code samples on how to get setup with Typescript development environment with Dockers. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Build NodeJS & NPM image Build Typescript image Create Typescript container One script to create images & Typescript container Build NodeJS & NPM Image Following code can be used to create NodeJS/NPM image. # Use base image of centos6 FROM centos:centos6 # Enable Extra Packages for Enterprise Linux (EPEL) for CentOS RUN yum install -y epel-release # Install Node.js and npm RUN yum install …
Dockers – Top 5 Use Cases for Dockers Adoption
This blog represents top 5 use cases why IT enterprises (product & software-service vendors) should consider adopting Dockers in their SDLC. 1. Quicker Developer Onboarding into Projects: We all are aware of development environment setup related issues when taking about developers on boarding. In my recent experience, I almost spent a week to get manually setup for a recently started project comprising of just 3-4 members. I had to refer to couple of documents which was last updated few weeks back and thus was not up to date. This led to productivity loss. In my earlier experience, I saw the usage of VMs images for developer onboarding. This worked very …
I found it very helpful. However the differences are not too understandable for me