#!/bin/bash
DOCKER_GROUP=$(getent group docker | cut -d: -f3)
docker run
-v /var/run/docker.sock:/var/run/docker.sock
--group-add $DOCKER_GROUP
workers/data-handler:1.0.2
version: '2.1'
services:
my-worker:
image: workers/data-handler:1.0.2
volumes:
- /var/run/docker.sock:/var/run/docker.sock
group_add:
- 994 #docker group id
command: run
version: '3'
services:
app:
image: alpine
user: "${UID}:${GID}"