Skip to content

Conversation

@md5
Copy link
Contributor

@md5 md5 commented Feb 28, 2015

Forgot I created this branch last week. Opening this PR for discussion as much as anything. It seems reasonable to me for service containers to use VOLUME /run/MYSERVICE if they have a dedicated /run directory.

Fixes #50

@md5
Copy link
Contributor Author

md5 commented Mar 1, 2015

FWIW, I was just able to start the existing postgres container like so:

docker run -d --read-only -v /tmp -v /run/postgresql postgres:9.4

@md5
Copy link
Contributor Author

md5 commented Mar 3, 2015

I just checked and saw that /tmp doesn't end up with a sticky bit when you do -v /tmp...

@md5
Copy link
Contributor Author

md5 commented Mar 4, 2015

See appropriate/docker-jetty#5 for how I'm thinking about approaching this in the jetty image.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of this file has indented whitespace, doesn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

55e0d60f920689ae97e9c953111af5f7ba9a01f3

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, let me squash that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

51283401e11bb5e6cb91c987dfd64a8fffa24653

@tianon
Copy link
Member

tianon commented Mar 4, 2015

This seems sane to me.

@tianon
Copy link
Member

tianon commented Mar 4, 2015

So, one thing that might make this less sane is that this can't be undone in images FROM this one, but I think we're reasonably isolated from that being a problem with this specific path.

@tianon
Copy link
Member

tianon commented Mar 9, 2015

LGTM

@yosifkit
Copy link
Member

yosifkit commented Mar 9, 2015

I am wary of merging this without more community input.

@md5
Copy link
Contributor Author

md5 commented Mar 9, 2015

I am wary of merging this without more community input.

I'm not in a rush to see this merged, but I do think it would fix the issue that @bartmeuris reported in #50.

I know that the pgsql-pkg-docker list hasn't seen much activity, but perhaps it would be worth posting something there.

@tianon
Copy link
Member

tianon commented Mar 9, 2015

ping @jpetazzo who's had strong feelings about VOLUME in the past 😈

@yosifkit
Copy link
Member

yosifkit commented Mar 9, 2015

As an alternative, we could just add the chown lines (fixing #50), and leave the VOLUME to the user if it is desired. But some community feedback would be best, even if they are indifferent on the change.

@md5
Copy link
Contributor Author

md5 commented Mar 9, 2015

@yosifkit good idea. I'll split out the chown changes into a separate PR and update (or just close) this one.

@md5
Copy link
Contributor Author

md5 commented Mar 9, 2015

I've updated this PR to be based on the branch in #52. Commit e616341 should drop out of this PR if that gets merged.

@yosifkit
Copy link
Member

yosifkit commented Mar 9, 2015

We should leave this open to allow further discussion to see if users want the volume by default or maybe we just need to document a simple -v /run/postgresql on the run and then volume sharing with --volumes-from. The only problem with the volumes-from approach is that the data directory is also shared, since there is no way to limit docker volume sharing.

@md5
Copy link
Contributor Author

md5 commented Mar 10, 2015

Looks like all work to improve the situation with --volumes-from is waiting on moby/moby#8484, which doesn't currently have a milestone, unfortunately.

@md5
Copy link
Contributor Author

md5 commented Mar 10, 2015

I also just came across moby/moby#8478, which mounts /run on tmpfs (found via docker-library/official-images#497 (comment)). It's unclear from my reading of that PR whether it would be possible to somehow access something like /run/postgresql from another container if that approach is taken.

@md5
Copy link
Contributor Author

md5 commented Mar 11, 2015

Github isn't picking up changes to this branch. I'm going to try closing and reopening the PR.

@md5 md5 closed this Mar 11, 2015
@md5
Copy link
Contributor Author

md5 commented Mar 11, 2015

So much for that...

@yosifkit
Copy link
Member

I wonder if it has something to do with the disconnect from upstream repos? It seems that some have gone through and that the ones that were forked from us have been reparented to the base. @tianon is talking to support about it.

@md5
Copy link
Contributor Author

md5 commented Mar 11, 2015

I was expecting that after #52 closed, this PR would only have one commit (4df941f) since the other commit has been merged (e616341).

Instead, both commits stayed there and the diff was still showing changes from e616341, so I rebased off the latest master and force-pushed. The PR didn't pick up the new ref as I expected, but still showed the other two. Once I closed it, the "Reopen and comment" button was grayed out.

Odd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change ownership of /var/run/postgresql on startup

3 participants