2018-07-19 14:45:20 +02:00
|
|
|
FROM photon:1.0
|
2017-07-11 06:00:44 +02:00
|
|
|
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2017-12-20 06:10:32 +01:00
|
|
|
RUN tdnf distro-sync -y \
|
2017-10-30 06:50:44 +01:00
|
|
|
&& tdnf erase vim -y \
|
2018-02-27 08:01:14 +01:00
|
|
|
&& tdnf install -y git shadow sudo bzr 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-07-12 07:59:51 +02:00
|
|
|
COPY ./binary/clair /clair/
|
2017-11-03 11:06:27 +01:00
|
|
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
2017-11-16 10:15:59 +01:00
|
|
|
COPY 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"]
|