docker-pgmodeler icon indicating copy to clipboard operation
docker-pgmodeler copied to clipboard

Running on Mac OS X(mojave 10.14.5)

Open haisamido opened this issue 6 years ago • 6 comments

I followed these steps on my mac os x laptop https://github.com/ksylvan/docker-pgmodeler#macos-using-this-image and I get this error:

2019/07/31 14:37:48 socat[48432] E bind(5, {LEN=0 AF=2 0.0.0.0:6001}, 16): Address already in use
Unsupported screen format: depth: 8, red_mask: 0, blue_mask: 0
Unsupported screen format: depth: 8, red_mask: 0, blue_mask: 0
Unsupported screen format: depth: 8, red_mask: 0, blue_mask: 0
Unsupported screen format: depth: 8, red_mask: 0, blue_mask: 0
Segmentation fault
[2]+  Exit 1                  socat TCP-LISTEN:6001,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"

Not sure why this is happening.

haisamido avatar Jul 31 '19 18:07 haisamido

BTW, I tested this on High Sierra (10.13.6) and it worked, so this may be a problem with Mojave (10.14.5)

haisamido avatar Jul 31 '19 20:07 haisamido

Looks like for some reason, port 6001 is already being used?

ksylvan avatar Jul 31 '19 21:07 ksylvan

Try setting DISPLAY to ":2" and use 6002 and see if that works?

ksylvan avatar Jul 31 '19 22:07 ksylvan

I created this Makefile, and ran the image differently and I succeeded!

.PHONY: pgmodeler build color-depth x11

# Install brew if you don't have it
brew:
	@command -v brew || /usr/bin/ruby -e "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Install X11/Xquartz if you don't have it
x11: brew
	brew cask list xquartz || brew cask install xquartz
	open /Applications/Utilities/XQuartz.app

xquartz: x11

color-depth: x11
	defaults write org.macosforge.xquartz.X11 depth -int 32

# Source: 
#   https://hub.docker.com/r/kayvan/pgmodeler/
#   https://github.com/ksylvan/docker-pgmodeler
build:
	docker pull kayvan/pgmodeler

pgmodeler: build color-depth x11
	docker run -ti --rm \
		-e DISPLAY=host.docker.internal:0 \
		kayvan/pgmodeler

I can do a pull-request to add this to your repo. note that I ran pgmodeler this way

docker run -ti --rm -e DISPLAY=host.docker.internal:0 kayvan/pgmodeler

socat is not needed?

haisamido avatar Jul 31 '19 22:07 haisamido

Yes, please! Thank you!

ksylvan avatar Aug 01 '19 21:08 ksylvan

I can do a pull-request to add this to your repo. note that I ran pgmodeler this way

Please send a pull request for the README. Thanks.

ksylvan avatar Aug 19 '19 05:08 ksylvan