lensesio / fast-data-dev

Kafka Docker for development. Kafka, Zookeeper, Schema Registry, Kafka-Connect, , 20+ connectors
https://lenses.io
Apache License 2.0
2.02k stars 333 forks source link

Permission denied /data folder #67

Closed simplesteph closed 6 years ago

simplesteph commented 6 years ago

Hi

One of my student using the new version has the following problem

Hi,

I have Windows 10 Pro (with Hyper-V enabled) and Docker for Windows 18.03 (the latest one).

When I tried to run the the command from your video, I've got following message:

COMMAND>>> docker run --rm -it -p 2181:2181 -p 3030:3030 -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 9092:9092 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev

MESSAGE>>> cannot download image with operating system "linux" when requesting "windows"

I fixed this by adding '--platform linux' to the command and now it looks like this:

docker run --rm -it --platform linux -p 2181:2181 -p 3030:3030 -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 9092:9092 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev

The image has been downloaded successfully, but now I get the other error:

chmod: changing permissions of '/data/zookeeper': Permission denied
chmod: changing permissions of '/data/kafka': Permission denied

Container doesn't start and I cannot proceed.

Can you help me? How to solve this issue? 

Thank you in advance!

The question is here: https://www.udemy.com/apache-kafka/learn/v4/questions/4235368 if you need to interact with the student.

I'm not sure what could be causing this but I thought I'd let you know . Hope you can reproduce and fix

andmarios commented 6 years ago

Hi @simplesteph, hope you are doing well!

I am afraid this issue comes from Docker for Windows. Here is a related bug report in the docker repo: https://github.com/docker/for-win/issues/497. Scrolling to the end, you will find out that people still experience the issue and is probably the same issue your student faces.

We have an experimental build for running fast-data-dev without starting the container as the root user. I pushed a potential workaround for this issue as well. Can you ask your student to give it a spin? The image name is landoop/fast-data-dev:noroot-1.0.1.

If that doesn't work, your student can check the bug report in the docker repo for potential workarounds, or try to switch to the older docker without hyperv support.

simplesteph commented 6 years ago

Thanks for this! The student was able to resolve her issue. Cheers :)