: After a little change, it didn't work properly

Describe the problem
I did a little change on your dockerfile repository and the build failed with a GPG key error?

To Reproduce
Steps to reproduce the behavior:

  1. Edit the Dockerfile:
FROM debian:buster

ENV DEBIAN_FRONTEND noninteractive

RUN mkdir /etc/yunohost \
 && touch /etc/yunohost/from_script

ADD yunohost.conf /etc/yunohost/yunohost.conf
ADD debconfv2 /tmp/debconfv2

RUN rm /usr/sbin/policy-rc.d \
 && apt-get update --quiet \
 && apt-get install -y --force-yes --no-install-recommends wget gnupg apt-utils openssh-server \
 && echo "deb debian buster main" >> /etc/apt/sources.list.d/yunohost.list \
 && wget -O- -q | apt-key add - -qq \
 && apt-get update --quiet \
 && debconf-set-selections /tmp/debconfv2 \
 && apt-get install -y --force-yes \
 && apt-get -o Dpkg::Options::="--force-confold" install -qq -y --force-yes \
 yunohost yunohost-config yunohost-config-postfix postfix postfix-ldap postfix-policyd-spf-perl \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ADD firstrun /etc/init.d/firstrun
RUN update-rc.d firstrun defaults

EXPOSE 22 25 53/udp 443 465 993 5222 5269 5290
CMD /sbin/init
# -----END DOCKERFILE-----
  1. Launch Docker
  2. Build the image
  3. See error

Expected behavior
Build exit with 0


Desktop (please complete the following information):

  • OS: Cloud host
  • Browser: Firefox
  • Docker Version: latest

Additional context
Other scripts may not wrong. Only GPG keys problem.


In the Yunohost documentation page for Docker we can read :

YunoHost doesn’t support Docker officially since issues with versions 2.4+. In question, YunoHost 2.4+ doesn’t work anymore on Docker because YunoHost requires systemd and Docker has chosen to not support it natively (and there are other problems link to the firewall and services).

Good bye,

To try and explain even more the previously mentioned disclaimer:

DO NOT run Yunohost inside a docker

  • Being able to run Yunohost in Docker involve so much black magic that it should really make you think about wether or not it’s a good idea
  • Docker is meant to run one single executable which is indeed the classical case for “running an app”. But Yunohost isn’t an app, it’s an entire ecosystem. Would you run your entire graphical environment in a single docker container ? No you wouldn’t, because that makes no sense. If you want some sort of “put Yunohost in an independent box”, go for LXC/LXD.
  • In Docker’s spirits, the data of the thing you run inside a Docker should be outside of the container itself, such that you could delete/recreate the entire docker without loosing the data. This is not at all the case handled by Yunohost because it’s just not designed for this.
1 Like

@gmilad Oh I didn’t notice that before.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.