-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile-centos-base
43 lines (37 loc) · 2.29 KB
/
Dockerfile-centos-base
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
FROM centos:7
ARG date
LABEL org.label-schema.name="simplicite-server-centos7-base" \
org.label-schema.vendor="Simplicite Software" \
org.label-schema.license="NONE" \
org.label-schema.build-date="${date}" \
org.opencontainers.image.ref.name="simplicite-server-centos7-base" \
org.opencontainers.image.title="Simplicite server / CentOS 7 / Base" \
org.opencontainers.image.description="Simplicite server / CentOS 7 / Base" \
org.opencontainers.image.vendor="Simplicite Software" \
org.opencontainers.image.licenses="NONE" \
org.opencontainers.image.created="${date}"
ENV DOCKER=centos7 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LOG4J_FORMAT_MSG_NO_LOOKUPS=true TOMCAT_ROOT=/usr/local/tomcat
ADD *.crt /etc/pki/ca-trust/source/anchors/
RUN yum install -y dnf && yum clean all && rm -rf /var/cache/yum && \
dnf upgrade -y && \
dnf install -y epel-release && \
dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm && \
dnf install -y bash sudo procps openssh-clients openssl git curl wget zip unzip xz ca-certificates libjpeg fontconfig mariadb postgresql15 && \
dnf clean all && \
/bin/update-ca-trust extract && \
ln -s /usr/local/tomcat/logs /var/log/tomcat && \
ln -s /usr/local/tomcat/webapps/ROOT/WEB-INF/log /var/log/simplicite && \
mkdir -p /root/.ssh && chmod 700 /root/.ssh && \
groupadd -g 2000 simplicite && useradd -N -g 2000 -u 2000 simplicite && \
mkdir -p ~simplicite/.ssh && chmod 700 ~simplicite/.ssh && chown simplicite:simplicite ~simplicite/.ssh && \
echo -e "alias dir='ls -alF --color=always'\n\
alias _mysql='mysql --host=\$DB_HOST --port=\${DB_PORT:-3306} --user=\$DB_USER --password=\$DB_PASSWORD \$DB_NAME'\n\
alias _psql='PGPASSWD=\$DB_PASSWORD psql -h \$DB_HOST -p \${DB_PORT:-5432} -U \$DB_USER \$DB_NAME'" > /etc/profile.d/simplicite.sh && \
echo '%simplicite ALL=(ALL) NOPASSWD: /bin/chown' >> /etc/sudoers
ADD jacoco/lib/*.jar /usr/local/jacoco/
ADD --chown=simplicite:simplicite tomcat /usr/local/tomcat
ADD --chown=simplicite:simplicite run-tomcat.sh /usr/local/tomcat/run
WORKDIR /usr/local/tomcat
# HTTP, HTTP for SLL, HTTPS, AJP, JMX, RMI, JPDA, JaCoCo
EXPOSE 8080 8443 8444 8009 8005 1099 1098 8000 8001
CMD [ "/usr/local/tomcat/run" ]