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