- 由 虚拟的现实创建于1月 22, 2024 需要 1 分钟阅读时间
Dockerfile
FROM openjdk:11-bullseye LABEL maintainer="waringid <waringid@gmail.com>" version="9.12.2" ARG JIRA_VERSION=9.12.2 # Production: jira-software jira-core ARG JIRA_PRODUCT=jira-software ARG AGENT_VERSION=1.3.3 ARG MYSQL_DRIVER_VERSION=8.0.22 ENV JIRA_USER=jira \ JIRA_GROUP=jira \ JIRA_HOME=/var/jira \ JIRA_INSTALL=/opt/jira \ JVM_MINIMUM_MEMORY=1g \ JVM_MAXIMUM_MEMORY=3g \ JVM_CODE_CACHE_ARGS='-XX:InitialCodeCacheSize=1g -XX:ReservedCodeCacheSize=2g' \ AGENT_PATH=/var/agent \ AGENT_FILENAME=atlassian-agent.jar ENV JAVA_OPTS="-javaagent:${AGENT_PATH}/${AGENT_FILENAME} ${JAVA_OPTS}" RUN mkdir -p ${JIRA_INSTALL} ${JIRA_HOME} ${AGENT_PATH} \ && curl -o ${AGENT_PATH}/${AGENT_FILENAME} https://github.com/haxqer/jira/releases/download/v${AGENT_VERSION}/atlassian-agent.jar -L \ && curl -o /tmp/atlassian.tar.gz https://product-downloads.atlassian.com/software/jira/downloads/atlassian-${JIRA_PRODUCT}-${JIRA_VERSION}.tar.gz -L \ && tar xzf /tmp/atlassian.tar.gz -C ${JIRA_INSTALL}/ --strip-components 1 \ && rm -f /tmp/atlassian.tar.gz \ && curl -o ${JIRA_INSTALL}/lib/mysql-connector-java-${MYSQL_DRIVER_VERSION}.jar https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_DRIVER_VERSION}/mysql-connector-java-${MYSQL_DRIVER_VERSION}.jar -L \ && echo "jira.home = ${JIRA_HOME}" > ${JIRA_INSTALL}/atlassian-jira/WEB-INF/classes/jira-application.properties RUN export CONTAINER_USER=$JIRA_USER \ && export CONTAINER_GROUP=$JIRA_GROUP \ && groupadd -r $JIRA_GROUP && useradd -r -g $JIRA_GROUP $JIRA_USER \ && chown -R $JIRA_USER:$JIRA_GROUP ${JIRA_INSTALL} ${JIRA_HOME}/ ${AGENT_PATH} VOLUME $JIRA_HOME USER $JIRA_USER WORKDIR $JIRA_INSTALL EXPOSE 8080 ENTRYPOINT ["/opt/jira/bin/start-jira.sh", "-fg"]
docker-compose
version: '3.4' services: jira: image: haxqer/jira:9.12.2 container_name: jira-srv environment: - TZ=Asia/Shanghai # - JVM_MINIMUM_MEMORY=1g # - JVM_MAXIMUM_MEMORY=12g # - JVM_CODE_CACHE_ARGS='-XX:InitialCodeCacheSize=1g -XX:ReservedCodeCacheSize=8g' depends_on: - mysql ports: - "8080:8080" volumes: - home_data:/var/jira restart: always networks: - network-bridge mysql: image: mysql:8.0 container_name: mysql-jira environment: - TZ=Asia/Shanghai - MYSQL_DATABASE=jira - MYSQL_ROOT_PASSWORD=123456 - MYSQL_USER=jira - MYSQL_PASSWORD=123123 command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_bin'] # ports: # - "13306:3306" volumes: - mysql_data:/var/lib/mysql restart: always networks: - network-bridge networks: network-bridge: driver: bridge volumes: home_data: external: false mysql_data: external: false
- 无标签
添加评论