-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
33 lines (23 loc) · 1.04 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
FROM registry.access.redhat.com/ubi8/nginx-118
USER root
# Install dos2unix utility
RUN yum install -y dos2unix
# Configure certificate and key
RUN mkdir -p /etc/pki/nginx/private && \
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/pki/nginx/private/server.key -out /etc/pki/nginx/server.crt --batch && \
chown -R 1001:0 /etc/pki/nginx/ && chmod 755 /etc/pki/nginx/private/server.key /etc/pki/nginx/server.crt
# Grant write permission to group
RUN chmod -R g+w /opt/app-root/src /usr/local/bin/
# Copy configuration scripts
COPY --chown=1001:0 build/configs/notify-gchat.sh /usr/local/bin/notify-gchat.sh
# Copy nginx config
COPY --chown=1001:0 build/configs/nginx.conf /etc/nginx/nginx.conf
# To avoid build failure in windows, convert text files from DOS line
# endings (carriage return + line feed) to Unix line endings (line feed).
RUN dos2unix /etc/nginx/nginx.conf
# Copy dist files
COPY --chown=1001:0 dist/ .
EXPOSE 8080 1337
# Run script uses standard ways to run the application
USER 1001
CMD /usr/libexec/s2i/run