# Alpine based docker image

**URL:** <https://discourse.mopidy.com/t/alpine-based-docker-image/3019>\
**Category:** Misc\
**Created:** [January 13, 2019, 11:14am UTC](https://discourse.mopidy.com/t/alpine-based-docker-image/3019 "2019-01-13T11:14:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![deisi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/deisi/32/1070_2.png) [@deisi](https://discourse.mopidy.com/u/deisi)\
**Post date:** [January 13, 2019, 11:14am UTC](https://discourse.mopidy.com/t/alpine-based-docker-image/3019/1 "2019-01-13T11:14:01Z")

</div>

I’m trying to create a docker image for mopify based on alpine. I know there are some available like [https://hub.docker.com/r/darkade/mopidy/dockerfile](https://hub.docker.com/r/darkade/mopidy/dockerfile) but they don’t work for me.

My current setup builds and I get it running, but if I try to start a stream, it crashes with:

```auto
(mopidy:6): GLib-GIO-ERROR **: 10:41:25.142: No GSettings schemas are installed on the system

```

So from what I understand, the container is missing a dependency. I already asked at [github](https://github.com/mopidy/mopidy/issues/1733) and was send here.

The [mopidy docs](https://docs.mopidy.com/en/latest/installation/source/) list all the dependencies, for various operating systems, however alpine is not among them. Also from what I can tell, I have all of them installed. There is also a precompiled package in the [alpine package archive](https://pkgs.alpinelinux.org/package/edge/testing/x86/mopidy).

@ **[kingosticks](https://github.com/kingosticks)** mentioned I would need gstreamer python bindings. As far as I can see, they are installed as a dependency of the [mopidy apk](https://pkgs.alpinelinux.org/package/edge/testing/x86/mopidy) and are called [py-gst](https://pkgs.alpinelinux.org/package/edge/community/x86/py-gst)

In my despair, I started to add more and more packages to the alpine image. You can see the current status [here](https://github.com/deisi/audiostation-mopidy/blob/alpine/Dockerfile)

By connecting to the running container, I searched for files with the name `schema` and find the following:

```auto
/ # find / -name *schema*
/usr/share/gettext/its/gschema.its
/usr/share/gettext/its/gschema.loc
/usr/share/mime/text/csv-schema.xml
/usr/share/glib-2.0/schemas
/usr/share/glib-2.0/schemas/gschema.dtd
/usr/lib/python2.7/site-packages/mopidy/config/schemas.pyc
/usr/lib/python2.7/site-packages/mopidy/config/schemas.py
/usr/lib/python2.7/site-packages/lxml/includes/xmlschema.pxd
/usr/lib/python2.7/site-packages/lxml/includes/schematron.pxd
/usr/lib/python2.7/site-packages/lxml/isoschematron
/usr/lib/python2.7/site-packages/lxml/isoschematron/resources/rng/iso-schematron.rng
/usr/lib/python2.7/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
/usr/lib/python2.7/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl
/usr/lib/python2.7/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl
/usr/lib/python3.6/site-packages/lxml/includes/xmlschema.pxd
/usr/lib/python3.6/site-packages/lxml/includes/schematron.pxd
/usr/lib/python3.6/site-packages/lxml/isoschematron
/usr/lib/python3.6/site-packages/lxml/isoschematron/resources/rng/iso-schematron.rng
/usr/lib/python3.6/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
/usr/lib/python3.6/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl
/usr/lib/python3.6/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl
/usr/bin/glib-compile-schemas
/usr/include/libxml2/libxml/xmlschemastypes.h
/usr/include/libxml2/libxml/xmlschemas.h
/usr/include/libxml2/libxml/schematron.h
/usr/include/libxml2/libxml/schemasInternals.h
/usr/include/glib-2.0/gio/gsettingsschema.h

```

I think the problem is, that `/usr/share/glib-2.0/schemas` is empty looking at [this](https://developer.gnome.org/gio//2.50/glib-compile-schemas.html) and for e.g. my laptop, where I find many xml files in this folder:

```auto
[malte@mtop snapcast]$ ls /usr/share/glib-2.0/schemas/
00_org.gnome.shell.extensions.classic.gschema.override
00_org.gnome.shell.gschema.override
gschema.dtd
gschemas.compiled
org.freedesktop.ColorHelper.gschema.xml
org.freedesktop.folks.gschema.xml
org.freedesktop.pulseaudio.gschema.xml
org.freedesktop.Tracker.DB.gschema.xml
org.freedesktop.Tracker.enums.xml
org.freedesktop.Tracker.Extract.gschema.xml
org.freedesktop.Tracker.FTS.gschema.xml
org.freedesktop.Tracker.gschema.xml
org.freedesktop.Tracker.Miner.Files.gschema.xml
org.freedesktop.TrackerMiners.enums.xml
org.freedesktop.Tracker.Store.gschema.xml
org.freedesktop.Tracker.Writeback.gschema.xml
org.gnome.baobab.gschema.xml
org.gnome.books.gschema.xml
org.gnome.boxes.gschema.xml
org.gnome.calculator.gschema.xml
org.gnome.calendar.enums.xml
org.gnome.calendar.gschema.xml
org.gnome.Characters.gschema.xml
org.gnome.Cheese.gschema.xml
org.gnome.clocks.gschema.xml
org.gnome.Contacts.gschema.xml
org.gnome.ControlCenter.gschema.xml
org.gnome.crypto.cache.gschema.xml
org.gnome.crypto.pgp.gschema.xml
org.gnome.desktop.a11y.applications.gschema.xml
org.gnome.desktop.a11y.gschema.xml
org.gnome.desktop.a11y.keyboard.gschema.xml
org.gnome.desktop.a11y.magnifier.gschema.xml
org.gnome.desktop.a11y.mouse.gschema.xml
org.gnome.desktop.app-folders.gschema.xml
org.gnome.desktop.background.gschema.xml
org.gnome.desktop.calendar.gschema.xml
org.gnome.desktop.datetime.gschema.xml
org.gnome.desktop.default-applications.gschema.xml
org.gnome.desktop.enums.xml
org.gnome.desktop.file-sharing.gschema.xml
org.gnome.desktop.input-sources.gschema.xml
org.gnome.desktop.interface.gschema.xml
org.gnome.desktop.lockdown.gschema.xml
org.gnome.desktop.media-handling.gschema.xml
org.gnome.desktop.notifications.gschema.xml
org.gnome.desktop.peripherals.gschema.xml
org.gnome.desktop.privacy.gschema.xml
org.gnome.desktop.remote-desktop.enums.xml
org.gnome.desktop.remote-desktop.gschema.xml
org.gnome.desktop.screensaver.gschema.xml
org.gnome.desktop.search-providers.gschema.xml
org.gnome.desktop.session.gschema.xml
org.gnome.desktop.sound.gschema.xml
org.gnome.desktop.thumbnail-cache.gschema.xml
org.gnome.desktop.thumbnailers.gschema.xml
org.gnome.desktop.wm.keybindings.gschema.xml
org.gnome.desktop.wm.preferences.gschema.xml
org.gnome.dictionary.gschema.xml
org.gnome.Disks.gschema.xml
org.gnome.Documents.enums.xml
org.gnome.documents.gschema.xml
org.gnome.eog.enums.xml
org.gnome.eog.gschema.xml
org.gnome.Epiphany.enums.xml
org.gnome.epiphany.gschema.xml
org.gnome.Evince.gschema.xml
org.gnome.evolution.addressbook.gschema.xml
org.gnome.evolution.bogofilter.gschema.xml
org.gnome.evolution.calendar.gschema.xml
org.gnome.evolution-data-server.addressbook.gschema.xml
org.gnome.evolution-data-server.calendar.gschema.xml
org.gnome.evolution-data-server.gschema.xml
org.gnome.Evolution.DefaultSources.gschema.xml
org.gnome.evolution.eds-shell.gschema.xml
org.gnome.evolution.gschema.xml
org.gnome.evolution.importer.gschema.xml
org.gnome.evolution.mail.gschema.xml
org.gnome.evolution.plugin.attachment-reminder.gschema.xml
org.gnome.evolution.plugin.autocontacts.gschema.xml
org.gnome.evolution.plugin.email-custom-header.gschema.xml
org.gnome.evolution.plugin.external-editor.gschema.xml
org.gnome.evolution.plugin.face-picture.gschema.xml
org.gnome.evolution.plugin.itip.gschema.xml
org.gnome.evolution.plugin.mail-notification.gschema.xml
org.gnome.evolution.plugin.prefer-plain.gschema.xml
org.gnome.evolution.plugin.publish-calendar.gschema.xml
org.gnome.evolution.plugin.templates.gschema.xml
org.gnome.evolution.shell.gschema.xml
org.gnome.evolution.shell.network-config.gschema.xml
org.gnome.evolution.spamassassin.gschema.xml
org.gnome.evolution.text-highlight.gschema.xml
org.gnome.FileRoller.gschema.xml
org.gnome.gedit.enums.xml
org.gnome.gedit.gschema.xml
org.gnome.gedit.plugins.externaltools.gschema.xml
org.gnome.gedit.plugins.filebrowser.enums.xml
org.gnome.gedit.plugins.filebrowser.gschema.xml
org.gnome.gedit.plugins.pythonconsole.gschema.xml
org.gnome.gedit.plugins.time.enums.xml
org.gnome.gedit.plugins.time.gschema.xml
org.gnome.gnome-screenshot.gschema.xml
org.gnome.gnome-system-monitor.enums.xml
org.gnome.gnome-system-monitor.gschema.xml
org.gnome.GWeather.enums.xml
org.gnome.GWeather.gschema.xml
org.gnome.libgnomekbd.desktop.gschema.xml
org.gnome.libgnomekbd.gschema.xml
org.gnome.libgnomekbd.keyboard.gschema.xml
org.gnome.login-screen.gschema.xml
org.gnome.Logs.enums.xml
org.gnome.Logs.gschema.xml
org.gnome.Maps.gschema.xml
org.gnome.mousetweaks.enums.xml
org.gnome.mousetweaks.gschema.xml
org.gnome.Music.gschema.xml
org.gnome.mutter.gschema.xml
org.gnome.mutter.wayland.gschema.xml
org.gnome.nautilus.gschema.xml
org.gnome.nm-applet.gschema.xml
org.gnome.online-accounts.gschema.xml
org.gnome.photos.gschema.xml
org.gnome.power-manager.gschema.xml
org.gnome.seahorse.recipients.gschema.xml
org.gnome.SessionManager.gschema.xml
org.gnome.settings-daemon.enums.xml
org.gnome.settings-daemon.peripherals.gschema.xml
org.gnome.settings-daemon.peripherals.wacom.gschema.xml
org.gnome.settings-daemon.plugins.color.gschema.xml
org.gnome.settings-daemon.plugins.gschema.xml
org.gnome.settings-daemon.plugins.housekeeping.gschema.xml
org.gnome.settings-daemon.plugins.media-keys.gschema.xml
org.gnome.settings-daemon.plugins.power.gschema.xml
org.gnome.settings-daemon.plugins.sharing.gschema.xml
org.gnome.settings-daemon.plugins.xsettings.gschema.xml
org.gnome.shell.extensions.auto-move-windows.gschema.xml
org.gnome.shell.extensions.example.gschema.xml
org.gnome.shell.extensions.native-window-placement.gschema.xml
org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml
org.gnome.shell.extensions.user-theme.gschema.xml
org.gnome.shell.extensions.window-list.gschema.xml
org.gnome.shell.gschema.xml
org.gnome.SimpleScan.gschema.xml
org.gnome.software.gschema.xml
org.gnome.system.dns_sd.gschema.xml
org.gnome.system.gvfs.enums.xml
org.gnome.system.locale.gschema.xml
org.gnome.system.location.gschema.xml
org.gnome.system.proxy.gschema.xml
org.gnome.system.smb.gschema.xml
org.gnome.Terminal.gschema.xml
org.gnome.todo.background.gschema.xml
org.gnome.todo.enums.xml
org.gnome.todo.gschema.xml
org.gnome.todo.txt.gschema.xml
org.gnome.totem.enums.xml
org.gnome.totem.gschema.xml
org.gnome.totem.plugins.opensubtitles.gschema.xml
org.gnome.totem.plugins.pythonconsole.gschema.xml
org.gnome.Vino.enums.xml
org.gnome.Vino.gschema.xml
org.gnome.yelp.gschema.xml
org.gtk.Demo.gschema.xml
org.gtk.exampleapp.gschema.xml
org.gtk.Settings.ColorChooser.gschema.xml
org.gtk.Settings.Debug.gschema.xml
org.gtk.Settings.EmojiChooser.gschema.xml
org.gtk.Settings.FileChooser.gschema.xml
org.virt-manager.virt-manager.gschema.xml

```

so anybody knows where I find these schema files under alpine?

Here is a complete debug log of the container failing: [https://pastebin.com/wCQzJ3Uc](https://pastebin.com/wCQzJ3Uc).

The first line of the debug indicates, that `**(gst-plugin-scanner:8): CRITICAL**: 11:17:23.816: Couldn't g_module_open libpython. Reason: Error loading shared library /usr/lib/libpython3.6m.so: No such file or directory` is missing. In the container I only find:

```auto
find / -name libpython\*
/usr/lib/libpython2.7.so
/usr/lib/python2.7/config/libpython2.7.a
/usr/lib/libpython2.7.so.1.0
/usr/lib/libpython3.6m.so.1.0
/usr/lib/libpython3.so

```

So could this just be the wrong Verison?

---

<div class="post-metadata">

**Author:** ![deisi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/deisi/32/1070_2.png) [@deisi](https://discourse.mopidy.com/u/deisi)\
**Post date:** [January 13, 2019, 12:07pm UTC](https://discourse.mopidy.com/t/alpine-based-docker-image/3019/2 "2019-01-13T12:07:38Z")

</div>

> [@deisi](#):
>
> .1.0

And now I have it. You **must not use alpine:edge** instead it must be **alpine:3.8**. And bufff it magically works.

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [January 14, 2019, 10:16pm UTC](https://discourse.mopidy.com/t/alpine-based-docker-image/3019/3 "2019-01-14T22:16:02Z")

</div>

I don’t have any experience with using alpine. Is that something we should add to our documentation or is using (bleeding?) edge generally not something people would do?

---

<div class="post-metadata">

**Author:** ![deisi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/deisi/32/1070_2.png) [@deisi](https://discourse.mopidy.com/u/deisi)\
**Post date:** [January 15, 2019, 9:42am UTC](https://discourse.mopidy.com/t/alpine-based-docker-image/3019/4 "2019-01-15T09:42:23Z")

</div>

Hmm, I don’t really know. What tricked me into using alpine:edge was, that mopidy is available as a package for alpine in the testing branch of the edge version. See [https://pkgs.alpinelinux.org/packages?name=mopidy&branch=edge](https://pkgs.alpinelinux.org/packages?name=mopidy&branch=edge)

So I thought I’ll be smart and take the edge version anyway. Well turned out I’m not and instead I wasted a lot of time on this.

I think its not really up to mopidy, to catch up for all the nifty distribution based issues around it. instead maybe it would be helpful if there would be something like an minimal official docker container, and then people could use that to build custom configurations from it.

Maybe my dockerfile at [https://github.com/deisi/audiostation-mopidy/blob/master/Dockerfile](https://github.com/deisi/audiostation-mopidy/blob/master/Dockerfile) could actually be used as a starting point for it. I would suggest to even remove Musikbox extension and to have a container as small as possible and then provide some documentation how to build a custom container with extensions and custom configuration from it.
