Flyway is designed to be as lightweight as possible. We recommend that you need as an absolute minimum:
Though clearly the higher specification the machine, the better your experience will be. For more details, refer to the Oracle guidelines for running Java-based applications. Disc space can be saved by removing unwanted JDBC drivers, and also the embedded JRE if you have an alternative one already installed.