and3rson/clay

Dockerfile Build Issue

irishgordo opened this issue · 1 comments

When I run something like:
docker build -t clay:latest .
(inside the git project directory)
seemingly most things cary across yet it errors out on:

Step 12/21 : RUN useradd -D ${HOST_USER} -m -G audio -u ${HOST_UID}                                                  
 ---> Running in 6b6454761d31       
useradd: option requires an argument -- 'u'

I am afraid you're running the wrong command which is causing it to fail since it is missing some environment variables you need to pass in yourself.

The correct Docker command is:

build
	docker run -it \
	--rm \
	--name clay \
	-v ${HOME}/.config/clay:/home/${USER}/.config/clay \
	-v /dev/shm:/dev/shm \
	-v /etc/machine-id:/etc/machine-id \
	-v /run/user/${UID}/pulse:/run/user/${UID}/pulse \
	-v /var/lib/dbus:/var/lib/dbus \
	-v ${HOME}/.pulse:/home/${USER}/.pulse \
	-v ${HOME}/.config/pulse:/home/${USER}/.config/pulse \
	--tty \
	-u ${USER} \
	clay \
	${CMD}

But I would recommend just running make run as is described in the README.