2017-10-30 06:50:44 +01:00
|
|
|
FROM vmware/photon:1.0
|
2017-07-11 06:00:44 +02:00
|
|
|
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2017-10-30 06:50:44 +01:00
|
|
|
RUN tdnf distro-sync -y \
|
|
|
|
&& tdnf erase vim -y \
|
2017-11-03 11:06:27 +01:00
|
|
|
&& tdnf install -y git shadow sudo bzr rpm xz python-xml \
|
2017-10-30 06:50:44 +01:00
|
|
|
&& tdnf clean all \
|
2017-11-03 11:06:27 +01:00
|
|
|
&& mkdir /clair2.0.1/ \
|
|
|
|
&& groupadd -r -g 10000 clair \
|
|
|
|
&& useradd --no-log-init -m -r -g 10000 -u 10000 clair
|
2017-07-11 06:00:44 +02:00
|
|
|
COPY clair /clair2.0.1/
|
2017-11-03 11:06:27 +01:00
|
|
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
2017-11-16 07:02:09 +01:00
|
|
|
COPY dumb-init /dumb-init \
|
|
|
|
|
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
|
|
|
|
2017-11-03 11:06:27 +01:00
|
|
|
RUN chown -R 10000:10000 /clair2.0.1 \
|
|
|
|
&& chmod u+x /clair2.0.1/clair \
|
|
|
|
&& 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
|
|
|
USER clair
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2017-11-03 11:06:27 +01:00
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|