Rocket.Chat is open source and flexible for customization and modifications.
We do not encourage developers to make changes from their fork but instead focus on building the same codebase that can be customized for every user.
So if you are customizing Rocket.Chat code base we are assuming you are a developer.
To customize Rocket.Chat from the code, a developer should be able to take a look at our codebase and see how to build and then package in their desired format
We cannot extend further on any specific customization that can be made with the codebase since it is different for everybody.
Deploying Customize version of Rocket.Chat
To build or create a custom deployment option of Rocket.Chat be it a Docker image or snap package, we advised you to take a look at our Dockerfile and build script which contains everything you need to work with.