-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDockerfile
76 lines (67 loc) · 2.34 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# =============================================================================
#
# Perfumers Vault Pro Dockerfile
#
# =============================================================================
FROM quay.io/centos/centos:stream9-minimal
LABEL co.uk.globaldyne.component="perfumers-vault-container" \
description="Perfumers Vault container image" \
summary="Perfumers Vault container image" \
version="PRO" \
io.k8s.description="Init Container for Perfumers Vault PRO" \
io.k8s.display-name="Perfumers Vault Pro Container" \
io.openshift.tags="pvault,jb,perfumer,vault,jbpvault,PRO" \
name="globaldyne/pvault" \
maintainer="John Belekios"
ARG uid=100001
ARG gid=100001
RUN microdnf -y install epel-release && \
microdnf -y update && \
microdnf -y module enable nginx:1.26 php:8.3 && \
microdnf --setopt=tsflags=nodocs -y install \
php \
php-mysqlnd \
php-gd \
php-mbstring \
php-fpm \
php-pear-Mail \
openssl \
mysql \
ncurses \
nginx \
procps-ng \
diffutils \
golang && \
sed -i \
-e 's~^;date.timezone =$~date.timezone = UTC~g' \
-e 's~^upload_max_filesize.*$~upload_max_filesize = 500M~g' \
-e 's~^post_max_size.*$~post_max_size = 500M~g' \
-e 's~^session.auto_start.*$~session.auto_start = 1~g' \
-e 's~^memory_limit.*$~memory_limit = 512M~g' \
/etc/php.ini && \
microdnf clean all && \
rm -rf /var/cache/yum/*
ENV LANG=en_GB.UTF-8
ADD . /html
RUN if [ -f .git/COMMIT_EDITMSG ]; then \
cat .git/COMMIT_EDITMSG | sed -n 's/^\[\(.*\)\].*/\[\1\]/p' > /html/COMMIT; \
fi
ADD scripts/php-fpm/www.conf /etc/php-fpm.d/www.conf
ADD scripts/php-fpm/php-fpm.conf /etc/php-fpm.conf
ADD scripts/entrypoint.sh /usr/bin/entrypoint.sh
ADD scripts/nginx/nginx.conf /etc/nginx/nginx.conf
ADD scripts/reset_pass.sh /usr/bin/reset_pass.sh
ADD scripts/update_db_schema.sh /usr/bin/update_db_schema.sh
RUN chmod +x /usr/bin/entrypoint.sh /usr/bin/reset_pass.sh /usr/bin/update_db_schema.sh && \
rm -rf /html/.git /html/.github /html/helpers /html/docker-compose /html/k8s
WORKDIR /html/scripts/session_monitor
RUN [ ! -f go.mod ] && go mod init session_monitor || true && \
go mod tidy && go build -o session_monitor . && \
cp session_monitor /usr/bin/session_monitor && \
chmod +x /usr/bin/session_monitor && \
rm -rf /html/scripts
WORKDIR /html
STOPSIGNAL SIGQUIT
USER ${uid}
EXPOSE 8000
ENTRYPOINT ["entrypoint.sh"]