Skip to content

Conversation

filipesperandio
Copy link
Contributor

No description provided.

Copy link
Contributor

@maxjacobson maxjacobson left a comment

Choose a reason for hiding this comment

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

I'm hitting this error when I try to run this:

make docs
docker run --rm \
        --workdir /usr/src/app \
        --volume /home/max/src/cc/codeclimate-rubocop:/usr/src/app \
        codeclimate/codeclimate-rubocop sh -c "bundle exec rake docs:scrape"
fatal: could not create work tree dir 'rubocop-git': Permission denied
sh: cd: line 1: can't cd to rubocop-git

not sure why...

Makefile Outdated
@@ -2,6 +2,12 @@

IMAGE_NAME ?= codeclimate/codeclimate-rubocop

docs:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think...

  1. this should depend on image (docs: image)
  2. this should be added to the PHONY list at the top of the file
  3. this shouldn't be the first task -- by convention, we always have image be the first task, so make will default to make image.

@filipesperandio
Copy link
Contributor Author

The error is weird, went smooth for me.

@filipesperandio
Copy link
Contributor Author

@maxjacobson Could it be some local permission not allowing the user within docker to write to the directory?

@maxjacobson
Copy link
Contributor

@filipesperandio yeah I think so. Possibly a linux/mac difference.

@wfleming perhaps you know the docker magic invocation to make this work?

@wfleming
Copy link
Contributor

It's running as user id 9000 which doesn't exist on the host machine & doesn't have write permissions. My guess is it works for Filipe because of some weird Docker for Mac host-fs-virtualization magic to handle permissions between the host/the VM that actually hosts docker. I think the easy fix is to pass --user root to the docker run. (which might lead to people needing to sudo chown locally for some things, but we do that in other cases and it's fine.)

@maxjacobson
Copy link
Contributor

Cool, I can confirm that adding --user root helps for me on linux. Do things still work for you with that change @filipesperandio?

@maxjacobson
Copy link
Contributor

(Thanks @wfleming!)

@filipesperandio
Copy link
Contributor Author

@maxjacobson @wfleming That works on mac too! 👍

@filipesperandio filipesperandio merged commit 08f8de8 into master May 16, 2017
@filipesperandio filipesperandio deleted the fe/docs branch May 16, 2017 22:01
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.

4 participants