[skip ci] fix docker

This commit is contained in:
Yann Stepienik
2024-08-01 19:44:26 +01:00
parent 5f9794c84b
commit 9c1657a947
3 changed files with 5 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ EXPOSE 443 80
VOLUME /config VOLUME /config
RUN apt-get update \ 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 \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
@@ -33,6 +33,4 @@ COPY build/* ./
COPY static ./static COPY static ./static
# Run the respective binary based on the BINARY_NAME # Run the respective binary based on the BINARY_NAME
CMD service dbus start && \ CMD ["sh", "-c", "./$(cat /binary_name)"]
service avahi-daemon start && \
./$(cat /binary_name)

View File

@@ -10,7 +10,7 @@ WORKDIR /app
ENV PATH=$PATH:/usr/local/go/bin 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 wget curl && \
apt-get install -y --no-install-recommends nodejs && \ apt-get install -y --no-install-recommends nodejs && \
wget https://golang.org/dl/go1.21.6.linux-amd64.tar.gz && \ wget https://golang.org/dl/go1.21.6.linux-amd64.tar.gz && \
@@ -40,6 +40,4 @@ RUN npm run client-build && \
WORKDIR /app/build WORKDIR /app/build
CMD service dbus start && \ CMD ./cosmos
service avahi-daemon start && \
./cosmos

View File

@@ -167,7 +167,7 @@ func PublishAllMDNSFromConfig() {
} }
if err != nil { 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 { } else {
routes := utils.GetAllHostnames(false, true) routes := utils.GetAllHostnames(false, true)