forked from sigstore/scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile.trillian-createdb.rh
31 lines (25 loc) · 1.23 KB
/
Dockerfile.trillian-createdb.rh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Build the createdb binary
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder@sha256:356986205e66dcc03ef9a9fef5a7a13d6d59c29efacf1d971f9224c678932cf0 AS build-env
WORKDIR /createdb
RUN git config --global --add safe.directory /createdb
COPY . .
USER root
RUN go mod vendor
RUN make build-trillian-createdb
# Install server
FROM registry.access.redhat.com/ubi9-minimal@sha256:a9c41b5bff991254fc62846fd1cd377ce1967dfd66dc2c76432610ab2586b29b
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"
LABEL name="createdb"
# Set the binary as the entrypoint of the container
ENTRYPOINT ["createdb"]