Today, I was working with an application that uses Oracle as the database. We decided dockerize the application to make it easy for fellow developers to work with the beast. We found a working Oracle docker image by sath89. Oracle 12c Docker image is close to 5.7GB on disk so we are not talking about lightweight containers here :). Once image was dowloaded, running image was as easy as running the following command.
Continue reading “Using wait-for-it with Oracle database docker image”
Amazon ECS: The Modern Cluster Manager Part 1
In the last few posts, we looked at various Docker utilities and how XL Deploy can make it easy for enterprises to adopt and use Docker. Docker streamlines software development and testing for teams that have started embracing it. The package once deploy anywhere (PODA) capability of Docker minimises the issue of environmental (like staging, quality assurance, and production) differences. Continue reading “Amazon ECS: The Modern Cluster Manager Part 1”
Upgrading Docker Compose to latest version
If you use Docker for Mac or something similar, Docker Compose will be installed along with it. Docker Compose has a different release timeline for Docker for Mac so you will not be able to try latest version of Docker compose until you upgrade Docker for Mac. This is limiting. You should be able to install Docker compose independently. To achieve that, you can run following command
$ composeVersion=1.13.0 $ curl -L https://github.com/docker/compose/releases/download/$composeVersion/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose$ chmod +x /usr/local/bin/docker-compose
In the above commands, $
signify bash prompt. You don’t have to type it. Now, you can check Compose version using the command shown below.
$ docker-compose version
Talk: Container Performance Analysis
Today, I watched DockerCon 2017 talk on Container Performance Analysis. Talk is given by Brendan Gregg, Senior Performance Architect at Netflix. In his talk, he shares various linux tools that can help you understand performance of your container platform. It is a great talk for anyone trying to do performance analysis of containers. In one of his slides, he shared 10 tools that he will use to start the investigation.
- uptime to check load averages
- dmesg | tail to check kernel errors
- vmstat 1 to see overall stats by time
- mpstat -P ALL 1 to check CPU balance
- pidstat 1 to check process usage
- iostat -xz 1 to disk I/O
- free -m to check memory usage
- sar -n DEV 1 to check network I/O
- sar -n TCP, ETCP 1 to view TCP stats
- top for overview
Multi-stage Docker Image Build for Java Applications
To build a Docker image for a Java application, you first need to build the Java project. Java build process needs JDK and a build tool like Maven, Gradle, or Ant. Once Java binary artifact is produded, you can package the binary in a Docker image. For running a Java binary, you only need JRE so you don’t have to pay the cost of bundling the whole JDK.
You can read full blog at https://blog.xebialabs.com/2017/05/25/multi-stage-docker-image-build-for-java-applications/
5 Docker Utilities You Should Know
Docker community is very active, a lot of useful utilities keep popping daily. It is difficult to keep check of all the innovation happening in the community. In the following post, I have collected some interesting and useful Docker utilities which I use in my daily work. These utilities makes me more productive, otherwise would have been a manual work.
In this post, I will cover watchtower, docker-gc, docker-slim, rocker, and ctop utilities. You can read full blog at https://blog.xebialabs.com/2017/05/18/5-docker-utilities-you-should-know/.
Docker Machine Error Unable to Query Docker Version
Today, when I created a new docker machine I started getting Unable to query docker version: Get https://192.168.99.101:2376/v1.15/version: x509: certificate is valid for 192.168.99.100, not 192.168.99.101
To fix this error, run the following command.
docker-machine regenerate-certs default
Please change default with name of your docker machine.
Docker Machine — dial tcp: i/o timeout error on Mac
Today, while trying to use Docker Machine to create a local docker host on my macbook I was greeted with an exception as shown below.
$ docker-machine create -d virtualbox dev Creating CA: /Users/abc/.docker/machine/certs/ca.pem Creating client certificate: /Users/abc/.docker/machine/certs/cert.pem Image cache does not exist, creating it at /Users/abc/.docker/machine/cache... No default boot2docker iso found locally, downloading the latest release...No default boot2docker iso found locally, downloading the latest release... Error creating machine: Get https://api.github.com/repos/boot2docker/boot2docker/releases: dial tcp: i/o timeout You will want to check the provider to make sure the machine and associated resources were properly removed.
I tried to clear the local docker cache by deleting ~/.docker
directory but each time I got the same exception. After a bit of trial and error I found out that it is because of the non-resolvable DNS server in the network settings. You can view your DNS server by going to System Preference > Network > Your internet connection > DNS. Make sure you are using a valid DNS server name. In case you don’t know a valid DNS server then you can use Googles **8.8.8.8** server. Now, next time you will use
docker-machine create` command you will be able to successfully create a machine.