Hello,
The container file system is inherently stateless. Any files you modify directly inside a container will be overwritten by the default content of the Image every time it restarts or redeploys; this is by design in Docker. To make changes permanent, you need to "write" the changes into a new Image, rather than into the running container.
Since you mentioned that you are maintaining this project yourself, I recommend switching to one of the following deployment methods:
Method 1: Incorporate changes into the source code and deploy directly from Git via Zeabur (Recommended)
- Fork or create a new Git repo and include the source code corresponding to the original Docker image.
- Commit your changes.
- Create a new service in Zeabur and use the "Deploy from GitHub" method, allowing Zeabur to automatically build from your repo.
- From now on, whenever you push code, Zeabur will automatically rebuild, and your changes will not be overwritten by the upstream Image.
Method 2: Build your own Docker Image and point to the new Image
- Incorporate your changes into the Dockerfile or source code and build your own Image.
- Push it to your own registry (GitHub Container Registry or Docker Hub are both fine).
- In your Zeabur service settings, point the Image to your own Image (e.g., ghcr.io/<your-account>/<your-image>:latest).
- This way, when it restarts, it will pull the version you maintain.
If you only have a few configuration file changes, another option is to use Volumes to mount specific directories for persistent storage. However, this method is only suitable for saving "data" and not for saving "code modifications," so it is not an ideal solution for your situation.
Please confirm if these directions meet your needs. If your actual scenario is different, feel free to describe how you are currently making changes and what your goals are, and I can help you find a more specific approach.