diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d7ccc6b768a9edb8441393acd5cecb3e42c48acc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# These three ARGs must point to an Iron Bank image - the BASE_REGISTRY should always be what is written below; please use \ +# '--build-arg' when building locally to replace these values +# If your container is not based on either the ubi7/ubi8 Iron Bank images, then it should be based on a different Iron Bank image +# Note that you will not be able to pull containers from nexus-docker-secure.levelup-dev.io into your local dev machine +ARG BASE_REGISTRY=registry1.dsop.io +ARG BASE_IMAGE=ironbank/redhat/ubi/ubi8-minimal +ARG BASE_TAG=8.4 + +# FROM statement must reference the base image using the three ARGs established +FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} + +ENV REQIRED_PACKAGES="shadow-utils libsemanage" + +RUN microdnf --setopt=tsflags=nodocs install $REQIRED_PACKAGES \ + && useradd sysdig -u 1000 \ + && microdnf remove $REQIRED_PACKAGES \ + && microdnf clean all \ + && rm -rf /var/cache/yum + +ARG BINARY="webhook-v3.2.0" + +COPY ${BINARY} /bin/webhook + +EXPOSE 5000 +HEALTHCHECK --start-period=30s CMD curl -f 127.0.0.1:5000 || exit 1 +USER 1000 +ENTRYPOINT ["/bin/webhook"] \ No newline at end of file