Setup docker image with non-root user #4310
Answered
by
curquiza
Saba-Shavidze
asked this question in
Q&A
-
I'm trying to setup meilisearch image and restrict the permission by passing the host user docker-compose.ymlversion: "3.1"
services:
search:
container_name: meilisearch-local
image: getmeili/meilisearch:latest
user: "${UID_GID}"
ports:
- target: 7700
published: 7700
# protocol: tcp
mode: host
volumes:
- ${MEILI_DB_PATH}:/meili_data/data.ms
- ${MEILI_SNAPSHOT_DIR}:/meili_data/snapshots
restart: always .env.searchMEILI_MASTER_KEY=masterKey
MEILI_NO_ANALYTICS=true
MEILI_ENV=development
MEILI_LOG_LEVEL=ERROR
MEILI_DB_PATH=../../../tmp/data/meilisearch/data.ms
MEILI_IMPORT_SNAPSHOT=../../../tmp/data/meilisearch/snapshot/file.snapshot
MEILI_SNAPSHOT_DIR=../../../tmp/data/meilisearch/snapshot
MEILI_IGNORE_MISSING_SNAPSHOT=true
MEILI_IGNORE_SNAPSHOT_IF_DB_EXISTS=true
MEILI_MAX_INDEXING_THREADS=4 Makefilelocal-up:
@echo "Starting local environment..."
@UID_GID=$$(id -u):$$(id -g)
docker-compose --env-file ./infrastructure/docker/local/.env.search -f ./infrastructure/docker/local/docker-compose.yml up -d
I research about it a lot, but can't solve the problem, I found this approach but it seems it is not complete. Could anyone help on advice anything? |
Beta Was this translation helpful? Give feedback.
Answered by
curquiza
Jan 10, 2024
Replies: 1 comment
-
Hello @Saba-Shavidze We did not find a way to run our container without the root user so far. Open to receive any help on this 😊 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Saba-Shavidze
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @Saba-Shavidze
The closed issue you link redirect to another open issue, which is this one: #2051
We did not find a way to run our container without the root user so far. Open to receive any help on this 😊