diff --git a/dockerfile b/dockerfile index ed63464..6a1327d 100644 --- a/dockerfile +++ b/dockerfile @@ -19,7 +19,7 @@ EXPOSE 443 80 VOLUME /config RUN apt-get update \ - && apt-get install -y ca-certificates openssl fdisk mergerfs snapraid avahi-daemon avahi-utils dbus \ + && apt-get install -y ca-certificates openssl fdisk mergerfs snapraid \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* @@ -33,6 +33,4 @@ COPY build/* ./ COPY static ./static # Run the respective binary based on the BINARY_NAME -CMD service dbus start && \ - service avahi-daemon start && \ - ./$(cat /binary_name) \ No newline at end of file +CMD ["sh", "-c", "./$(cat /binary_name)"] \ No newline at end of file diff --git a/dockerfile.local b/dockerfile.local index 7c75c79..160a118 100644 --- a/dockerfile.local +++ b/dockerfile.local @@ -10,7 +10,7 @@ WORKDIR /app ENV PATH=$PATH:/usr/local/go/bin -RUN apt-get update && apt-get install -y ca-certificates openssl fdisk mergerfs snapraid dbus avahi-daemon avahi-utils && \ +RUN apt-get update && apt-get install -y ca-certificates openssl fdisk mergerfs snapraid && \ apt-get install -y --no-install-recommends wget curl && \ apt-get install -y --no-install-recommends nodejs && \ wget https://golang.org/dl/go1.21.6.linux-amd64.tar.gz && \ @@ -40,6 +40,4 @@ RUN npm run client-build && \ WORKDIR /app/build -CMD service dbus start && \ - service avahi-daemon start && \ - ./cosmos +CMD ./cosmos diff --git a/src/proxy/avahi.go b/src/proxy/avahi.go index c6e6776..bbbb447 100644 --- a/src/proxy/avahi.go +++ b/src/proxy/avahi.go @@ -167,7 +167,7 @@ func PublishAllMDNSFromConfig() { } if err != nil { - utils.MajorError("failed to create mDNS publisher (*.local domains will be missing) ", err) + utils.MajorError("failed to start mDNS (*.local domains). Install Avahi to solve this issue.", err) } else { routes := utils.GetAllHostnames(false, true)