Skip to content

Commit d2ff556

Browse files
committed
fix: readd custom-email-sender
1 parent e1027ad commit d2ff556

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

assets/custom-email-sender/Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# --------------------------------------------------------------------- base ---
2+
3+
FROM golang:1.19 as base
4+
5+
ARG APP_VERSION=latest
6+
7+
ENV GOOS=linux
8+
ENV GOARCH=amd64
9+
ENV CGO_ENABLED=0
10+
11+
RUN mkdir -p /opt/app
12+
WORKDIR /opt/app
13+
14+
RUN git clone https://github.com/cruxstack/cognito-custom-message-sender-go.git .
15+
RUN if [ "$APP_VERSION" != "latest" ] ; then git checkout $APP_VERSION ; fi
16+
RUN go mod download
17+
RUN go build -o bootstrap
18+
19+
RUN echo "$SERVICE_OPA_POLICY_ENCODED" | base64 -d > /opt/app/policy.rego
20+
21+
# ------------------------------------------------------------------ package ---
22+
23+
FROM alpine:latest as package
24+
25+
COPY --from=base /opt/app/bootstrap /opt/app/dist/bootstrap
26+
COPY --from=base /opt/app/policy.rego /opt/app/dist/policy.rego
27+
28+
RUN apk add zip \
29+
&& cd /opt/app/dist \
30+
&& zip -r /tmp/package.zip .

0 commit comments

Comments
 (0)