2022-01-16 03:12:04 +00:00
|
|
|
FROM nginxinc/nginx-unprivileged:stable-alpine
|
2020-11-16 19:28:10 +00:00
|
|
|
|
2020-11-17 02:22:28 +00:00
|
|
|
ENV PUBLIC_DIR /usr/share/nginx/html
|
2023-10-26 03:30:20 +00:00
|
|
|
ENV TACTICAL_DIR /opt/tactical
|
|
|
|
ENV TACTICAL_READY_FILE ${TACTICAL_DIR}/tmp/tactical.ready
|
2022-01-16 03:12:04 +00:00
|
|
|
USER root
|
|
|
|
|
2022-01-17 09:11:59 +00:00
|
|
|
RUN deluser --remove-home nginx \
|
|
|
|
&& addgroup -S nginx -g 1000 \
|
|
|
|
&& adduser -S -G nginx -u 1000 nginx
|
|
|
|
|
2022-05-29 07:40:49 +00:00
|
|
|
RUN apk add --no-cache bash wget tar grep
|
2022-01-17 09:11:59 +00:00
|
|
|
|
2020-11-29 04:26:53 +00:00
|
|
|
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
|
2020-11-24 14:33:34 +00:00
|
|
|
|
2022-05-29 07:40:49 +00:00
|
|
|
COPY api/tacticalrmm/tacticalrmm/settings.py /tmp/settings.py
|
|
|
|
|
|
|
|
RUN WEB_VERSION=$(grep -o 'WEB_VERSION.*' /tmp/settings.py | cut -d'"' -f 2) \
|
|
|
|
&& webtar="trmm-web-v${WEB_VERSION}.tar.gz" \
|
|
|
|
&& wget -q "https://github.com/amidaware/tacticalrmm-web/releases/download/v${WEB_VERSION}/${webtar}" -O /tmp/${webtar} \
|
|
|
|
&& tar -xzf /tmp/${webtar} -C ${PUBLIC_DIR} \
|
|
|
|
&& rm -f /tmp/${webtar}
|
|
|
|
|
|
|
|
RUN mv ${PUBLIC_DIR}/dist/* ${PUBLIC_DIR}
|
|
|
|
RUN rm -rf ${PUBLIC_DIR}/dist
|
2022-01-17 09:11:59 +00:00
|
|
|
RUN chown -R nginx:nginx /etc/nginx && chown -R nginx:nginx ${PUBLIC_DIR}
|
2020-11-17 02:22:28 +00:00
|
|
|
|
2020-11-19 03:42:45 +00:00
|
|
|
COPY docker/containers/tactical-frontend/entrypoint.sh /docker-entrypoint.d/
|
|
|
|
RUN chmod +x /docker-entrypoint.d/entrypoint.sh
|
2020-11-20 00:03:44 +00:00
|
|
|
|
2022-01-16 03:12:04 +00:00
|
|
|
USER nginx
|
|
|
|
|
|
|
|
EXPOSE 8080
|