A small titbit to share today, the Makefile.

A Makefile can be used to define sets of commonly used commands to save time and to ensure the commands run in the correct order with needed pre-requisites.

For example, you can define a list of build-related commands under a target called “build”.

    docker-compose build image-1 
    docker-compose push image-1 

Then next time you can execute the build by calling “make build”, instead of manually typing out all the commands in sequence.

Recently I have started to use it more often, as it really simplifies the development and deployment steps.

(p/s: In case you are wondering about the GPG_TTY environment variable, that is needed for GPG to properly prompt for the password when docker is authenticating with its private container registry.)

Leave a comment

Your email address will not be published. Required fields are marked *