Comments (13)
Seems like a permissions issue with the volume you mapped into the container. I believe the node
user in the container has uid/gid of 1000/1000, so the owner of your mapped directory needs to match.
from gateway-docker.
That is odd as I am creating the container under the pi
user which has an id of 1000 for both uid and gid.
I connected to the container and tried to manually create the directory, but to create it required sudo perms.
Is there a different perm I may be missing to allow it create the directory?
from gateway-docker.
I noticed that the directory you're trying to create is in /home/node and not /home/pi. I suspect that the permissions on /home/node (and subdirectories) may not be correct. Having said that, I've not really used docker on the Pi, so ignore me if this is just noise.
from gateway-docker.
You definitely will need sudo permissions to create the /home/node directory, but that directory should be owned by a user and you shouldn't need sudo permissions to create sub directories under /home/node if you're running as the owner.
from gateway-docker.
@dhylands In the docker container, node is the primary user, so that directory already exists.
from gateway-docker.
@NuroDev What command are you using to start the container? I have a Raspberry Pi to test with again, so I'd like to try to reproduce.
from gateway-docker.
Using docker-compose, but same issue when running default provided command in README.md.
docker-compose.yml
version: "2"
services:
gateway:
image: mozillaiot/gateway:arm
container_name: gateway
restart: always
network_mode: host
cap_add:
- NET_ADMIN
volumes:
- /home/nuro/gateway/:/home/node/.mozilla-iot
from gateway-docker.
@NuroDev Why are you using /home/nuro/gateway
? I thought you were running as the pi
user? In that case, it should be /home/pi/gateway
.
from gateway-docker.
My mistake, I mean't to say /home/pi/gateway
. I usually use a .env
file to store volume paths but for the sake commenting just manually input it 😅
from gateway-docker.
Haha, ok. So with /home/pi/gateway
, it's still broken? Can you paste the output of stat /home/pi/gateway
?
from gateway-docker.
File: /home/pi/gateway/
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 802h/2050d Inode: 255185 Links: 4
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2018-10-06 22:48:36.349122726 +0000
Modify: 2018-10-07 00:00:05.970806589 +0000
Change: 2018-10-07 00:00:05.970806589 +0000
Birth: -
from gateway-docker.
The directory is owned by root. This should fix your issue:
chown -R 1000:1000 /home/pi/gateway
from gateway-docker.
That seemed to fix perfectly! Thank you ❤️ 😄
from gateway-docker.
Related Issues (20)
- ZigBee USB Device HOT 10
- Raspberry Pi reboots when trying to pull the image HOT 5
- CODE_OF_CONDUCT.md file missing
- Permission errors with volumes created by `docker volume` HOT 1
- LICENSE file is missing
- [Feature Request] Automated build and push for dockerfiles to dockerhub HOT 2
- Auto-discovery webthing-arduino project fail. HOT 15
- WebPack produces 100% CPU utilization on RPi2 on container start HOT 1
- Failed to generate certificate HOT 1
- Great! I'm rebuilding the Docker images and will push to Docker Hub shortly. HOT 1
- Avahi - daemon already running HOT 8
- Use docker-compose and a well-known Avahi image HOT 1
- Synology Gui walkthrough HOT 1
- Clarification of Readme
- GPIO Pins HOT 2
- Consider adding support to ARMv6 boards HOT 4
- Changing the Moz://a dashboard interface. HOT 2
- Cannot run arduino CLI in container on Pi 4b HOT 3
- How to configure proxy for adding ZigBee add-on ? HOT 1
- Developing addon requires container restart on every code change HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gateway-docker.