Skip to content

Instantly share code, notes, and snippets.

@craftslab
Last active February 4, 2022 03:11
Show Gist options
  • Save craftslab/5155b0fe830235d35182402a788f996b to your computer and use it in GitHub Desktop.
Save craftslab/5155b0fe830235d35182402a788f996b to your computer and use it in GitHub Desktop.
bcompare docker

Build

FROM ubuntu:18.04

RUN apt update -y && \
    apt install -y build-essential && \
    apt install -y libc6-dev && \
    apt install -y libglib2.0-dev && \
    apt install -y poppler-utils && \
    apt install -y wget
RUN wget https://www.scootersoftware.com/bcompare-4.3.7.25118_amd64.deb && \
    dpkg -i *.deb && \
    rm *.deb
docker build -f Dockerfile -t ubuntu:bcompare .

Run

  • Ubuntu
[Application]->[X11 client]->[X11 server]->[display]
# Access is granted to everyone, even if they aren't on the list (i.e., access control is turned off)
sudo apt-get install x11-xserver-utils
xhost +

# Run bcompare in container of ubuntu-bcompare
docker run -it -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro --name ubuntu-bcompare ubuntu:bcompare bcompare
  • Windows
[Application]->[X11 client]->[SSH server]->[SSH client]->[X11 server]->[display]
# Remote via SSH
vi /etc/ssh/sshd_config
X11Forwarding yes
# Local on Windows

# Install PuTTy
wget https://the.earth.li/~sgtatham/putty/latest/w64/putty-64bit-0.74-installer.msi

# Install Xming
wget http://sourceforge.net/project/downloading.php?group_id=156984&filename=Xming-6-9-0-31-setup.exe
# Local on Windows

# Run XLaunch

# Run PuTTy
ssh -X <user>@<ip-addr>
# Remote via PuTTy

# Access is granted to everyone, even if they aren't on the list (i.e., access control is turned off)
sudo apt-get install x11-xserver-utils
xhost +

# localhost:10.0
echo $DISPLAY

# Run bcompare in container of ubuntu-bcompare
# Notice: Check file mode of $HOME/.Xauthority
docker run -it -e DISPLAY=:10.0 --net=host -v $HOME/.Xauthority:/root/.Xauthority --name ubuntu-bcompare ubuntu:bcompare bcompare

Configuration

  • XLaunch
  • PuTTy

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment