Every time a container is rebuilt, all dirty files and changes are reverted and the container is re-created from the ingredients specified in the configuration.
If you have files that you want to persist for every build of a container, you can use the Files & SSH Keys tool to add them.
- Go to the configure page and find the container configuration of the container you want to add the files to.
- Click on the Files & SSH Keys tool,
- Click on the "Add.." drop down and then on "File".
- Click on "Choose" to locate the file you want to add; specify the Destination path of the files inside the container. You can also add a script that will be executed after adding the file during the container build process. Once you are done, click on "Add File" to complete the process of adding the file.
- Click "Save & Build" to build the Container with the file you have just permanently uploaded.
It is important to note that all the files are listed in the order they are added and executed on the build container. You can change this order using the "3 lines" symbol next to the file name.