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 \
|
2018-07-12 07:59:51 +02:00
|
|
|
&& mkdir /clair/ \
|
2017-11-03 11:06:27 +01:00
|
|
|
&& groupadd -r -g 10000 clair \
|
|
|
|
&& useradd --no-log-init -m -r -g 10000 -u 10000 clair
|
2018-09-03 11:40:26 +02:00
|
|
|
COPY ./make/photon/clair/binary/clair /clair/
|
|
|
|
COPY ./make/photon/clair/docker-entrypoint.sh /docker-entrypoint.sh
|
|
|
|
COPY ./make/photon/clair/dumb-init /dumb-init
|
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
|
|
|
|
2018-07-12 07:59:51 +02:00
|
|
|
RUN chown -R 10000:10000 /clair \
|
|
|
|
&& chmod u+x /clair/clair \
|
2017-11-16 10:15:59 +01:00
|
|
|
&& chmod u+x /docker-entrypoint.sh \
|
2017-11-16 07:02:09 +01:00
|
|
|
&& chmod +x /dumb-init
|
|
|
|
|
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
|
|
|
|
2017-11-03 11:06:27 +01:00
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|