The "containerization" of software applications future-proofs them, helps in their long-term preservation, makes them portable across different hardware platforms, ensures reproducible results, and makes them convenient to disseminate. Docker and Singularity are two popular software technologies for containerizing scientific applications and are widely supported on different hardware platforms. However, their adoption involves a steep learning curve, especially when it comes to developing secure and optimized images of the applications of interest. A large number of domain-scientists and scholars are usually not formally trained at containerizing their applications with Docker and Singularity, and spend a significant amount of their time in porting their applications to different cloud computing and supercomputing platforms. The process of porting applications having multiple software dependencies and sensitivities to specific software versions can be especially arduous for such users. To assist them, this project is developing BASIL - a tool for semi-automatically containerizing the scientific applications, frameworks, and workflows. This project will deliver BASIL through a web portal, as a command-line tool, and through APIs. BASIL has a broad applicability across multiple domains of deep societal impact such as artificial intelligence, drug discovery, and earthquake engineering. By enabling the preservation of valuable legacy software and making them usable for several years in future, BASIL will save cost and time in software rewriting and software installations, and thus contribute towards advancing the prosperity of the society. The project will result in educational content on “Introduction to Containerization” and students engaged in the project will develop valuable skills in the areas of national interest such as supercomputing/High Performance Computing (HPC) and cloud computing. <br/><br/>BASIL will be the first tool of its kind that can semi-automatically generate secure, optimized, and trustworthy container images with clear information on how to use the images under appropriate licenses. The rules for optimizing the images will be derived from expert knowledge and best practices, such as multi-stage builds and reordering the sequencing of commands to take advantage of caching so that the overall time involved in building the images is reduced. Users of the BASIL tool will provide the recipes for building their applications/workflows in one of the following forms (1) Makefiles/CMakefiles, (2) scripts, (3) commands, or (4) a text-file with predefined keywords and notations using templates provided by the project team. These recipes will be parsed, and Dockerfiles or Singularity definition files will be generated. The parser developed in this project will be another novel contribution of the project. Using a generated Dockerfile or Singularity definition file, a Docker or Singularity image will be built. Next, the image will be scanned for any vulnerabilities, signed, and if the user desires, released in public registries with appropriate licenses. These container images can be tested using the BASIL web portal, and can be pulled to run or deploy on diverse hardware platforms. <br/><br/>This award by the Office of Advanced Cyberinfrastructure is jointly supported by the Physics at the Information Frontier in the Division of Physics within the Directorate for Mathematical and Physical Sciences.<br/><br/>This award reflects NSF's statutory mission and has been deemed worthy of support through evaluation using the Foundation's intellectual merit and broader impacts review criteria.