Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure session.save_path and expose it as volume #201

Closed
mikehaertl opened this issue Mar 17, 2016 · 2 comments
Closed

Configure session.save_path and expose it as volume #201

mikehaertl opened this issue Mar 17, 2016 · 2 comments

Comments

@mikehaertl
Copy link

Right now session.save_path is empty (default) and so the session data is stored to /tmp. This directory is not exposed as a volume. So by default we loose all sessions whenever a container is dropped and newly built. So containers aren't really "ephemeral" as they store some state information.

To avoid permission issues I think it's better to configure a directory for session.save_path, e.g. /var/php/sessions and make this available as a volume, so that it's easy to mount a host volume there.

@tianon
Copy link
Member

tianon commented Aug 29, 2016

While I agree at the high level, I don't think it's reasonable for us to make this change at the base php level -- the default configuration of PHP stores sessions in /tmp, so IMO it makes sense to stick to that. That being said, I'd love to see this documented as a container-specific concern that users of this image might be interested in fixing or working around in some way over in the documentation for the image. 👍

Thanks!

@tianon tianon closed this as completed Dec 22, 2017
@blasto333

This comment was marked as off-topic.

@docker-library docker-library locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants