From 83032457a20474b39d72b6bf3996e61770f0137b Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Tue, 19 Nov 2024 08:53:51 +0100 Subject: [PATCH 1/3] remove unzip dependency --- images/common/optional-installer.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/images/common/optional-installer.sh b/images/common/optional-installer.sh index 0b5ddfb..42e2984 100755 --- a/images/common/optional-installer.sh +++ b/images/common/optional-installer.sh @@ -15,8 +15,7 @@ install_container_management () { sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ podman \ podman-compose \ - tedge-container-plugin-ng \ - unzip + tedge-container-plugin-ng # create systemd-tmpfiles config to create a symlink for docker to the podman socket # which allows using docker and docker compose without having to set the DOCKER_HOST variable From 7b3a92991b6972dffd423dcf80f201b539d257f0 Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Tue, 19 Nov 2024 08:54:03 +0100 Subject: [PATCH 2/3] allow tedge user to call tedge-container --- images/common/optional-installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/common/optional-installer.sh b/images/common/optional-installer.sh index 42e2984..90a98b0 100755 --- a/images/common/optional-installer.sh +++ b/images/common/optional-installer.sh @@ -40,7 +40,7 @@ configure_users() { usermod -a -G adm tedge ||: if [ ! -f /etc/sudoers.d/tedge ]; then - sudo sh -c "echo 'tedge ALL = (ALL) NOPASSWD: /usr/bin/tedge, /usr/bin/tedge-write /etc/*, /etc/tedge/sm-plugins/[a-zA-Z0-9]*, /bin/sync, /sbin/init, /bin/systemctl, /bin/journalctl, /sbin/shutdown, /usr/bin/on_shutdown.sh' > /etc/sudoers.d/tedge" + sudo sh -c "echo 'tedge ALL = (ALL) NOPASSWD: /usr/bin/tedge, /usr/bin/tedge-write /etc/*, /etc/tedge/sm-plugins/[a-zA-Z0-9]*, /bin/sync, /sbin/init, /bin/systemctl, /bin/journalctl, /sbin/shutdown, /usr/bin/on_shutdown.sh, /usr/bin/tedge-container' > /etc/sudoers.d/tedge" fi } From b2bf8c660f1d7ab5adbc482ea6b7891217e5ad2e Mon Sep 17 00:00:00 2001 From: reubenmiller Date: Tue, 19 Nov 2024 09:43:13 +0100 Subject: [PATCH 3/3] add mosquitto listener 1884 for container network access --- .../common/config/mosquitto-conf/tedge-networkcontainer.conf | 3 +++ images/debian-systemd/debian-systemd.dockerfile | 1 + 2 files changed, 4 insertions(+) create mode 100644 images/common/config/mosquitto-conf/tedge-networkcontainer.conf diff --git a/images/common/config/mosquitto-conf/tedge-networkcontainer.conf b/images/common/config/mosquitto-conf/tedge-networkcontainer.conf new file mode 100644 index 0000000..12d1b78 --- /dev/null +++ b/images/common/config/mosquitto-conf/tedge-networkcontainer.conf @@ -0,0 +1,3 @@ +listener 1884 0.0.0.0 +allow_anonymous true +require_certificate false diff --git a/images/debian-systemd/debian-systemd.dockerfile b/images/debian-systemd/debian-systemd.dockerfile index 5082194..24c6239 100644 --- a/images/debian-systemd/debian-systemd.dockerfile +++ b/images/debian-systemd/debian-systemd.dockerfile @@ -114,6 +114,7 @@ COPY common/config/collectd.conf.d /etc/collectd/collectd.conf.d # Custom mosquitto config COPY common/config/mosquitto.conf /etc/mosquitto/conf.d/ +COPY common/config/mosquitto-conf/tedge-networkcontainer.conf /etc/tedge/mosquitto-conf/ # sudoers COPY common/config/sudoers.d/* /etc/sudoers.d/