Skip to content

Commit

Permalink
Local group creation for enduser assignment - fixes OpenDevin#1656 Op…
Browse files Browse the repository at this point in the history
  • Loading branch information
Sławomir Gajowniczek committed May 8, 2024
1 parent 4cc462c commit 7558b11
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions containers/app/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ mv /home/opendevin/.cache/ms-playwright/ /home/enduser/.cache/

# get the user group of /var/run/docker.sock and set opendevin to that group
DOCKER_SOCKET_GID=$(stat -c '%g' /var/run/docker.sock)
echo "Docker socket group id: $DOCKER_SOCKET_GID"
usermod -aG $DOCKER_SOCKET_GID enduser
echo "Docker socket group id: $DOCKER_SOCKET_GID."
echo "Creating docker group with fetched gid."
groupadd -g $DOCKER_SOCKET_GID docker
echo "Adding enduser to local docker group"
usermod -aG docker enduser

# switch to the user and start the server
su enduser -c "cd /app && uvicorn opendevin.server.listen:app --host 0.0.0.0 --port 3000"

0 comments on commit 7558b11

Please sign in to comment.