What’s a session in Docker? Docker is for isolation, it only containerizes the application you are running. I don’t think it will add any session or caching.
The topic is still marked as solved making the following post the solution:
Please remove the solution flag by clicking on the “Solution” label and click on the heart icon as well if you accidentally clicked on the other option originally instead of liking @bluepuma77 's post.
Regarding your question, you are trying to solve something not really related to Docker. The way you can solve it is the same as without Docker. You need to get log messages and figure out what causes it. You cans earch for “HTTP 419” to find some tips like here:
In your case, the container has the same role as a physical webserver or a virtual machine would have and you will need the same debugging methods. The only difference is how you get the logs. Probably not by reading files inside the container, but it depends on the app. If it logs to files, then you need to read the log files. If it logs to the standard output and error streams, you can use the docker logs. command or docker compose logs
The Laravel documentation can give you more ideas, but you can search directly for “Laravel login http 419” to find something like this:
It doesn’t mean this is your problem, but if you need any help with configuring Laravel properly, Laravel users can give you a better guide. If you are using a Laravel Docker image, you can check the description of the image too.