[FEATURE] Add Separate Dockerfile
s for Dev & Production Builds
#5699
Labels
Type: Enhancement
Most issues will probably ask for additions or changes.
Describe your feature request
Splitting the Dockerfiles into two: one for development and one for production.
The development Dockerfile will keep the current multi-stage build process, while the production one will be built from
scratch
, with no unnecessary dependencies likechromium
. This will make the production image leaner, more secure, and easier to maintain.Describe the use case of the feature
Improve our container deployment process by using a super minimal image for production. Since we don’t need stuff like
chromium
and other build-related packages in production, thescratch
-based image will keep things small and simple, without any extra bloat.The development
Dockerfile
will keep all the tools and dependencies needed for local testing and building. The productionDockerfile
will be stripped down and optimized for deployment - ready to be pushed to container registries (Docker Hub/GHCR/Artifact Registry). This setup also makes things easier when we need to update/rollback images in cloud envs.Describe alternatives you've considered
No response
Additional context
Here's what the Dockerfiles would look like:
nuclei/Dockerfile
Lines 1 to 15 in c8cc419
The idea is to keep both files in the repo (maybe as
Dockerfile
for dev andDockerfile.prod
for production). This way, the dev Dockerfile keeps all the build stuff, and thescratch
one will be used for production.Additional references:
The text was updated successfully, but these errors were encountered: