I have docker compose file:
x11:
network_mode: host
container_name: x11
image: dorowu/ubuntu-desktop-lxde-vnc
restart: on-failure
environment:
- RESOLUTION=1920x1080
my_app:
network_mode: host
container_name: my_app
image: my-image-path
restart: on-failure
depends_on:
- x11
environment:
- LANG=ru_RU.UTF-8
- DISPLAY=:1
entrypoint:
./start_script
Sometimes, during my tests my application crashes. And because I have option "restart: on-failure" it automatically restarts. The problem is that the state of the application is saved at the time of the crash, for example some windows remain open. Is there a way to delete the data in the container on restart or make it so that a new container is created each time?