Skip to content

IvoNet/docker-make

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Makefile project

This project provides a convention over configuration universal build Makefile for docker projects.

Blog

This blog post tells all about it.

install

brew tap ivonet/cli
brew install docker-make

Convention

if you use this convention everything should work just fine:

.
├── Makefile
├── makefile.env
├── README.md
├── hello-world
│   └── Dockerfile
├── ngnix
│   └── Dockerfile
├── node
│   ├── Dockerfile
│   ├── VERSION
│   └── src
│       ├── index.js
│       ├── index.html
│       └── angular.js
└── payara
    └── Dockerfile
    

Usage

example usage:

mkdir -p example-project/hello-world
cd example-project
echo "FROM busybox\nCMD [\"echo\", \"Hello, world!\"]" >hello-world/Dockerfile
echo "VERSION=1.0\nREGISTRY=$USER">makefile.env
docker-make
# Show help
make help
# make all projects
make build 
# make single project
make hello-world

VERSION

if you put a VERSION file in a folder with a Dockerfile and put only a version in it it will override the default version as described in the makefile.env

pre-make.sh

if you put a pre-make.sh script in the folder with a Dockerfile that is the script that is run by make before running a docker build.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published