Store your Docker Images in AWS ECR service


Docker has been the new buzz word of Development, Infrastructure and DevOps teams around the world for last two years and I take a long time to understand that Amazon AWS and Docker can live together helping each other and make people happy.

Actually Amazon takes this time too and saw lot of subscribers migrating to another PaaS providers just to use Docker containers instead EC2 instances and their counter attack was offer a complete platform to support Docker containers using all features and benefits of AWS cloud:  ECS (EC2 Container Service).

It works as a scheduler resource manager for your Docker containers/architecture offering load balancing, automatic scaling (growth and shrinking), billing by containers and other great and funny stuffs.

In this articleI will talk just about ECR (EC2 Container Registry) and it works as a private docker image repository allowing Docker engineers make your images on their local development environments and publish it in a central repository to your team.

It is very useful to not ask you build your images locally every time you need to install/update some container. For instance imagine you have to update 3 web servers with the same application (Spring Boot app) and in old times you have to copy this artifact to each server and update each one manually or using a Chef or Puppet tooling. If you need to upgrade hardware settings (CPU/RAM/Disk) you need an engineer to do this for you.

With Docker you just have to make your infrastructure and deployment steps as source code (Dockerfile), build it and publish to some registry.

Using DockerHub as deployment solution

Using DockerHub as deployment solution

Docker has a public registry named DockerHub but you won’t publish your corporate apps there right? Amazon ECR works as a private registry for you and you just have to pull your images and run it inside your Docker Container Host.

To start using it for you, please follow these steps:

1) goto to ECS


2) If your region doesn’t support it yet, I suggest you to use West Virginia because it is more cheap 😉


3) On you main screen, click on create repository


4) Choose a name for your repository and REMEMBER: this is your image name WITHOUT version. Please create one repository to EACH image


5) Next window will show you the steps to login, build, tag and push.


6) After you push your image you will see something like this:


7) To use it on server to run it you just have to

In this case I built a base image for Ubuntu 16.10 containing some default settings and locale set to en_US.UTF-8 (I will talk about it in other post).

I expect you enjoy this little HOWTO.

GIT bash-completition in Mac OS X


Yes! GIT has a command statement competition plugin that helps you to be a better person.

To enable this feature in Mac OS X you will need install it through homebrew.

and add to your ~/.bash_profile

And be happy!

How to use S3 Buckets as Maven Repositories


So you are a developer and don’t know where can you host your private Maven release repositories? I am using Amazon S3 buckets and I am very happy!

You can do it in two situations listed bellow.

Maven Release

The release process still the same (I promise to write another article about maven release process) you just have to:

1) add to your ~/.m2/settings.xml your bucket credentials where username is your key and password is your secret.

2) add in your project pom.xml the references to your bucket as a Maven repository

and inform to Maven use a build plugin to enable your project to use S3 protocol

If you want to deploy your snapshot please

and to make a complete release try

Maven Deploy Manually

If you need to deploy some JAR file to your repository to enable your team to build your project and avoid download wrong versions or broke your local/CI builds you can enable Maven to upload you file to S3 bucket.

1) You need to enable Maven core to upload to your bucket using S3 protocol using an extension. To do this you just have to create ${CURRENT_JAR_FOLDER}/.mvn/extensions.xml.

You will add a Spring extension that enable your Maven core to upload to S3 repositories.

2) You must use this Maven statement to upload your JAR file

3) To use your JAR in your Maven pom.xml you just have to implement last section and add your JAR as a dependency.


Spring @Scheduled cron expression


Holly crap! This week a customer sent me a message on WhatsApp complaining:

WTF! I received dozens of e-mails containing our weekly calls report and please drop me from this distribution list! I asked one single report per week not dozens!

Ok … now it is my turn to say WTF! Reviewing our weekly releases in LigFlat Telecom I figured out we deployed a version where we migrated several scripts in Bash/PHP to Java using SpringBoot Microservices Architecture and one of them was wrong because we didn’t test the CRONTAB expression for Scheduled beans.

In Spring 4, to schedule a bean you just have to add a @Scheduled annotation on your method with a little CRONTAB expression and it will be performed automatically.

So just to remember you

second, minute, hour, day of month, month, day(s) of week

Please don’t forget second in beginning of expression!

You also can schedule your methods to run every Milliseconds.

You also ask to delay first execution because it is always immediate for fixed milliseconds.

I expect you enjoy it and if you want more about it please go to Spring documentation HERE.

Migrating GIT repositories to another server


After google all Internet searching a good solution to migrate GIT repositories from one server to another (i.e. from GitHub to BitBucket) and follow my cookbook.


How to reset a folder to specific revision in GIT


After spent a valuable time to understand a bug, I realized the problem was a code reformat that I performed in my InteliJ Idea and i had to rollback just one folder inside the same repository and set it to a specific revision and after try a lot of possible solutions I think it is the best.

Register a alias to to all job for you

Then just try

or for whole repository


How check trace log in Flash Apps in Mac OS X


Sometimes we need to change some legacy Flash/Flex and we need to debug the stack trace exception. Yeah! Flash player has a log file where you can check all log entries from your SWF.


  1. Go to:
  2. Scroll down the page to find the latest “Flash Player…Projector content debugger” for the platform you are working on. E.g. I use “Download the Macintosh Flash Player 11.5 Projector content debugger (ZIP, 15.24MB)”
  3. Click that link to download the stand-alone FP Debugger.
  4. Copy the executable (.app on Mac, .exe on Windows, etc) to the location of your choice.

Locating your mm.cfg

In Mac OS X it should be in /Library/Application Support/Macromedia/mm.cfg or in your home ~/ folder and just add this

Locating your flashlog.txt

Just tail ~/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt.

HOWTO Apache redirect URLs


Another common issue on DevOps is how make redirections using Apache HTTP and in fact it is very simple.

It will send a Temporary Redirect (302) for your browser containing the new URL to you browser access immediately, but you also can specify a redirection status.

I hope you have fun 😉

HOWTO detect if JDK 1.6 is available on Mac OS X El Capitán


If you need for any reason use JDK 1.6 in Mac OS X El Capitán (Yosemite too), you should use this very useful command.

If it returns blank you don’t have it and you may need install XCode or take a look on this article.

Thanks Irfan Durmus (@irfandurmus)!