File Dockerfile of Package container-longhorn-ui

#!BuildTag: longhorn-ui:v%%longhorn-ui_patch%%-%RELEASE%
#!BuildTag: longhorn-ui:v%%longhorn-ui_patch%%
#!BuildTag: longhorn-ui:latest


FROM opensuse/tumbleweed

RUN zypper -n install curl libxml2 bash gettext shadow nginx longhorn-ui && \
    zypper clean && rm -rf /var/cache/zypp/* && \
    rm -f /bin/sh && ln -s /bin/bash /bin/sh

WORKDIR /web

EXPOSE 8000
ENV LONGHORN_MANAGER_IP http://localhost:9500
ENV LONGHORN_UI_PORT 8000
ENV VERSION v%%longhorn-ui_patch%%-%RELEASE%
RUN mkdir -p /var/config/ && touch /var/run/nginx.pid && chown -R 499 /var/config /var/run/nginx.pid

# Use the uid of the default user (nginx) from the installed nginx package
USER 499

CMD ["/bin/bash", "-c", "mkdir -p /var/config/nginx/ && cp -r /etc/nginx/* /var/config/nginx/; envsubst '${LONGHORN_MANAGER_IP},${LONGHORN_UI_PORT}' < /etc/nginx/nginx.conf.template > /var/config/nginx/nginx.conf && nginx -c /var/config/nginx/nginx.conf -g 'daemon off;'"]
openSUSE Build Service is sponsored by