sentry icon indicating copy to clipboard operation
sentry copied to clipboard

Can not install from source code on docker ubuntu container

Open kingofhawks opened this issue 10 years ago • 13 comments

I want to run sentry on docker's ubuntu container, when i run "python setup.py develop", i got the error:


running develop
running egg_info
creating src/sentry.egg-info
error: could not create 'src/sentry.egg-info': Protocol error

I cannot figure it out by Googling the error message. Could someone help me?

kingofhawks avatar Jun 21 '16 14:06 kingofhawks

I download source code to Windows 10 C:/Users/Workspace/sentry, and start the ubuntu container by mount the host directory:


docker pull python:2.7.11
docker run -idt -v /c/Users/workspace:/opt/workspace --name sentry python:2.7.11

kingofhawks avatar Jun 21 '16 14:06 kingofhawks

I've never seen this before. Why not use our official sentry image?

mattrobenolt avatar Jun 21 '16 14:06 mattrobenolt

Oh, I'm guessing this is most certainly related to Windows. I'm assuming mounting a volume from your Windows host machine into a docker container will cause problems since the file systems aren't compatible.

mattrobenolt avatar Jun 21 '16 14:06 mattrobenolt

Also, to provide more assistance: this definitely isn't an issue with Sentry itself. It seems more related to either Docker itself or setuptools not working correctly in this environment.

mattrobenolt avatar Jun 21 '16 14:06 mattrobenolt

@mattrobenolt Is it possible to setup development docker image by following this https://github.com/getsentry/sentry/blob/master/Dockerfile.dev?

kingofhawks avatar Jun 22 '16 04:06 kingofhawks

Yeah, but I've never tested against Windows, so I'm not sure what issues will come from there. I've run this in Linux and OSX.

mattrobenolt avatar Jun 22 '16 04:06 mattrobenolt

@mattrobenolt Thanks, i will give it a try:)

kingofhawks avatar Jun 22 '16 04:06 kingofhawks

@mattrobenolt I tried to build development image from your Dockerfile.dev, but it failed. Then I followed the instruction from your official docker image(https://hub.docker.com/_/sentry/), and successfully started the container from my Windows 10 host. But i wonder is it possible to pull latest code and do some customization based on your official docker image?

kingofhawks avatar Jul 01 '16 13:07 kingofhawks

I tried to build development image from your Dockerfile.dev, but it failed.

What was the failure?

But i wonder is it possible to pull latest code and do some customization based on your official docker image?

No, it's completely different and won't work for development. It's entirely made for running in production.

mattrobenolt avatar Jul 01 '16 14:07 mattrobenolt

$ docker build --rm -t sentry:dev -f Dockerfile.dev . Error checking context: 'can't stat '?\C:\Users\Simon\AppData\Local\Application Data''.

kingofhawks avatar Jul 02 '16 01:07 kingofhawks

I already said, this likely doesn't work with Windows. If someone can figure out a solution, I'd happily take a pull request. These errors seem to be because you're mounting the Windows file system into a Linux container. I have no idea if/how that works.

mattrobenolt avatar Jul 02 '16 02:07 mattrobenolt

To me, this seems like an issue with Docker itself. I'm not sure.

mattrobenolt avatar Jul 02 '16 02:07 mattrobenolt

@mattrobenolt Thanks! I agree with you, maybe this is a docker issue. I will try to go with ubuntu virtual machine,our development environment is based on Windows.

kingofhawks avatar Jul 02 '16 02:07 kingofhawks