Posts

Showing posts with the label docker

Colima - Drop In replacement for Docker Desktop for Mac and Linux

Colima ( Co ntainer on Li nux Ma chines) is an open source alternative and drop in replacement for Docker Desktop on Mac and Linux. https://github.com/abiosoft/colima It is simple to setup and run containers without the need for sudo or root access. Images can be pulled form both Docker hub ( https://hub.docker.com ) or Amazon's public registry ( https://gallery.ecr.aws ) Amazon's registry is more permissive or friendly with pull rates for both clients and non-clients of AWS. This article show the setup and basics of running containers on mac. Installation command for Linux can vary based on the distribution type, hence please refer to official documentation for up-to-date steps at  https://github.com/abiosoft/colima/blob/main/docs/INSTALL.md Installation on mac: brew install docker  brew install docker-buildx brew install docker-compose brew install jq brew install colima Setup docker compose as docker plugin mkdir -p $HOME/.docker/cli-plugins ln -sfn $(which docker-compose) ...

Install Docker Engine and Compose on Linux machines (for developers)

Install docker: Know the linux architecture type using uname -m mkdir -p $HOME/tools/docker_engine Download latest static binary from https://download.docker.com/linux/static/stable/ to $HOME/tools/docker_engine sudo groupadd docker sudo gpasswd -a ${USER} docker newgrp docker find $HOME/tools/docker_engine -type f -name docker-*.tar.gz | xargs -I {} mv {} $HOME/tools/docker_engine/docker-engine.tar.gz tar -xvzf $HOME/tools/docker_engine/docker-engine.tar.gz -C $HOME/tools/docker_engine chmod a+rwx -R $HOME/tools/docker_engine/* ls -1 $HOME/tools/docker_engine/docker | xargs -I{} sudo ln -sfn $HOME/tools/docker_engine/docker/{} /usr/bin/{} Start docker service manually in the foreground sudo dockerd press Ctrl+C to stop/kill the docker engine Start docker service manually in the background sudo su nohup dockerd > /dev/null 2>&1 & exit Kill the docker service running in the background sudo ps -Aef | grep dockerd | grep -v grep | tr -s ' ' | cut -d' ' -f2 |...

Docker save and load images offline

 In some rare occasions, it was beneficial for me to save (export) the docker as a local file and load (import) the local file as docker image. Hence, I am posting the commands to save, load and tag the images to enable offline working with docker. In order to save the image, first we need to pull the image from a docker registry (default docker hub or any other registry). Pull docker image: docker pull postgres:10.6 Save (export) docker image: docker save -o /tmp/postgres-10.6.tar postgres:10.6 Load (import) docker image: docker load -i /tmp/postgres-10.6.tar See the loaded image: docker images postgres:10.6 Create a new tag from the loaded image: docker tag postgres:10.6 org.example/postgres:10.6

minikube as drop in replacement for Docker Desktop (Mac and Windows)

For a very long time, development time dependencies like postgres (database), kafka (message broker) was run using docker desktop (Docker for Mac / Docker for Windows). However due to recent changes to licensing, docker desktop is not free for all organisations. As a developer, if you are in an organisation who can't provide Docker Desktop, then minikube can be used as a drop in replacement for Docker Engine, so that your dependency scripts using docker cli can continue to work. The following contents explains the bare minimal commands needed to run minikube which will work if you are running dependencies using docker cli via: Shell scripts Maven docker plugin Gradle docker plugin TestContainers IDE (Intellij / Eclipse / VS Code) Plugin Install minikube: https://minikube.sigs.k8s.io/docs/start/ Start minikube: minikube start Stop minikube: minikube stop Delete minikube cluster: minikube delete Delete all minikube clusters: minikube delete --all See minikube dashboard: minikube dash...

Docker Community Edition download without login

Docker recently changed their download mechanism, which prevented users from downloading the Community Edition without log in. In my opinion, the registration and login should be an optional step instead of a mandatory field. Hence I am listing the download link for Mac OS and Windows OS that allows downloading the Docker Community Edition without having to register an account with login. Mac OS: https://download.docker.com/mac/stable/Docker.dmg Windows OS: https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe

Blazemeter Taurus load testing and offline jmeter html report

Recently I had used Blazemeter Taurus for load testing my application and I was quiet impressed with the features offered by Taurus. It is not a new tool by itself, instead it makes use of existing load testing tools like Apache JMeter or Gatling. However it offers enough abstraction to users from the underlying load testing tool using YAML configuration files. Advantages of using Taurus over JMeter 1) JMeter uses single jmx xml file to simulate the load test, which makes it hard for more than one person to work on the single jmx file and resolving conflicts might turn tricky 2) Easy to review changes made to the Taurus YAML file on commit by commit basis to understand the changes made to the load testing. This is especially handy during pull request process 3) Easy to run in non-interactive command line mode, so easy to integrate with CI tools 4) Official docker image provided by Blazemeter Taurus, which required minimal setup to run load test in development machines and also ...