-
Notifications
You must be signed in to change notification settings - Fork 650
Closed
Labels
questionUsability question, not directly related to an error with the imageUsability question, not directly related to an error with the image
Description
Is it possible to change the user name from mongodb
to other user in the container?
I would like to mount the directory SOME_PATH_ON_HOST
into container and the user of this directory is USER
. When the service started, it shows permission error. Can I change the user or permission of /data/db
in container to USER instead of create a mock user mongodb on the host?
I am using docker stack to deploy my services. Kindly see my docker-compose.yml
below:
version: '3.2'
services:
db:
image: mongo
volumes:
- "SOME_PATH_ON_HOST:/data/db"
environment:
- MONGO_INITDB_DATABASE=example_db
deploy:
replicas: 1
Metadata
Metadata
Assignees
Labels
questionUsability question, not directly related to an error with the imageUsability question, not directly related to an error with the image