Updated run commands

This commit is contained in:
Héctor Molinero Fernández
2020-03-01 20:12:03 +01:00
parent 7389ea56c2
commit b2b8322aad
3 changed files with 16 additions and 14 deletions

View File

@@ -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.

View File

@@ -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!'

10
run.sh
View File

@@ -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!'