-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (24 loc) · 992 Bytes
/
Dockerfile
File metadata and controls
30 lines (24 loc) · 992 Bytes
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
FROM registry.access.redhat.com/ubi9/go-toolset:1.25.7@sha256:6da1160c0e8da15b585560ac6ef7b0179f17686aeaaa477ead6427daf8948fea AS build
USER root
ENV GOFLAGS="-mod=mod"
RUN mkdir /src
WORKDIR /src
COPY go.* ./
RUN go mod download
COPY . ./
RUN make emailsender
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7@sha256:c7d44146f826037f6873d99da479299b889473492d3c1ab8af86f08af04ec8a0 AS standard
RUN microdnf install shadow-utils
RUN useradd -u 1001 unprivilegeduser
ADD https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem /rds_ca/aws-rds-ca-global-bundle.pem
RUN chmod a+rw /rds_ca/aws-rds-ca-global-bundle.pem
# Switch to non-root user
USER unprivilegeduser
COPY --from=build /src/emailsender/bin /acscs/
EXPOSE 8080
ENTRYPOINT ["/acscs/emailsender"]
LABEL name="ACSCS email sender" \
vendor="Red Hat, Inc." \
version="0.0.1" \
summary="Email sender service for ACSCS" \
description="Email sender service for the Red Hat Advanced Cluster Security Cloud Services"