Sign inSign up

crux/gtk

By crux

Updated about 7 years ago

CRUX Linux GTK Docker Image

Image
0

1.4K

crux/gtk repository overview

CRUX GTK Image

A Docker image based on crux for building application that depend on with GTK.

This image is setup with an entrypoint such that it will automatically create a user account if -e USER is passed to docker run so that your Dockerized app will run as a regular non-root user.

Usage as a Base Image

Dockerfile:

FROM crux/gtk

# ...

Usage as a Container

Create these steps as a script or shell function::
export XSOCK=/tmp/.X11-unix export XAUTH=/tmp/.docker.xauth

touch $XAUTH xauth nlist :0 | sed -e "s/^..../ffff/" | xauth -f $XAUTH nmerge -

docker run -i -t -e DISPLAY -e USER -e XAUTHORITY=$XAUTH -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH --net=host <app>

Example Bash function:

dkx() {
    export XSOCK=/tmp/.X11-unix
    export XAUTH=/tmp/.docker.xauth

    if [ ! -f $XAUTH ]; then
        touch $XAUTH
        xauth nlist :0 | sed -e "s/^..../ffff/" | xauth -f $XAUTH nmerge -
    fi

    docker run -i -t -e DISPLAY -e USER -e XAUTHORITY=$XAUTH -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH \
        --net=host $@
}

Usage:

dkx <app>

Tag summary

Content type

Image

Digest

sha256:e2a140dd0

Size

506.6 MB

Last updated

about 7 years ago

docker pull crux/gtk