Browse Source

container image: m5stack's uiflow desktop ide on debian buster (user interfaces launches successfully)

Fabian Peter Hammerle 2 years ago
commit
44816a057c
3 changed files with 46 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 42 0
      Dockerfile
  3. 3 0
      UIFlow-Desktop-IDE_Linux.zip

+ 1 - 0
.gitattributes

@@ -0,0 +1 @@
+*.zip filter=lfs diff=lfs merge=lfs -text

+ 42 - 0
Dockerfile

@@ -0,0 +1,42 @@
+FROM docker.io/alpine:3.14.0 as unpack
+
+COPY ./UIFlow-Desktop-IDE_Linux.zip /
+RUN unzip /*.zip -d /opt/uiflow-desktop-ide
+
+
+FROM docker.io/debian:10.10-slim
+
+# create home dir to fix:
+# > Error: Failed to get 'appData' path
+# >     at Object.<anonymous> (/opt/uiflow-desktop-ide/bin/resources/electron.asar/browser/init.js:148:39)
+RUN apt-get update \
+    && apt-get install --yes --no-install-recommends \
+        libasound2=1.1.8-1 \
+        libglib2.0-0=2.58.3-2+deb10u3 \
+        libgtk-3-0=3.24.5-1 \
+        libnss3=2:3.42.1-1+deb10u3 \
+        libx11-xcb1=2:1.6.7-1+deb10u2 \
+        libxss1=1:1.2.3-1 \
+        libxtst6=2:1.2.3-1 \
+        tini=0.18.0-1 \
+    && rm -rf /var/lib/apt/lists/* \
+    && useradd --create-home uiflow \
+    && find / -xdev -type f -perm /u+s -exec chmod -c u-s {} \; \
+    && find / -xdev -type f -perm /g+s -exec chmod -c g-s {} \;
+ENTRYPOINT ["/usr/bin/tini", "--"]
+
+COPY --from=unpack /opt/uiflow-desktop-ide /opt/uiflow-desktop-ide
+
+USER uiflow
+# ~/.config/UIFlow-Desktop-IDE/ & ~/.cache/fontconfig/
+VOLUME /home/uiflow
+WORKDIR /opt/uiflow-desktop-ide
+CMD ["bin/uiflow-desktop-ide"]
+
+LABEL podman-run-x11="podman run --name uiflow --rm -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --read-only -v uiflow_home:/home/uiflow --cap-drop ALL --security-opt no-new-privileges \${IMAGE}"
+
+# https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md
+ARG REVISION=
+LABEL org.opencontainers.image.title="m5stack's uiflow desktop ide" \
+    org.opencontainers.image.source="https://git.hammerle.me/fphammerle/docker-m5stack-uiflow-desktop-ide" \
+    org.opencontainers.image.revision="$REVISION"

+ 3 - 0
UIFlow-Desktop-IDE_Linux.zip

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:75b5d9d452fe8fe37d2a655092ecb62225748039fb70d34b25c544c418b6b169
+size 117227835