Created
November 26, 2015 03:58
-
-
Save danehammer/c62442f98f5860441bd8 to your computer and use it in GitHub Desktop.
example volume permissions problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
RUN mkdir /vol | |
RUN useradd elasticsearch | |
RUN echo "elasticsearch:elasticsearch" | chpasswd | |
RUN chown elasticsearch:elasticsearch /vol | |
VOLUME /vol | |
USER elasticsearch | |
CMD bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Build an image from this file with:
Create a directory locally with permissions set to 600 (assuming you're not elasticsearch on your local host):
Run the volume_test image, mounting ~/vol as the /vol volume:
Then try to do anything to /vol: