-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile.centos7
47 lines (40 loc) · 1.64 KB
/
Dockerfile.centos7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright 2019 clair authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG GIT_TAG
ARG REPO_NAME
FROM ${REPO_NAME}:${GIT_TAG}-centos7-build-env AS build-env
FROM centos:7
LABEL maintainer "[email protected]"
ENV CLAIRDIR /clair
ENV CLAIRCONF /clair/config
WORKDIR $CLAIRDIR
# Install init system and Clair depended binaries
RUN yum install -y --setopt=tsflags=nodocs --setopt=skip_missing_names_on_install=False python-setuptools git rpm xz
RUN rpm --version | grep -q 'version 4' # ensure rpm is version 4
RUN easy_install supervisor
RUN yum remove -y kernel-headers
# Copy built binaries into the runtime image
COPY --from=build-env /go/bin/cfssl /usr/local/bin/cfssl
COPY --from=build-env /go/bin/cfssljson /usr/local/bin/cfssljson
COPY --from=build-env /go/bin/jwtproxy /usr/local/bin/jwtproxy
COPY --from=build-env /go/bin/clair /usr/local/bin/clair
# Add the init scripts
ADD generate_mitm_ca.rhel.sh $CLAIRDIR/generate_mitm_ca.sh
ADD clair-entrypoint.sh $CLAIRDIR/clair-entrypoint.sh
ADD supervisord.conf $CLAIRDIR/supervisord.conf
VOLUME /clair/config
VOLUME /clair/certs
EXPOSE 6060 6061
ENTRYPOINT ["/clair/clair-entrypoint.sh"]
CMD ["scanner"]