docker-ubuntu-vnc-desktop icon indicating copy to clipboard operation
docker-ubuntu-vnc-desktop copied to clipboard

Can I run X-server in container before connect to web-page?

Open SystemDiagnosticss opened this issue 4 years ago • 1 comments

I want to start some app in container automatically when docker run. I doing it from docker-entrypoint.sh file. So,in file /etc/supervisor/conf.d/supervisord.conf I put this line command=/usr/bin/openbox --startup /root/Desktop/.../docker-entrypoint.sh |g" Everything it's work but my app needed X server. So, this app started only after that when I am connected to 127.0.0.1:6080 It is possible to start X-server before connect to 127.0.0.1:6080 ?

SystemDiagnosticss avatar Jul 21 '20 19:07 SystemDiagnosticss

work for me. Here is my docker run command

run:
	docker run --privileged --rm \
		-p 6080:80 -p 6081:443 \
		-v ${PWD}:/src:ro \
		-e USER=doro -e PASSWORD=mypassword \
		-e ALSADEV=hw:2,0 \
		-e SSL_PORT=443 \
		-e RELATIVE_URL_ROOT=approot \
		-e OPENBOX_ARGS="--startup /usr/bin/galculator" \
		-v ${PWD}/ssl:/etc/nginx/ssl \
		--device /dev/snd \
		--name ubuntu-desktop-lxde-test \
		$(REPO):$(TAG)

You may also try add environment "DISPLAY=:1"

fcwu avatar Jul 22 '20 01:07 fcwu