Skip to content

Commit

Permalink
First version of Makefile+Dockerfile (#50)
Browse files Browse the repository at this point in the history
Resolves: #49

Signed-off-by: Sergio Arroutbi <sarroutb@redhat.com>
  • Loading branch information
sarroutbi committed Aug 4, 2023
1 parent 38e9a68 commit c20d2fe
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit c20d2fe

Please sign in to comment.