Skip to content

raioramalho/mkdfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐳 mkdfile - Make DockerFile

Gerador de Dockerfile customizado com suporte a multistage build.
Escrito em Python + Click + Jinja2 para facilitar a criação de imagens Docker para projetos comuns.

🚀 Imagens suportadas

  • node
  • python
  • nginx
  • go

🛠️ Requisitos

  • Python 3.8+
  • pip

Instale as dependências com:

pip install -r requirements.txt

🍺 Instalação via Homebrew

Também é possível instalar utilizando o Homebrew. Primeiro adicione o repositório e depois instale:

brew tap raioramalho/mkdfile https://github.com/raioramalho/mkdfile
brew install mkdfile

📦 Como usar

Cada imagem possui um subcomando específico. Execute python cli.py --help para ver todas as opções.

Node.js

python cli.py node [--tag 18] [--variant alpine] [--multistage] [--output Dockerfile]
python cli.py node --list  # listar tags disponíveis

Python

python cli.py python [--tag 3.11] [--variant slim] [--multistage] [--output Dockerfile]

Nginx

python cli.py nginx [--tag 1.25] [--variant alpine] [--output Dockerfile]

Go

python cli.py go [--tag 1.20] [--variant alpine] [--multistage] [--output Dockerfile]

Listar imagens

python cli.py img --list

Versões disponíveis

python cli.py versions

📁 Estrutura

.
├── cli.py                # Entrada principal da CLI
├── generators/           # Lógicas de geração para cada linguagem
├── templates/            # Templates Jinja2 de Dockerfile
├── requirements.txt      # Dependências
└── README.md             # Este arquivo

📄 Licença

MIT © Alan Ramalho

🙏 Créditos

Projeto mantido por Alan Ramalho ramalho.sit@gmail.com.