github.com/quay/claircore@v1.5.28/rhel/rhcc/testdata/Dockerfile-quay-quay-rhel8-v3.5.6-4 (about)

     1  
     2  FROM sha256:ad42391b9b4670e68a759d4cdb8780896071a1cb1ed519b474f901e597bf3b3d AS build-npm
     3  
     4  COPY $REMOTE_SOURCE $REMOTE_SOURCE_DIR
     5  WORKDIR $REMOTE_SOURCE_DIR/app
     6  
     7  RUN INSTALL_PKGS="\
     8          nodejs \
     9      " && \
    10      yum -y --setopt=tsflags=nodocs --setopt=skip_missing_names_on_install=False install $INSTALL_PKGS
    11  
    12  RUN cd source/config-tool/pkg/lib/editor && \
    13      npm config list && \
    14      npm install --ignore-engines --loglevel verbose && \
    15      npm run build
    16  
    17  RUN cd source/quay && \
    18      npm config list && \
    19      npm install --ignore-engines --loglevel verbose && \
    20      npm run build
    21  
    22  
    23  FROM sha256:320c4c36df196f57b67205292ec1514cce5d6c742cbdc01443f465d931d2bbd4 AS build-gomod
    24  
    25  COPY --from=build-npm $REMOTE_SOURCE_DIR/app $REMOTE_SOURCE_DIR/app
    26  WORKDIR $REMOTE_SOURCE_DIR/app
    27  
    28  COPY --from=build-npm $REMOTE_SOURCE_DIR/app/source/config-tool/pkg/lib/editor/static/build $REMOTE_SOURCE_DIR/app/source/config-tool/pkg/lib/editor/static/build
    29  
    30  # https://projects.engineering.redhat.com/browse/CLOUDBLD-1611
    31  # Until above is fixed, "go mod vendor" can't be run since the go.mod must be
    32  # in the root dir (ie. no multiples). Once fixed, add "go mod vendor" as a step
    33  # here and remove vendor dirs from quay-osbs repo
    34  #
    35  RUN cd source/config-tool && \
    36      go build ./cmd/config-tool
    37  
    38  RUN cd source/jwtproxy && \
    39      go build ./cmd/jwtproxy
    40  
    41  RUN cd source/pushgateway && \
    42      go build
    43  
    44  
    45  FROM sha256:ad42391b9b4670e68a759d4cdb8780896071a1cb1ed519b474f901e597bf3b3d
    46  
    47  LABEL com.redhat.component="quay-registry-container"
    48  LABEL name="quay/quay-rhel8"
    49  LABEL version="v3.5.6"
    50  LABEL io.k8s.display-name="Red Hat Quay"
    51  LABEL io.k8s.description="Red Hat Quay"
    52  LABEL summary="Red Hat Quay"
    53  LABEL maintainer="support@redhat.com"
    54  LABEL io.openshift.tags="quay"
    55  
    56  ENV PYTHON_VERSION=3.8 \
    57      PYTHON_ROOT=/usr/local/lib/python3.8 \
    58      PATH=$HOME/.local/bin/:$PATH \
    59      PYTHONUNBUFFERED=1 \
    60      PYTHONIOENCODING=UTF-8 \
    61      LANG=en_US.utf8
    62  
    63  ENV QUAYDIR=/quay-registry \
    64      QUAYCONF=/quay-registry/conf \
    65      QUAYPATH="."
    66  
    67  RUN mkdir $QUAYDIR
    68  WORKDIR $QUAYDIR
    69  
    70  ARG PIP_CERT
    71  COPY --from=build-npm $REMOTE_SOURCE_DIR $REMOTE_SOURCE_DIR
    72  COPY --from=build-npm $PIP_CERT $PIP_CERT
    73  RUN cp -Rp $REMOTE_SOURCE_DIR/app/source/quay/* $QUAYDIR
    74  
    75  COPY --from=build-gomod $REMOTE_SOURCE_DIR/app/source/config-tool/config-tool /usr/local/bin/config-tool
    76  COPY --from=build-gomod $REMOTE_SOURCE_DIR/app/source/jwtproxy/jwtproxy /usr/local/bin/jwtproxy
    77  COPY --from=build-gomod $REMOTE_SOURCE_DIR/app/source/config-tool/pkg/lib/editor $QUAYDIR/config_app
    78  COPY --from=build-gomod $REMOTE_SOURCE_DIR/app/source/pushgateway/pushgateway /usr/local/bin/pushgateway
    79  
    80  RUN INSTALL_PKGS="\
    81          python38 \
    82          nginx \
    83          openldap \
    84          postgresql \
    85          gcc-c++ git \
    86          openldap-devel \
    87          dnsmasq \
    88          memcached \
    89          openssl \
    90          skopeo \
    91          python38-devel \
    92          libffi-devel \
    93          openssl-devel \
    94          postgresql-devel \
    95          libjpeg-devel \
    96          " && \
    97      yum -y --setopt=tsflags=nodocs --setopt=skip_missing_names_on_install=False install $INSTALL_PKGS && \
    98      yum -y update && \
    99      yum -y clean all
   100  
   101  RUN alternatives --set python /usr/bin/python3 && \
   102      python -m pip install --no-cache-dir --upgrade setuptools pip && \
   103      python -m pip install --no-cache-dir wheel && \
   104      python -m pip install --no-cache-dir -r requirements-osbs.txt --no-cache && \
   105      python -m pip freeze
   106  
   107  RUN ln -s $QUAYCONF /conf && \
   108      ln -sf /dev/stdout /var/log/nginx/access.log && \
   109      ln -sf /dev/stdout /var/log/nginx/error.log && \
   110      chmod -R a+rwx /var/log/nginx
   111  
   112  # Cleanup
   113  RUN UNINSTALL_PKGS="\
   114          gcc-c++ git \
   115          openldap-devel \
   116          python38-devel \
   117          libffi-devel \
   118          openssl-devel \
   119          postgresql-devel \
   120          libjpeg-devel \
   121          kernel-headers \
   122      " && \
   123      yum remove -y $UNINSTALL_PKGS && \
   124      yum clean all && \
   125      rm -rf /var/cache/yum /tmp/* /var/tmp/* /root/.cache && \
   126      rm -rf $REMOTE_SOURCE_DIR
   127  
   128  EXPOSE 8080 8443 7443
   129  
   130  RUN chgrp -R 0 $QUAYDIR && \
   131      chmod -R g=u $QUAYDIR
   132  
   133  RUN mkdir /datastorage && chgrp 0 /datastorage && chmod g=u /datastorage && \
   134      mkdir -p /var/log/nginx && chgrp 0 /var/log/nginx && chmod g=u /var/log/nginx && \
   135      mkdir -p /conf/stack && chgrp 0 /conf/stack && chmod g=u /conf/stack && \
   136      mkdir -p /tmp && chgrp 0 /tmp && chmod g=u /tmp && \
   137      chmod g=u /etc/passwd
   138  
   139  RUN chgrp 0 /var/log/nginx && \
   140      chmod g=u /var/log/nginx && \
   141      chgrp -R 0 /etc/pki/ca-trust/extracted && \
   142      chmod -R g=u /etc/pki/ca-trust/extracted && \
   143      chgrp -R 0 /etc/pki/ca-trust/source/anchors && \
   144      chmod -R g=u /etc/pki/ca-trust/source/anchors && \
   145      chgrp -R 0 /usr/local/lib/python3.8/site-packages/certifi && \
   146      chmod -R g=u /usr/local/lib/python3.8/site-packages/certifi
   147  
   148  VOLUME ["/var/log", "/datastorage", "/tmp", "/conf/stack"]
   149  
   150  USER 1001
   151  
   152  ENTRYPOINT ["dumb-init", "--", "/quay-registry/quay-entrypoint.sh"]
   153  CMD ["registry"]
   154  
   155  ADD quay-registry-container-v3.5.6-4.json /root/buildinfo/content_manifests/quay-registry-container-v3.5.6-4.json
   156  LABEL "release"="4" "com.redhat.license_terms"="https://www.redhat.com/agreements" "distribution-scope"="public" "vendor"="Red Hat, Inc." "build-date"="2021-08-17T21:16:14.144538" "architecture"="x86_64" "vcs-type"="git" "vcs-ref"="0e033c625b6a775f5be730ce5a938aa91cc46d29" "com.redhat.build-host"="example.com" "description"="Red Hat Quay" "url"="https://access.redhat.com/containers/#/registry.access.redhat.com/quay/quay-rhel8/images/v3.5.6-4"