-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
46 lines (35 loc) · 1.28 KB
/
Dockerfile
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Use the latest golang base image
FROM golang:latest
# Set the Current Working Directory inside the container
WORKDIR /app
ARG STRIPE_SECRET_KEY=""
ARG STRIPE_CANCEL_URL=""
ARG STRIPE_SUCCESS_URL=""
ARG STRIPE_BILLING_RETURN_URL=""
ARG STRIPE_WHSEC=""
ARG HOST=""
ARG PORT="443"
ARG DEVELOPMENT=""
# Set Environment Variables
ENV DEBIAN_FRONTEND=noninteractive
ENV STRIPE_SECRET_KEY=${STRIPE_SECRET_KEY}
ENV STRIPE_CANCEL_URL=${STRIPE_CANCEL_URL}
ENV STRIPE_SUCCESS_URL=${STRIPE_SUCCESS_URL}
ENV STRIPE_BILLING_RETURN_URL=${STRIPE_BILLING_RETURN_URL}
ENV STRIPE_WHSEC=${STRIPE_WHSEC}
ENV HOST=${HOST}
ENV PORT=${PORT}
ENV DEVELOPMENT=${DEVELOPMENT}
# Copy the source from the current directory to the Working Directory inside the container
COPY . .
# Build the Stripe Pipeline
# RUN curl -s https://packages.stripe.dev/api/security/keypair/stripe-cli-gpg/public | gpg --dearmor | tee /usr/share/keyrings/stripe.gpg
# RUN echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" | tee -a /etc/apt/sources.list.d/stripe.list
# RUN apt-get update
# RUN apt-get install stripe
# Copy the script to the container
COPY ./script.sh /script.sh
# Make the script executable
RUN chmod +x /script.sh
# Command to run the executable
CMD ["/script.sh"]