Enclosure plugin on docker

I've deployed a IOTstack on my Pi 4. I've tried installing octoprint-enclosure but after a restart of the container, the plugin doesn't show up in installed plugins so I can't uninstall it.

Also trying to install bedlevelvisualiser crashes the whole system.

Installing plugin "OctoPrint-Enclosure" from https://github.com/vitormhenrique/OctoPrint-Enclosure/archive/master.zip...
/usr/local/bin/python -m pip --disable-pip-version-check install file:///tmp/tmp9s3uflao/OctoPrint-Enclosure-master.zip --no-cache-dir
Processing /tmp/tmp9s3uflao/OctoPrint-Enclosure-master.zip
Requirement already satisfied: OctoPrint in /usr/local/lib/python3.8/site-packages (from OctoPrint-Enclosure==4.13.1) (1.4.2)
Requirement already satisfied: RPi.GPIO>=0.6.5 in /root/.octoprint/plugins/lib/python3.8/site-packages (from OctoPrint-Enclosure==4.13.1) (0.7.0)
Requirement already satisfied: requests>=2.7 in /usr/local/lib/python3.8/site-packages (from OctoPrint-Enclosure==4.13.1) (2.24.0)
Requirement already satisfied: itsdangerous<2,>=1.1.0 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.1.0)
Requirement already satisfied: netifaces<1,>=0.10.9 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.10.9)
Requirement already satisfied: flask<2,>=1.1.2 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.1.2)
Requirement already satisfied: feedparser<6,>=5.2.1 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (5.2.1)
Requirement already satisfied: tornado==5.1.1 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (5.1.1)
Requirement already satisfied: pyserial<4,>=3.4 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (3.4)
Requirement already satisfied: pkginfo<2,>=1.5.0.1 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.5.0.1)
Requirement already satisfied: wrapt<2,>=1.12.1 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.12.1)
Requirement already satisfied: emoji<1,>=0.5.4 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.6.0)
Requirement already satisfied: semantic-version<3,>=2.8.5 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (2.8.5)
Requirement already satisfied: OctoPrint-FirmwareCheck>=2020.06.22 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (2020.6.22)
Requirement already satisfied: regex!=2018.11.6 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (2020.7.14)
Requirement already satisfied: Jinja2<3,>=2.11.2 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (2.11.2)
Requirement already satisfied: cachelib<1,>=0.1 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.1.1)
Requirement already satisfied: pylru<2,>=1.2 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.2.0)
Requirement already satisfied: Flask-Babel<2,>=1.0 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.0.0)
Requirement already satisfied: psutil<6,>=5.7 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (5.7.2)
Requirement already satisfied: frozendict<2,>=1.2 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.2)
Requirement already satisfied: PyYAML<6,>=5.3.1 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (5.3.1)
Requirement already satisfied: markupsafe<2.0,>=1.1 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.1.1)
Requirement already satisfied: watchdog<1,>=0.10.2 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.10.3)
Requirement already satisfied: Click<8,>=7.1.2 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (7.1.2)
Requirement already satisfied: future<1,>=0.18.2 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.18.2)
Requirement already satisfied: filetype<2,>=1.0.7 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.0.7)
Requirement already satisfied: sentry-sdk<1,>=0.15.1 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.17.3)
Requirement already satisfied: Flask-Assets<3,>=2.0 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (2.0)
Requirement already satisfied: markdown<3.2,>=3.1 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (3.1.1)
Requirement already satisfied: werkzeug<2,>=1.0.1 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.0.1)
Requirement already satisfied: rsa==4.0 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (4.0)
Requirement already satisfied: sarge==0.1.5post0 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.1.5.post0)
Requirement already satisfied: OctoPrint-FileCheck>=2020.07.06 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (2020.8.7)
Requirement already satisfied: websocket-client<1,>=0.57 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.57.0)
Requirement already satisfied: blinker<2,>=1.4 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (1.4)
Requirement already satisfied: Flask-Login<0.6,>=0.5 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.5.0)
Requirement already satisfied: unidecode<0.05,>=0.04.14 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.4.21)
Requirement already satisfied: netaddr<1,>=0.7.19 in /usr/local/lib/python3.8/site-packages (from OctoPrint->OctoPrint-Enclosure==4.13.1) (0.8.0)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.8/site-packages (from requests>=2.7->OctoPrint-Enclosure==4.13.1) (2.10)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.8/site-packages (from requests>=2.7->OctoPrint-Enclosure==4.13.1) (1.25.10)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.8/site-packages (from requests>=2.7->OctoPrint-Enclosure==4.13.1) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/site-packages (from requests>=2.7->OctoPrint-Enclosure==4.13.1) (2020.6.20)
Requirement already satisfied: Babel>=2.3 in /usr/local/lib/python3.8/site-packages (from Flask-Babel<2,>=1.0->OctoPrint->OctoPrint-Enclosure==4.13.1) (2.8.0)
Requirement already satisfied: pytz in /usr/local/lib/python3.8/site-packages (from Flask-Babel<2,>=1.0->OctoPrint->OctoPrint-Enclosure==4.13.1) (2020.1)
Requirement already satisfied: pathtools>=0.1.1 in /usr/local/lib/python3.8/site-packages (from watchdog<1,>=0.10.2->OctoPrint->OctoPrint-Enclosure==4.13.1) (0.1.2)
Requirement already satisfied: webassets>=2.0 in /usr/local/lib/python3.8/site-packages (from Flask-Assets<3,>=2.0->OctoPrint->OctoPrint-Enclosure==4.13.1) (2.0)
Requirement already satisfied: setuptools>=36 in /usr/local/lib/python3.8/site-packages (from markdown<3.2,>=3.1->OctoPrint->OctoPrint-Enclosure==4.13.1) (49.3.1)
Requirement already satisfied: pyasn1>=0.1.3 in /usr/local/lib/python3.8/site-packages (from rsa==4.0->OctoPrint->OctoPrint-Enclosure==4.13.1) (0.4.8)
Requirement already satisfied: six in /usr/local/lib/python3.8/site-packages (from websocket-client<1,>=0.57->OctoPrint->OctoPrint-Enclosure==4.13.1) (1.15.0)
Building wheels for collected packages: OctoPrint-Enclosure
Building wheel for OctoPrint-Enclosure (setup.py): started
Building wheel for OctoPrint-Enclosure (setup.py): finished with status 'done'
Created wheel for OctoPrint-Enclosure: filename=OctoPrint_Enclosure-4.13.1-py3-none-any.whl size=67528 sha256=5cd5ed7449b5dabbd5d7f1aeecbc8eaf2967031183f31cdc4c719bf9aa22eb5d
Stored in directory: /tmp/pip-ephem-wheel-cache-4xmxjjpn/wheels/01/8a/7d/625fe94eb1b75f39b89c7dcdc86a1ae1dd35a60a057ac15e2d
Successfully built OctoPrint-Enclosure
Installing collected packages: OctoPrint-Enclosure
Attempting uninstall: OctoPrint-Enclosure
Found existing installation: OctoPrint-Enclosure 4.13.1
Uninstalling OctoPrint-Enclosure-4.13.1:
Successfully uninstalled OctoPrint-Enclosure-4.13.1
Successfully installed OctoPrint-Enclosure-4.13.1
Done!

Look in the OctoPrint.log for possible reasons. It could be a Python 3 compatibility issue.

Seems like it?

2020-09-26 12:01:17,687 - octoprint.startup - INFO - ******************************************************************************
2020-09-26 12:01:17,688 - octoprint.startup - INFO - Starting OctoPrint 1.4.2
2020-09-26 12:01:17,690 - octoprint.startup - INFO - ******************************************************************************
2020-09-26 12:01:18,711 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity changed from offline to online
2020-09-26 12:01:18,741 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: online
2020-09-26 12:01:18,741 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 8.8.8.8:53 is working
2020-09-26 12:01:18,742 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is working
2020-09-26 12:01:18,919 - octoprint.startup - INFO - Blacklist processing done, adding 10 blacklisted plugin versions: roomtemp (any), GcodeEditor (0.1.1), GcodeEditor (0.2.0), GcodeEditor (0.2.1), GcodeEditor (0.2.2), GcodeEditor (0.2.3), GcodeEditor (0.2.4), GcodeEditor (0.2.5), GcodeEditor (0.2.6), GcodeEditor (0.2.8)
2020-09-26 12:01:18,960 - octoprint.plugin.core - INFO - Loading plugins from /usr/local/lib/python3.8/site-packages/octoprint/plugins, /root/.octoprint/plugins and installed plugin packages...
2020-09-26 12:01:19,925 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin did not pass check, not loading.
2020-09-26 12:01:20,261 - octoprint.plugin.core - ERROR - Error loading plugin enclosure
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/octoprint/plugin/core.py", line 972, in _import_plugin
    module = _load_module(module_name, spec)
  File "/usr/local/lib/python3.8/site-packages/octoprint/plugin/core.py", line 71, in _load_module
    return imp.load_module(name, f, filename, details)
  File "/usr/local/lib/python3.8/site-packages/octoprint/vendor/imp.py", line 241, in load_module
    return load_package(name, filename)
  File "/usr/local/lib/python3.8/site-packages/octoprint/vendor/imp.py", line 215, in load_package
    return _load(spec)
  File "<frozen importlib._bootstrap>", line 702, in _load
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/octoprint/plugins/lib/python3.8/site-packages/octoprint_enclosure/__init__.py", line 6, in <module>
    from .ledstrip import LEDStrip
  File "/octoprint/plugins/lib/python3.8/site-packages/octoprint_enclosure/ledstrip.py", line 58, in <module>
    import RPi.GPIO as GPIO
  File "/octoprint/plugins/lib/python3.8/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!

Does the enclosure plugin with within docker? From within docker, you have to use the remote GPIO connection as you are not running on the host operating system. I had trouble running node-red in docker on an RPi and accessing the GPIO through the normal GPIO process. I had to use GPIOD. I don't know which method the enclosure plugin uses to grab the GPIO pins but if it is not exposed to the container, that could be your problem.