-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbody-entrypoint.docker
30 lines (25 loc) · 1000 Bytes
/
body-entrypoint.docker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Install the mediaserver and dependencies
RUN apt-get update \
&& apt-get install --no-install-recommends --yes \
gdb \
sudo \
./vms_server.deb \
# Cleanup
&& apt-get clean \
&& apt-get autoremove --purge \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /temp
# Add the mediaserver ${COMPANY_NAME} user to the sudoers group
# 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}
# Copy the entrypoint.sh launch script
# entrypoint.sh will run the mediaserver and root-tool
COPY entrypoint.sh /opt/entrypoint.sh
RUN chmod +x /opt/entrypoint.sh
# Run the entrypoint as the mediaserver ${COMPANY_NAME} user
# Note that this user exists in the container and does not directly map to a user on the host
USER ${COMPANY_NAME}
# Runs entrypoint.sh on container start
ENTRYPOINT ["/opt/entrypoint.sh"]
# Expose port 7001
EXPOSE 7001