Copied Dockerfile of redhat images from jfrog-distroless repo

This commit is contained in:
anupteal
2021-10-06 21:22:43 +05:30
parent 161f222b2a
commit 6f833e53a9
20 changed files with 1470 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
ARG ROUTER_BASE_VERSION
FROM docker.bintray.io/jfrog/router:${ROUTER_BASE_VERSION} AS base
# The new image based on registry.access.redhat.com/ubi
FROM registry.access.redhat.com/ubi8
LABEL name="JFrog Pipelines Router" \
description="JFrog Pipelines Router image based on the Red Hat Universal Base Image." \
vendor="JFrog" \
summary="JFrog Pipelines Router (Red Hat UBI)" \
com.jfrog.license_terms="https://jfrog.com/platform/enterprise-plus-eula/"
# Environment needed for Router
ENV JF_ROUTER_USER=router \
ROUTER_USER_ID=1000721117 \
ROUTER_VERSION=${ROUTER_BASE_VERSION} \
JF_PRODUCT_HOME=/opt/jfrog/router \
JF_PRODUCT_DATA_INTERNAL=/var/opt/jfrog/router \
SERVICE_NAME=router
COPY --from=base /opt/jfrog/router /opt/jfrog/router
# Add license information to meet the Red Hat container image certification requirements
COPY --from=base /opt/jfrog/router/app/doc/* /licenses/
RUN mkdir -p /var/opt/jfrog && chmod 0777 /var/opt/jfrog
RUN useradd -M -s /usr/sbin/nologin --uid ${ROUTER_USER_ID} --user-group router && \
chown -R ${ROUTER_USER_ID}:${ROUTER_USER_ID} /opt/jfrog/router /var/opt/jfrog && \
yum install -y --disableplugin=subscription-manager wget && \
yum install -y --disableplugin=subscription-manager procps && \
yum install -y --disableplugin=subscription-manager net-tools && \
yum install -y --disableplugin=subscription-manager hostname
USER router
VOLUME /var/opt/jfrog/router
ENTRYPOINT ["/opt/jfrog/router/app/bin/entrypoint-router.sh"]