Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CreateMatrix/Dockerfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ RUN apt-get update \
# Only allow sudo no password access to the root-tool
RUN echo "${COMPANY_NAME} ALL = NOPASSWD: /opt/${COMPANY_NAME}/mediaserver/bin/root-tool" > /etc/sudoers.d/${COMPANY_NAME}

# Tell mediaserver it is running under Docker so it reports its OS variant correctly
# https://github.com/networkoptix/nxvms-docker/commit/54bbd16
RUN echo "currentOsVariantOverride=docker" >> /opt/${COMPANY_NAME}/mediaserver/etc/mediaserver.conf

""";
// Note: for non-LSIO, currentOsVariantOverride=docker is injected at runtime by
// Docker/entrypoint.sh, because the recommended non-LSIO setup bind-mounts
// /opt/${COMPANY_NAME}/mediaserver/etc from the host, which would hide any
// build-time edit. Both variants now use runtime injection for the same reason.
}

return install;
Expand Down
4 changes: 0 additions & 4 deletions Docker/DWSpectrum.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ RUN apt-get update \
# Only allow sudo no password access to the root-tool
RUN echo "${COMPANY_NAME} ALL = NOPASSWD: /opt/${COMPANY_NAME}/mediaserver/bin/root-tool" > /etc/sudoers.d/${COMPANY_NAME}

# Tell mediaserver it is running under Docker so it reports its OS variant correctly
# https://github.com/networkoptix/nxvms-docker/commit/54bbd16
RUN echo "currentOsVariantOverride=docker" >> /opt/${COMPANY_NAME}/mediaserver/etc/mediaserver.conf

# Copy the entrypoint.sh launch script
# entrypoint.sh will run the mediaserver and root-tool
COPY entrypoint.sh /opt/entrypoint.sh
Expand Down
4 changes: 0 additions & 4 deletions Docker/NxGo.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ RUN apt-get update \
# Only allow sudo no password access to the root-tool
RUN echo "${COMPANY_NAME} ALL = NOPASSWD: /opt/${COMPANY_NAME}/mediaserver/bin/root-tool" > /etc/sudoers.d/${COMPANY_NAME}

# Tell mediaserver it is running under Docker so it reports its OS variant correctly
# https://github.com/networkoptix/nxvms-docker/commit/54bbd16
RUN echo "currentOsVariantOverride=docker" >> /opt/${COMPANY_NAME}/mediaserver/etc/mediaserver.conf

# Copy the entrypoint.sh launch script
# entrypoint.sh will run the mediaserver and root-tool
COPY entrypoint.sh /opt/entrypoint.sh
Expand Down
4 changes: 0 additions & 4 deletions Docker/NxMeta.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ RUN apt-get update \
# Only allow sudo no password access to the root-tool
RUN echo "${COMPANY_NAME} ALL = NOPASSWD: /opt/${COMPANY_NAME}/mediaserver/bin/root-tool" > /etc/sudoers.d/${COMPANY_NAME}

# Tell mediaserver it is running under Docker so it reports its OS variant correctly
# https://github.com/networkoptix/nxvms-docker/commit/54bbd16
RUN echo "currentOsVariantOverride=docker" >> /opt/${COMPANY_NAME}/mediaserver/etc/mediaserver.conf

# Copy the entrypoint.sh launch script
# entrypoint.sh will run the mediaserver and root-tool
COPY entrypoint.sh /opt/entrypoint.sh
Expand Down
4 changes: 0 additions & 4 deletions Docker/NxWitness.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ RUN apt-get update \
# Only allow sudo no password access to the root-tool
RUN echo "${COMPANY_NAME} ALL = NOPASSWD: /opt/${COMPANY_NAME}/mediaserver/bin/root-tool" > /etc/sudoers.d/${COMPANY_NAME}

# Tell mediaserver it is running under Docker so it reports its OS variant correctly
# https://github.com/networkoptix/nxvms-docker/commit/54bbd16
RUN echo "currentOsVariantOverride=docker" >> /opt/${COMPANY_NAME}/mediaserver/etc/mediaserver.conf

# Copy the entrypoint.sh launch script
# entrypoint.sh will run the mediaserver and root-tool
COPY entrypoint.sh /opt/entrypoint.sh
Expand Down
4 changes: 0 additions & 4 deletions Docker/WisenetWAVE.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ RUN apt-get update \
# Only allow sudo no password access to the root-tool
RUN echo "${COMPANY_NAME} ALL = NOPASSWD: /opt/${COMPANY_NAME}/mediaserver/bin/root-tool" > /etc/sudoers.d/${COMPANY_NAME}

# Tell mediaserver it is running under Docker so it reports its OS variant correctly
# https://github.com/networkoptix/nxvms-docker/commit/54bbd16
RUN echo "currentOsVariantOverride=docker" >> /opt/${COMPANY_NAME}/mediaserver/etc/mediaserver.conf

# Copy the entrypoint.sh launch script
# entrypoint.sh will run the mediaserver and root-tool
COPY entrypoint.sh /opt/entrypoint.sh
Expand Down
12 changes: 12 additions & 0 deletions Docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
echo "Launching root-tool"
sudo /opt/${COMPANY_NAME}/mediaserver/bin/root-tool &

# Tell mediaserver it is running under Docker so it reports its OS variant correctly
# https://github.com/networkoptix/nxvms-docker/commit/54bbd16
# Inject at runtime rather than build time because the recommended non-LSIO setup
# bind-mounts /opt/${COMPANY_NAME}/mediaserver/etc from the host, which hides any
# build-time edit. Idempotent so subsequent starts don't duplicate the line.
MEDIASERVER_CONF="/opt/${COMPANY_NAME}/mediaserver/etc/mediaserver.conf"
if ! grep -q "^currentOsVariantOverride=docker" "${MEDIASERVER_CONF}" 2>/dev/null
then
echo "Adding currentOsVariantOverride=docker to ${MEDIASERVER_CONF}"
echo "currentOsVariantOverride=docker" >> "${MEDIASERVER_CONF}"
fi

# Launch the mediaserver using exec so it receives shutdown commands
echo "Launching mediaserver"
exec /opt/${COMPANY_NAME}/mediaserver/bin/mediaserver -e