Skip to content

powershell

powershell.svg

inherite from

abcdesktopio/oc.template.alpine

Distribution

alpine alpine

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.17.1
PRETTY_NAME="Alpine Linux v3.17"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

Alpine packages

powershell dbus-x11 gnome-terminal font-adobe-source-code-pro

Arguments

"--class=powershell -- /usr/bin/pwsh"

Displayname

Powershell

Path

/usr/bin/gnome-terminal

Mimetype

application/hlp;

File extensions

"hlp;"

ACL

{
    "permit": [
        "all"
    ]
}

WM_CLASS

gnome-terminal-server.powershell

The WM_CLASS property (of type STRING without control characters) contains two consecutive null-terminated strings. These specify the Instance and Class names to be used by both the client and the window manager for looking up resources for the application or as identifying information. to get the WM_CLASS property of an application, use the command line wmctrl -lx

JSON dump

json source file powershell.d.3.0.json

{
    "acl": {
        "permit": [
            "all"
        ]
    },
    "cat": "utilities",
    "apkpackage": "powershell dbus-x11 gnome-terminal font-adobe-source-code-pro",
    "icon": "powershell.svg",
    "keyword": "powershell",
    "launch": "gnome-terminal-server.powershell",
    "name": "powershell",
    "displayname": "Powershell",
    "rules": {
        "homedir": {
            "default": true
        }
    },
    "mimetype": "application/hlp;",
    "fileextensions": "hlp;",
    "path": "/usr/bin/gnome-terminal",
    "args": "--class=powershell -- /usr/bin/pwsh",
    "template": "abcdesktopio/oc.template.alpine"
}

Install the builded image

Replace the ABCHOST var set to localhost by default to your own server ip address

ABCHOST=localhost
curl --output powershell.d.3.0.json https://raw.githubusercontent.com/abcdesktopio/oc.apps/main/powershell.d.3.0.json
curl -X PUT -H 'Content-Type: text/javascript' http://$ABCHOST:30443/API/manager/image -d @powershell.d.3.0.json

Generated DockerFile source code

# Dynamic DockerFile application file for abcdesktopio generated by abcdesktopio/oc.apps/make.js
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
ARG TAG=dev
FROM abcdesktopio/oc.template.alpine:$T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aCBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7ZmlsbDojRkNGREZEOyIgZD0iTTExMi4yMzUsMTMzLjgxOWMtNi4xOTYsMC0xMi40MDEsMC4yMTMtMTguNTgzLTAuMDY4CgkJYy00LjkzMi0wLjIyMy03LjktMi45NzktNy44MzgtOC4xNzRjMC4wNi00LjkxMiwyLjUzNi04LjYwNSw3LjQ2My04LjczOGMxMy41NDItMC4zNjMsMjcuMTA0LTAuMjg1LDQwLjY1MS0wLjAyCgkJYzQuMzA1LDAuMDg0LDcuNDgzLDIuODg5LDcuNDU3LDcuMzc1Yy0wLjAzMSw1LjE0Ni0yLjczOSw5LjEzMy04LjI1LDkuNDY1Yy02Ljk0NCwwLjQyLTEzLjkzMSwwLjEwNC0yMC44OTksMC4xMDQKCQlDMTEyLjIzNSwxMzMuNzgsMTEyLjIzNSwxMzMuOCwxMTIuMjM1LDEzMy44MTl6Ii8+CjwvZz4KPC9zdmc+"
LABEL oc.keyword="powershell,powershell"
LABEL oc.cat="utilities"
LABEL oc.launch="gnome-terminal-server.powershell"
LABEL oc.template="abcdesktopio/oc.template.alpine"
ENV ARGS="--class=powershell -- /usr/bin/pwsh"
LABEL oc.name="powershell"
LABEL oc.displayname="Powershell"
LABEL oc.path="/usr/bin/gnome-terminal"
LABEL oc.type=app
LABEL oc.mimetype="application/hlp;"
LABEL oc.fileextensions="hlp;"
LABEL oc.rules="{\"homedir\":{\"default\":true}}"
LABEL oc.acl="{\"permit\":[\"all\"]}"
RUN for d in /usr/share/icons /usr/share/pixmaps ; do echo "testing link in $d"; if [ -d $d ] && [ -x /composer/safelinks.sh ] ; then echo "fixing link in $d"; cd $d ; /composer/safelinks.sh ; fi; done
ENV APPNAME "powershell"
ENV APPBIN "/usr/bin/gnome-terminal"
LABEL oc.args="--class=powershell -- /usr/bin/pwsh"
ENV APP "/usr/bin/gnome-terminal"
USER root
RUN mkdir -p /var/secrets/abcdesktop/localaccount
RUN for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then  cp /etc/$f /var/secrets/abcdesktop/localaccount; rm -f /etc/$f; ln -s /var/secrets/abcdesktop/localaccount/$f /etc/$f; fi; done
USER balloon
CMD [ "/composer/appli-docker-entrypoint.sh" ]

Rebuild the image manually

Download the Dockerfile manually

Dockerfile for application powershell

wget https://raw.githubusercontent.com/abcdesktopio/oc.apps/main/powershell.d

build the Dockerfile to create a container image

docker build --build-arg TAG=3.0 -f powershell.d -t powershell .

Install the new image

If you are using containerd as container runtime, use the ctr command line

If you are not running this bash command on your abcdesktop node Replace the ABCHOST variable set to localhost by default to your own server ip address

ABCHOST=localhost
docker inspect powershell > powershell.json
docker image save powershell -o powershell.tar
ctr -n k8s.io images import powershell.tar
curl -X PUT -H 'Content-Type: text/javascript' http://$ABCHOST:30443/API/manager/image -d @powershell.json