diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..be40911 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,34 @@ +FROM registry-proxy.engineering.redhat.com/rh-osbs/ubi9-minimal:9.2-717 + +ENV SUMMARY="Tang IAM proxy" \ + DESCRIPTION="Tang IAM proxy allows to redirect traffic to tang backend by SPIFFE ID" \ + VERSION=0.1 \ + PORT=8000 + +LABEL name="rhel9/tang-iam-proxy" \ + summary="${SUMMARY}" \ + description="${DESCRIPTION}" \ + version="${VERSION}" \ + usage="podman run -d -p 8000:8000 -v database-dir:/var/db --name tang rhel9/tang-iam-proxy" \ + maintainer="Red Hat, Inc." \ + help="cat /README.md" \ + com.redhat.component="tang-iam-proxy" \ + io.k8s.display-name="Tang IAM Proxy" \ + io.k8s.description="${DESCRIPTION}" \ + io.openshift.expose-services="8000:tang-iam-proxy" \ + io.openshift.tags="tang-iam-proxy,container,NBDE,PBD,clevis,LUKS,McCallum-Relyea,Network Bound Disk Encryption" + + +RUN microdnf update -y && \ + microdnf install -y \ + psmisc \ + procps-ng && \ + microdnf clean all && \ + rm -rf /var/cache/yum + +COPY root / + +VOLUME ["/var/db"] +EXPOSE ${PORT} + +CMD ["/usr/bin/tang-iam-proxy"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e59333a --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +BIN=tang-iam-proxy +ROOT_TARGET=root/usr/bin +BIN_TARGET=$(ROOT_TARGET)/$(BIN) + +.PHONY: all bin img clean test + +all: bin img + echo "Building all ..." + +bin: + mkdir -p $(ROOT_TARGET) + go build -o $(BIN_TARGET) tang_iam_proxy.go + +img: + podman build -t=quay.io/sec-eng-special/tang-iam-proxy . + +clean: + rm -f $(BIN_TARGET)