File tree 1 file changed +30
-0
lines changed
assets/custom-email-sender
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
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 .
You can’t perform that action at this time.
0 commit comments