tacticalrmm/docker/containers/tactical-frontend/dockerfile

34 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

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
USER root
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
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
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
USER nginx
EXPOSE 8080