-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (41 loc) · 1.5 KB
/
Dockerfile
File metadata and controls
52 lines (41 loc) · 1.5 KB
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
FROM nginx:1.29.3
# Install cron and dependencies for process_events.sh
RUN apt-get update && \
apt-get install -y --no-install-recommends \
jq \
vim \
cron \
procps \
libxml2-utils \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Add alias ll=ls -la to root's .bashrc
RUN echo "alias ll='ls -la'" >> /root/.bashrc
# Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*
# Copy application files to nginx web root
COPY index.html /usr/share/nginx/html/
COPY analysis.html /usr/share/nginx/html/
COPY disclaimer*.md /usr/share/nginx/html/
COPY contributors*.md /usr/share/nginx/html/
COPY scientific-background*.md /usr/share/nginx/html/
COPY productsListToProcess.json /usr/share/nginx/html/
COPY css/ /usr/share/nginx/html/css/
COPY js/ /usr/share/nginx/html/js/
COPY images/ /usr/share/nginx/html/images/
# Copy Nginx configuration
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
# Copy the processing script
COPY process_events.sh /usr/share/nginx/html/process_events.sh
RUN chmod +x /usr/share/nginx/html/process_events.sh
# Create data directories (can be mounted as volumes)
RUN mkdir -p /usr/share/nginx/html/data /usr/share/nginx/html/data_storage
# Copy entrypoint script
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Expose port 80
EXPOSE 80
# Set Working Directory: /usr/share/nginx/html/
WORKDIR /usr/share/nginx/html/
# Use custom entrypoint
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]