Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Define user to be used to run container process (#862)

Ritesh Pandey95eb7e9b359c
diff --git a/docker-compose.yml b/docker-compose.yml
index beed92cc8..36f4d615f 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -82,6 +82,7 @@ services:
- api/env.docker
stdin_open: true
tty: true
+ user: ${DOCKER_USER_ID}:${DOCKER_GROUP_ID}
ingestion_server:
build: ./ingestion_server/
diff --git a/justfile b/justfile
index e3a6bd2d1..a12ac55e3 100644
--- a/justfile
+++ b/justfile
@@ -32,6 +32,9 @@ DOCKER_FILE := "-f " + (
else { "docker-compose.yml" }
)
+export DOCKER_USER_ID := `id -u`
+export DOCKER_GROUP_ID := `id -g`
+
# Build all (or specified) services
build *args:
docker-compose {{ DOCKER_FILE }} build {{ args }}