Show HN: Dockerfile Generator https://ift.tt/Jgdfhm5

Show HN: Dockerfile Generator While it's not hard to write a Dockerfile, I think it's hard to write a good one. Every language has its own quirks, and every framework has a special way of building things. I was looking for a collection of well-written and well-maintained Dockerfiles, but I couldn't find one. Thus, I thought of creating one! I realized it's not enough to have a simple Dockerfile. Sometimes you need other files for your build: nginx.conf, php.ini, my.cnf, etc. I also realized that people have different preferences. In Node, some use NPM, some use YARN, some use PNPM. In PHP, some use Apache, some use FPM with Nginx. So I build a set of "builders", Dockerfile generators. You define a form using JSON Schema, and then define a function "generate" that returns an array of files. In the future, I can make a CLI tool that will generate prompts, similar to how the form is generated on the web. For now, I only implemented a builder for Next.js based on their official Dockerfile example. Source-Code: https://ift.tt/ca7vjPN Playground: https://ift.tt/D4JblNx --- 1. Do you have any feedback for this project? 2. Can you link some good Dockerfiles that I should include? https://ift.tt/ca7vjPN May 13, 2022 at 12:10AM

Comments

Popular Posts