Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore add all additional Dockerfiles for scaffolding #128

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions Dockerfile.cloudsqlproxy
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Build the cloudsqlproxy binary
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca AS build-env
WORKDIR /cloudsqlproxy
RUN git config --global --add safe.directory /cloudsqlproxy

COPY . .
USER root
RUN make build-cloudsqlproxy

# Install server
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:7d1ea7ac0c6f464dac7bae6994f1658172bf6068229f40778a513bc90f47e624
COPY --from=build-env /cloudsqlproxy/cloudsqlproxy /usr/local/bin/cloudsqlproxy
RUN chown root:0 /usr/local/bin/cloudsqlproxy && chmod g+wx /usr/local/bin/cloudsqlproxy

#Configure home directory
ENV HOME=/home
RUN chgrp -R 0 /${HOME} && chmod -R g=u /${HOME}

WORKDIR ${HOME}

LABEL description="Cloud SQL Proxy is a tool that makes connecting to Cloud sql databases easier."
LABEL io.k8s.description="Cloud SQL Proxy is a tool that makes connecting to Cloud sql databases easier."
LABEL io.k8s.display-name="Cloud SQL Proxy container image for redhat trusted artifact signer."
LABEL io.openshift.tags="cloudsqlproxy, Red Hat Trusted Artifact Signer."
LABEL summary="Provides the binary for cloudsqlproxy."
LABEL com.redhat.component="cloudsqlproxy"

# Set the binary as the entrypoint of the container
ENTRYPOINT ["cloudsqlproxy"]
29 changes: 29 additions & 0 deletions Dockerfile.createcerts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Build the createcerts binary
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca AS build-env
WORKDIR /createcerts
RUN git config --global --add safe.directory /createcerts

COPY . .
USER root
RUN make build-fulcio-createcerts

# Install server
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:7d1ea7ac0c6f464dac7bae6994f1658172bf6068229f40778a513bc90f47e624
COPY --from=build-env /createcerts/createcerts /usr/local/bin/createcerts
RUN chown root:0 /usr/local/bin/createcerts && chmod g+wx /usr/local/bin/createcerts

#Configure home directory
ENV HOME=/home
RUN chgrp -R 0 /${HOME} && chmod -R g=u /${HOME}

WORKDIR ${HOME}

LABEL description="The createcerts job creates a self-signed certificate, along with private/public keys, and a password used to encrypt the private key."
LABEL io.k8s.description="The createcerts job creates a self-signed certificate, along with private/public keys, and a password used to encrypt the private key."
LABEL io.k8s.display-name="createcerts job container image for Red Hat trusted artifact signer."
LABEL io.openshift.tags="createcerts, Red Hat trusted artifact signer."
LABEL summary="Provides the createcerts binary."
LABEL com.redhat.component="createcerts"

# Set the binary as the entrypoint of the container
ENTRYPOINT ["createcerts"]
29 changes: 29 additions & 0 deletions Dockerfile.createctconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Build the createctconfig binary
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca AS build-env
WORKDIR /createctconfig
RUN git config --global --add safe.directory /createctconfig

COPY . .
USER root
RUN make build-ctlog-createctconfig

# Install server
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:7d1ea7ac0c6f464dac7bae6994f1658172bf6068229f40778a513bc90f47e624
COPY --from=build-env /createctconfig/createctconfig /usr/local/bin/createctconfig
RUN chown root:0 /usr/local/bin/createctconfig && chmod g+wx /usr/local/bin/createctconfig

#Configure home directory
ENV HOME=/home
RUN chgrp -R 0 /${HOME} && chmod -R g=u /${HOME}

WORKDIR ${HOME}

LABEL description="The createctconfig job is responsible for configuring the CT log server."
LABEL io.k8s.description="The createctconfig job is responsible for configuring the CT log server."
LABEL io.k8s.display-name="createctconfig job container image for Red Hat Trusted Artifact Signer."
LABEL io.openshift.tags="createctconfig, Red Hat trusted artifact signer."
LABEL summary="Provides the createctconfig binary."
LABEL com.redhat.component="createctconfig"

# Set the binary as the entrypoint of the container
ENTRYPOINT ["createctconfig"]
29 changes: 29 additions & 0 deletions Dockerfile.createdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Build the createdb binary
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca AS build-env
WORKDIR /createdb
RUN git config --global --add safe.directory /createdb

COPY . .
USER root
RUN make build-trillian-createdb

# Install server
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:7d1ea7ac0c6f464dac7bae6994f1658172bf6068229f40778a513bc90f47e624
COPY --from=build-env /createdb/createdb /usr/local/bin/createdb
RUN chown root:0 /usr/local/bin/createdb && chmod g+wx /usr/local/bin/createdb

#Configure home directory
ENV HOME=/home
RUN chgrp -R 0 /${HOME} && chmod -R g=u /${HOME}

WORKDIR ${HOME}

LABEL description="The createdb job is responsible for creating the MySQL database in Trillian."
LABEL io.k8s.description="The createdb job is responsible for creating the MySQL database in Trillian."
LABEL io.k8s.display-name="createdb job container image for Red Hat Trusted Artifact Signer."
LABEL io.openshift.tags="createdb, Red Hat trusted artifact signer."
LABEL summary="Provides the createdb binary."
LABEL com.redhat.component="createdb"

# Set the binary as the entrypoint of the container
ENTRYPOINT ["createdb"]
29 changes: 29 additions & 0 deletions Dockerfile.createtree
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Build the createtree binary
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca AS build-env
WORKDIR /createtree
RUN git config --global --add safe.directory /createtree

COPY . .
USER root
RUN make build-trillian-createtree

# Install server
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:7d1ea7ac0c6f464dac7bae6994f1658172bf6068229f40778a513bc90f47e624
COPY --from=build-env /createtree/createtree /usr/local/bin/createtree
RUN chown root:0 /usr/local/bin/createtree && chmod g+wx /usr/local/bin/createtree

#Configure home directory
ENV HOME=/home
RUN chgrp -R 0 /${HOME} && chmod -R g=u /${HOME}

WORKDIR ${HOME}

LABEL description="The createtree job is responsible for creating a Merkle Tree for Rekor."
LABEL io.k8s.description="The createtree job is responsible for creating a Merkle Tree for Rekor."
LABEL io.k8s.display-name="createtree job container image for Red Hat Trusted Artifact Signer."
LABEL io.openshift.tags="createtree, Red Hat trusted artifact signer."
LABEL summary="Provides the createtree binary."
LABEL com.redhat.component="createtree"

# Set the binary as the entrypoint of the container
ENTRYPOINT ["createtree"]
29 changes: 29 additions & 0 deletions Dockerfile.ct-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca AS build-env
USER root
WORKDIR /ct_server
RUN git config --global --add safe.directory /ct_server
COPY hack/build-assets/certificate-transparency-go-1.1.6.tar.gz /ct_server/
RUN tar -zxvf certificate-transparency-go-1.1.6.tar.gz
WORKDIR /ct_server/certificate-transparency-go-1.1.6/trillian/ctfe/ct_server
RUN go build ./

# Install server
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:7d1ea7ac0c6f464dac7bae6994f1658172bf6068229f40778a513bc90f47e624
COPY --from=build-env /ct_server/certificate-transparency-go-1.1.6/trillian/ctfe/ct_server/ct_server /usr/local/bin/ct_server
RUN chown root:0 /usr/local/bin/ct_server && chmod g+wx /usr/local/bin/ct_server

#Configure home directory
ENV HOME=/home
RUN chgrp -R 0 /${HOME} && chmod -R g=u /${HOME}

WORKDIR ${HOME}

LABEL description="The binary responsible for providing the Certificate Transparency (CT) log server."
LABEL io.k8s.description="The binary responsible for providing the Certificate Transparency (CT) log server."
LABEL io.k8s.display-name="CT server container image for Red Hat Trusted Artifact Signer."
LABEL io.openshift.tags="CT-server, Red Hat trusted artifact signer."
LABEL summary="Provides the CT-server binary."
LABEL com.redhat.component="ct-server"

# Set the binary as the entrypoint of the container
ENTRYPOINT ["ct_server"]
30 changes: 30 additions & 0 deletions Dockerfile.ctlog-managectroots
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Build the managectroots binary
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca AS build-env
WORKDIR /ctlog-managectroots
RUN git config --global --add safe.directory /ctlog-managectroots

COPY . .
USER root

RUN make build-ctlog-managectroots

# Install server
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:7d1ea7ac0c6f464dac7bae6994f1658172bf6068229f40778a513bc90f47e624
COPY --from=build-env /ctlog-managectroots/managectroots /usr/local/bin/managectroots
RUN chown root:0 /usr/local/bin/managectroots && chmod g+wx /usr/local/bin/managectroots

#Configure home directory
ENV HOME=/home
RUN chgrp -R 0 /${HOME} && chmod -R g=u /${HOME}

WORKDIR ${HOME}

LABEL description="The job responsible for managing the roots of the CT (Certificate Transparency) server."
LABEL io.k8s.description="The job responsible for managing the roots of the CT (Certificate Transparency) server."
LABEL io.k8s.display-name="managectroots job container image for Red Hat Trusted Artifact Signer."
LABEL io.openshift.tags="managectroots, Red Hat trusted artifact signer."
LABEL summary="Provides the binary for the managectroots job."
LABEL com.redhat.component="ctlog-managectroots"

# Set the binary as the entrypoint of the container
ENTRYPOINT ["managectroots"]
31 changes: 31 additions & 0 deletions Dockerfile.ctlog-verifyfulcio
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Build the verifyfulcio binary
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca AS build-env
WORKDIR /ctlog-verifyfulcio
RUN git config --global --add safe.directory /ctlog-verifyfulcio

COPY . .
USER root

RUN make build-ctlog-verifyfulcio

# Install server
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:7d1ea7ac0c6f464dac7bae6994f1658172bf6068229f40778a513bc90f47e624

COPY --from=build-env /ctlog-verifyfulcio/verifyfulcio /usr/local/bin/verifyfulcio
RUN chown root:0 /usr/local/bin/verifyfulcio && chmod g+wx /usr/local/bin/verifyfulcio

#Configure home directory
ENV HOME=/home
RUN chgrp -R 0 /${HOME} && chmod -R g=u /${HOME}

WORKDIR ${HOME}

LABEL description="The job responsible for verifying Fulcio."
LABEL io.k8s.description="The job responsible for verifying Fulcio."
LABEL io.k8s.display-name="Fulcio verification job container image for Red Hat Trusted Artifact Signer."
LABEL io.openshift.tags="verifyfulcio, Red Hat trusted artifact signer."
LABEL summary="Provides the binary for verifyfulcio."
LABEL com.redhat.component="ctlog-verifyfulcio"

# Set the binary as the entrypoint of the container
ENTRYPOINT ["verifyfulcio"]
29 changes: 29 additions & 0 deletions Dockerfile.tuf-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Build the tuf server binary
FROM registry.access.redhat.com/ubi9/go-toolset@sha256:c3a9c5c7fb226f6efcec2424dd30c38f652156040b490c9eca5ac5b61d8dc3ca AS build-env
WORKDIR /tuf-server
RUN git config --global --add safe.directory /tuf-server

COPY . .
USER root
RUN make build-tuf-server

# Install server
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:7d1ea7ac0c6f464dac7bae6994f1658172bf6068229f40778a513bc90f47e624
COPY --from=build-env /tuf-server/server /usr/local/bin/tuf-server
RUN chown root:0 /usr/local/bin/tuf-server && chmod g+wx /usr/local/bin/tuf-server

#Configure home directory
ENV HOME=/home
RUN chgrp -R 0 /${HOME} && chmod -R g=u /${HOME}

WORKDIR ${HOME}

LABEL description="Binary for the TUF (The Update Framework) server."
LABEL io.k8s.description="Binary for the TUF (The Update Framework) server."
LABEL io.k8s.display-name="TUF server container image for Red Hat Trusted Artifact Signer."
LABEL io.openshift.tags="TUF-server, Red Hat trusted artifact signer."
LABEL summary="Provides the TUF server binary."
LABEL com.redhat.component="tuf-server"

# Set the binary as the entrypoint of the container
ENTRYPOINT ["tuf-server"]
Binary file not shown.
Loading