Skip to content
New issue

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

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

Already on GitHub? # to your account

Reorder docker run -v paths in README to /container/path:/local/path #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EronHennessey
Copy link

I found that when running the docker run commands in the README that I kept getting "access denied" errors to paths such as /var/lib/mysql/data on my local host...

Then thought the mapping in the -v arguments might be wrong. Indeed, when I changed the order of the mapping of the -v arguments from /local/path:/container/path to /container/path:/local/path, such as:

docker run --net=xwiki-nw --name postgres-xwiki \
  -v /var/lib/postgresql/data:/my/path/postgres \
  ...

I was able to launch XWiki in a docker container!

So, thought it might be helpful to update the README w/ the correct ordering.

Here's the version of docker I'm using (docker --version):

Docker version 1.13.1, build 47e2230/1.13.1

@vmassol
Copy link
Member

vmassol commented Oct 13, 2019

Hi @EronHennessey . Thanks for your PR. I'd gladly apply it but I've checked and the documentation seems correct. It says for example for MYSQL:

-v /my/path/mysql:/var/lib/mysql -v /my/path/mysql-init:/docker-entrypoint-initdb.d

The first part is the local path on the host and the second part is the path inside the container.

The docker documentation states (see https://docs.docker.com/engine/reference/run/#volume-shared-filesystems):

-v, --volume=[host-src:]container-dest[:]: Bind mount a volume.

Also I've been using it for months without a problem and thousands of XWiki users too. Maybe you made a mistake?

Thanks and have a great week end.

@vmassol vmassol self-assigned this Oct 13, 2019
@EronHennessey
Copy link
Author

No problem. My experience was what I wrote... I got it working only by switching the mapping exactly backwards from what it was on the README.

@vmassol
Copy link
Member

vmassol commented Oct 13, 2019

@EronHennessey What's your OS? And what version of docker do you have?

@vmassol
Copy link
Member

vmassol commented Oct 13, 2019

Also why did you switch the order? Did you read that somewhere? I'd love a pointer to a URL showing the order that you've used.

@EronHennessey
Copy link
Author

I'm running Fedora 30, the answers to the other two questions are in my original description.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants