diff --git a/README.md b/README.md index 8dcfbf2..5fb0238 100644 --- a/README.md +++ b/README.md @@ -8,15 +8,17 @@ A Docker image based on Ubuntu 18.04 with the Xfce desktop environment, ## Start an instance ```sh -docker run --detach \ +docker run \ --name xubuntu \ - --publish 3389:3389/tcp \ + --detach --tty \ --shm-size 2g \ - --device /dev/dri \ + --publish 3322:3322/tcp \ + --publish 3389:3389/tcp \ + --device /dev/dri:/dev/dri \ hectormolinero/xubuntu:latest ``` -> You will be able to connect to the container via RDP through 3389/tcp port. +> You will be able to connect to the container via SSH through 3322/tcp port and RDP through 3389/tcp port. > **Important:** some software (like Firefox) need the shared memory to be increased, if you encounter any problem related to this you may use the `--shm-size` option. diff --git a/run-with-virtualgl.sh b/run-with-virtualgl.sh index 2883818..aabd5fc 100755 --- a/run-with-virtualgl.sh +++ b/run-with-virtualgl.sh @@ -32,16 +32,16 @@ if containerExists "${CONTAINER_NAME:?}"; then fi printf -- '%s\n' "Creating \"${CONTAINER_NAME:?}\" container..." -"${DOCKER:?}" run --detach \ +"${DOCKER:?}" run \ --name "${CONTAINER_NAME:?}" \ --hostname "${CONTAINER_NAME:?}" \ - --restart on-failure:3 \ - --log-opt max-size=32m \ + --detach --tty \ + --privileged \ + --shm-size 2g \ --publish 3322:3322/tcp \ --publish 3389:3389/tcp \ - --shm-size 2g \ - --privileged \ --env ENABLE_VIRTUALGL=true \ + --device /dev/dri:/dev/dri \ "${IMAGE_NAME:?}" "$@" >/dev/null printf -- '%s\n\n' 'Done!' diff --git a/run.sh b/run.sh index cbfc69b..f3bb7a7 100755 --- a/run.sh +++ b/run.sh @@ -32,14 +32,14 @@ if containerExists "${CONTAINER_NAME:?}"; then fi printf -- '%s\n' "Creating \"${CONTAINER_NAME:?}\" container..." -"${DOCKER:?}" run --detach \ +"${DOCKER:?}" run \ --name "${CONTAINER_NAME:?}" \ --hostname "${CONTAINER_NAME:?}" \ - --restart on-failure:3 \ - --log-opt max-size=32m \ - --publish 3389:3389/tcp \ + --detach --tty \ --shm-size 2g \ - --device /dev/dri \ + --publish 3322:3322/tcp \ + --publish 3389:3389/tcp \ + --device /dev/dri:/dev/dri \ "${IMAGE_NAME:?}" "$@" >/dev/null printf -- '%s\n\n' 'Done!'