2018-10-18 05:03:28 +02:00
|
|
|
FROM photon:2.0
|
2017-07-11 06:00:44 +02:00
|
|
|
|
2018-10-18 05:03:28 +02:00
|
|
|
RUN tdnf install -y git shadow sudo rpm xz python-xml >>/dev/null\
|
2017-10-30 06:50:44 +01:00
|
|
|
&& tdnf clean all \
|
2017-11-03 11:06:27 +01:00
|
|
|
&& groupadd -r -g 10000 clair \
|
2019-10-14 12:25:11 +02:00
|
|
|
&& useradd --no-log-init -m -g 10000 -u 10000 clair
|
|
|
|
COPY ./make/photon/clair/binary/clair /home/clair/
|
|
|
|
COPY ./make/photon/clair/docker-entrypoint.sh /home/clair/
|
|
|
|
COPY ./make/photon/clair/dumb-init /home/clair/
|
|
|
|
COPY ./make/photon/common/install_cert.sh /home/clair/
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2017-07-11 06:00:44 +02:00
|
|
|
VOLUME /config
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2017-11-03 11:06:27 +01:00
|
|
|
EXPOSE 6060 6061
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2019-10-22 15:24:49 +02:00
|
|
|
RUN chown -R clair:clair /etc/pki/tls/certs \
|
2019-10-14 12:25:11 +02:00
|
|
|
&& chown -R clair:clair /home/clair \
|
|
|
|
&& chmod u+x /home/clair/clair \
|
|
|
|
&& chmod u+x /home/clair/docker-entrypoint.sh \
|
|
|
|
&& chmod +x /home/clair/dumb-init
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2017-11-03 11:06:27 +01:00
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl -sS 127.0.0.1:6061/health || exit 1
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2019-10-14 12:25:11 +02:00
|
|
|
WORKDIR /home/clair
|
|
|
|
USER clair
|
|
|
|
ENTRYPOINT ["./docker-entrypoint.sh"]
|