infinity 2.4
This commit is contained in:
parent
e8b29af6f3
commit
91dd27ee83
20
docker-compose-infinity24.yml
Normal file
20
docker-compose-infinity24.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
services:
|
||||||
|
tomcat:
|
||||||
|
build:
|
||||||
|
context: ./tomcat
|
||||||
|
dockerfile: Dockerfile_infinity24
|
||||||
|
args:
|
||||||
|
USER_ID: 1000
|
||||||
|
GROUP_ID: 1000
|
||||||
|
USERNAME: poloadm
|
||||||
|
GROUPNAME: poloadm
|
||||||
|
container_name: tomcat
|
||||||
|
network_mode: host
|
||||||
|
volumes:
|
||||||
|
- ./tomcat/webapps:/usr/local/tomcat/webapps
|
||||||
|
- ./tomcat/logs:/usr/local/tomcat/logs
|
||||||
|
environment:
|
||||||
|
JAVA_OPTS: "-Dfile.encoding=UTF-8 -Xms512m -Xmx4g -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=1g -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true"
|
||||||
|
CATALINA_OPTS: "-XX:CompressedClassSpaceSize=512m -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -Xss2m -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -XX:ParallelGCThreads=4 -XX:ConcGCThreads=2 -XX:+DisableExplicitGC"
|
||||||
|
TZ: "Europe/Rome"
|
||||||
|
restart: always
|
||||||
32
tomcat/Dockerfile_infinity24
Normal file
32
tomcat/Dockerfile_infinity24
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
FROM tomcat:7.0.109-jdk8
|
||||||
|
|
||||||
|
# Define arguments for the group and user IDs
|
||||||
|
ARG USER_ID
|
||||||
|
ARG GROUP_ID
|
||||||
|
ARG USERNAME
|
||||||
|
ARG GROUPNAME
|
||||||
|
|
||||||
|
# Create group and user with IDs passed from Docker Compose
|
||||||
|
RUN groupadd -g ${GROUP_ID} ${GROUPNAME} && \
|
||||||
|
useradd --no-log-init -u ${USER_ID} -g ${GROUP_ID} -m ${USERNAME} || true
|
||||||
|
|
||||||
|
# CONFIG
|
||||||
|
#COPY ./conf/catalina.properties /usr/local/tomcat/conf/catalina.properties
|
||||||
|
COPY ./conf/context.xml /usr/local/tomcat/conf/context.xml
|
||||||
|
COPY ./conf/server.xml /usr/local/tomcat/conf/server.xml
|
||||||
|
|
||||||
|
# Copy libraries
|
||||||
|
COPY ./libs/ /usr/local/tomcat/lib/
|
||||||
|
|
||||||
|
# Set permissions on Tomcat directories
|
||||||
|
RUN chown -R ${USERNAME}:${GROUPNAME} /usr/local/tomcat
|
||||||
|
|
||||||
|
# Copy entrypoint script and make it executable
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
USER ${USERNAME}
|
||||||
|
|
||||||
|
CMD ["catalina.sh", "run"]
|
||||||
Loading…
Reference in New Issue
Block a user