-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (47 loc) · 2 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
46
47
48
49
50
51
52
53
54
55
56
# /\/\/\ / \
# | \ / | / \
# | \/ | / \
# | /\ |----------------------| /\ |
# | / \ | | / \ |
# |/ \| | / \ |
# |\ /| | | ( ) | |
# | \ / | | | ( ) | |
# | \/ | /\ | | | | /\
# | /\ | / \ | | | | / \
# | / \ | |----| | | | | |----|
# |/ \|---------------| | | /| . |\ | | |
# |\ /| | | / | . | \ | |
# | \ / | | / | . | \ |
# | \/ | | / | . | \ |
# | /\ |---------------|/ | . | \|
# | / \ | / HID | . | Global \
# |/ \| ( | | )
# |/\/\/\| | | |--| |--| | |
# ------------------------/ \-----/ \/ \-----/ \--------
# \\// \\//\\// \\//
# \/ \/ \/ \/
# Use the official nginx image as the base image
FROM nginx:latest
# Set the maintainer label
LABEL maintainer="Mohamed Jamal - mohamed.jamal@hidglobal.com"
# Define build arguments for domain and email
ARG DOMAIN
ARG EMAIL
# Set default values for build arguments
ARG DEFAULT_DOMAIN=localhost
ARG DEFAULT_EMAIL=admin@localhost
# Set environment variables for configuration
ENV DOMAIN=${DOMAIN:-$DEFAULT_DOMAIN}
ENV EMAIL=${EMAIL:-$DEFAULT_EMAIL}
ENV ZIP_URL https://github.com/hidglobal/ts-jamaltool/raw/main/build.zip
# Install certbot and its dependencies
RUN apt-get update && \
apt-get install -y unzip curl openssl
# Remove default index html file
RUN rm -rf /usr/share/nginx/html/index.html
# Download and extract the zip file
RUN curl -L ${ZIP_URL} -o /tmp/file.zip && \
unzip /tmp/file.zip -d /usr/share/nginx/html/ && \
rm /tmp/file.zip
# Start nginx
CMD ["nginx", "-g", "daemon off;"]