Skip to content

Instantly share code, notes, and snippets.

@humamfauzi
Created April 17, 2021 10:43
Show Gist options
  • Save humamfauzi/b1d5f4cc636a4a9430a55cfaa307c329 to your computer and use it in GitHub Desktop.
Save humamfauzi/b1d5f4cc636a4a9430a55cfaa307c329 to your computer and use it in GitHub Desktop.
Why Kivy does not work on docker

install python with KivyMD

===== using python alpine base image

  1. cd /home
  2. mkdir workspace
  3. apk add --no-cache jpeg-dev zlib-dev
  4. apk add --no-cache --virtual .build-deps build-base linux-headers && pip install pillow
  5. apk add mesa-dev
  6. pip install kivymd

===== use conda base image

  1. cd /home
  2. mkdir workspace && cd workspace
  3. conda create --name kivyenv -y
  4. conda activate kivyenv
  5. conda install kivy -c conda-forge -y
  6. python -m pip install kivymd
  7. apt-get update
  8. apt-get install libmtdev-dev libgl1-mesa-glx -y

cannot be done because there is no reliable way to porting display from docker to host Every time calling App will return Cannot connect to server X and abruptly exit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment