diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..608dcc4f686b4dc9db91d664bb8f19cecf182750 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +FROM --platform=${TARGETPLATFORM} lscr.io/linuxserver/webtop:ubuntu-xfce + +##Â environment settings +ENV HOME="/config" +ENV TZ=Europe/Paris +ARG DEBIAN_FRONTEND=noninteractive + +RUN \ + echo "**** install needed tools and dependencies ****" && \ + apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y \ + nextcloud-desktop \ + unzip \ + zip + +RUN \ + echo "**** clean up ****" && \ + apt-get clean && \ + rm -rf \ + /tmp/* \ + /var/lib/apt/lists/* \ + /var/tmp/* + +## add local files +COPY /root / + +## /config will be a docker volume, initially empty +## wrapper_script will do the copy from /init-config +## but /config must exist fort the mount +RUN \ + chown -R abc:abc /config && \ + mv /config /init-config && \ + mkdir /config && \ + chown -R abc:abc /config + +## launch +ENTRYPOINT ["/bin/bash", "/usr/local/lib/wrapper_script.sh"] + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..84c6e7a34ce19d6ef17a6d4ed1f431e60ab9dd1f --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ + +REPO = gitlab-research.centralesupelec.fr:4567/my-docker-images/docker-webtop +TAG = xfce + +all: + docker buildx create --use --node new-builder + docker buildx build --push --platform "linux/amd64" --tag "${REPO}:${TAG}" . + diff --git a/README.md b/README.md index 26bdfe51a96c03bbd432f6ab785e4101cb3dead0..593ac4545b67c082f1b2a8fea82f06d85e3dea33 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,25 @@ ## Why -This image is a base image for a full linux running either on a local docker or on MyDocker. +This image is a base image for a linux with a GUI running either on a local docker or on MyDocker. It is based on [WebTop image from LinuxServer.io](https://github.com/linuxserver/docker-webtop) which is maintained and quite often updated. +This image use Ubuntu 22.04 and the [Xfce](https://www.xfce.org) window manager. + ## Changes -- For deployment on MyDocker, an nginx WebSocket reverse proxy with http basic authentification -has been added. Trying to use the PASSWORD setting of [guacamole client From Linuxserver](https://github.com/linuxserver/gclient) -was not succesful. +- Nextcloud and some basic tools (unzip, zip) added. + +## Details -## Usage +- The exposed ports are 3000 (HTTP/VNC) and 3001 (HTTPS/VNC). +- The user folder is `/config`. +- the user is `abc`, its password also, sudo is without password. +- if docker is installed on your computer, you can run (amd64 or arm64 architecture) this + image, assuming you are in a specific folder that will be shared with the container at + `/config`, with: + + `docker run -p 3000:3000 -v "$(pwd):/config" + gitlab-research.centralesupelec.fr:4567/my-docker-images/docker-webtop:xfce` -- Choose one of the available branch (`kde` or `icewm`). diff --git a/root/usr/local/lib/wrapper_script.sh b/root/usr/local/lib/wrapper_script.sh new file mode 100755 index 0000000000000000000000000000000000000000..c500923eedc837ac70b71c2f0298455a6992f0b5 --- /dev/null +++ b/root/usr/local/lib/wrapper_script.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +cp -TRn /init-config/ /config +chown -R abc:abc /config + +# MyDocker send a username to $1 and a password to $2 +if [ "$2" ]; then + export CUSTOM_USER=$1 + export PASSWORD=$2 +fi + +exec /init