Dockerfile-5.1.2

FROM openjdk:11-bullseye
 
LABEL maintainer="waringid <waringid@gmail.com>" version="5.12.2"

ARG JIRA_VERSION=5.12.2
ARG JIRA_PRODUCT=servicedesk
ARG AGENT_VERSION=1.3.3
ARG MYSQL_DRIVER_VERSION=8.0.22

ENV JIRA_USER=jira \
    JIRA_GROUP=jira \
    JIRA_HOME=/var/jira-service \
    JIRA_INSTALL=/opt/jira-service \
    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}"

COPY ./deps/${AGENT_FILENAME} ${AGENT_PATH}/
COPY ./deps/atlassian-${JIRA_PRODUCT}-${JIRA_VERSION}.tar.gz /tmp
COPY ./deps/mysql-connector-java-${MYSQL_DRIVER_VERSION}.jar  ${JIRA_INSTALL}/lib/

RUN openssl s_client -connect marketplace.atlassian.com:443 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/marketplace.atlassian.com.crt \
&& openssl s_client -connect marketplace-cdn.atlassian.com:443 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/marketplace-cdn.atlassian.com.crt \
&& openssl s_client -connect api.media.atlassian.com:443 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/api.atlassian.com.crt \
&& keytool -importcert -alias marketplace.atlassian.com -cacerts -storepass changeit -noprompt -file /tmp/marketplace.atlassian.com.crt \
&& keytool -importcert -alias marketplace-cdn.atlassian.com -cacerts -storepass changeit -noprompt -file /tmp/marketplace-cdn.atlassian.com.crt \
&& keytool -importcert -alias api.media.atlassian.com -cacerts -storepass changeit -noprompt -file /tmp/api.atlassian.com.crt

RUN mkdir -p ${JIRA_INSTALL} ${JIRA_HOME} ${AGENT_PATH} \
&&  tar xzf /tmp/atlassian-${JIRA_PRODUCT}-${JIRA_VERSION}.tar.gz -C ${JIRA_INSTALL}/ --strip-components 1 \
&& rm -f /tmp/atlassian-${JIRA_PRODUCT}-${JIRA_VERSION}.tar.gz \
&& 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-service/bin/start-jira.sh", "-fg"]

Dockerfile-10.1.1

FROM openjdk:17-bullseye
   
LABEL maintainer="waringid <waringid@gmail.com>" version="10.1.1"
   
ARG ATLASSIAN_PRODUCTION=servicedesk
ARG APP_NAME=servicedesk
ARG APP_VERSION=10.1.1
ARG AGENT_VERSION=1.3.3
ARG MYSQL_DRIVER_VERSION=8.0.28
   
ENV JIRA_USER=jira \
    JIRA_GROUP=jira \
    JSM_HOME=/var/jira-service \
    JSM_INSTALL=/opt/jira-service \
    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}"
  
COPY ./deps/${AGENT_FILENAME} ${AGENT_PATH}/
COPY ./deps/atlassian-${ATLASSIAN_PRODUCTION}-${APP_VERSION}.tar.gz /tmp
COPY ./deps/mysql-connector-java-${MYSQL_DRIVER_VERSION}.jar  ${JSM_INSTALL}/lib/
  
RUN openssl s_client -connect marketplace.atlassian.com:443 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/marketplace.atlassian.com.crt \
&& openssl s_client -connect marketplace-cdn.atlassian.com:443 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/marketplace-cdn.atlassian.com.crt \
&& openssl s_client -connect api.media.atlassian.com:443 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/api.atlassian.com.crt \
&& keytool -importcert -alias marketplace.atlassian.com -cacerts -storepass changeit -noprompt -file /tmp/marketplace.atlassian.com.crt \
&& keytool -importcert -alias marketplace-cdn.atlassian.com -cacerts -storepass changeit -noprompt -file /tmp/marketplace-cdn.atlassian.com.crt \
&& keytool -importcert -alias api.media.atlassian.com -cacerts -storepass changeit -noprompt -file /tmp/api.atlassian.com.crt
   
RUN mkdir -p ${JSM_INSTALL} ${JSM_HOME} ${AGENT_PATH}  \
&&  tar zxf /tmp/atlassian-${APP_NAME}-${APP_VERSION}.tar.gz  -C /opt/jira-service/ --strip-components 1 \
&& rm -rf /tmp/* \
&& echo "jira.home = ${JSM_HOME}" > ${JSM_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 ${JSM_INSTALL} ${JSM_HOME}/ ${AGENT_PATH}
VOLUME $JSM_HOME
USER $JIRA_USER
WORKDIR $JSM_INSTALL
EXPOSE 8080
   
ENTRYPOINT ["/opt/jira-service/bin/start-jira.sh", "-fg"]

jsm-10.1.1

version: '3'
services:

  db:
    image: chaitin/safeline-postgres:15.2
    container_name: postgres
    restart:
      always
    environment:
      - 'POSTGRES_USER=jsm'
      - 'POSTGRES_PASSWORD=password'
      - 'POSTGRES_DB=jsm'
      - 'POSTGRES_ENCODING=UTF8'
      - 'POSTGRES_COLLATE=C'
      - 'POSTGRES_COLLATE_TYPE=C'
    volumes:
      - /data/wiki/pgsql:/var/lib/postgresql/data
      - /etc/localtime:/etc/localtime:ro
 
  jsm:
    image: jsm:10.1.1
    container_name: jsm
    restart:
      always
    ports:
      - 8080:8080
    environment:
      - 'CATALINA_OPTS= -XX:ReservedCodeCacheSize=512m -Xms2048m -Xmx4096m -javaagent:/var/agent/atlassian-agent.jar -Duser.timezone=GMT+08 -Dconfluence.document.conversion.fontpath=/var/confluence/fonts/'
    volumes:
      - /data/jsm/data:/var/confluence
      - /etc/localtime:/etc/localtime:ro
     # - /data/wiki/deps/server_8.8.1.xml:/opt/confluence/conf/server.xml:rw
    depends_on:
      - db

docker-compose-5.12.3

version: '3'
services:
 
  db:
    image: mysql:8.0
    container_name: mysql-jira
    command: ['mysqld','--character-set-server=utf8mb4','--collation-server=utf8mb4_bin','--default-authentication-plugin=mysql_native_password']
    ports:
      - "3306:3306"
    security_opt:
      - seccomp:unconfined
    environment:
      - MYSQL_ROOT_PASSWORD=password
      - TZ=Asia/Shanghai
      - MYSQL_DATABASE=jira_service
      - MYSQL_USER=jira
      - MYSQL_PASSWORD=password
    volumes:
      - /data/jira-service/mysql:/var/lib/mysql
    networks:
      jira_service-net:
  jira-service:
    image: jira-service:5.12.3
    container_name: jira-service
    ports:
      - "9000:8080"
    environment:
      - 'JVM_RESERVED_CODE_CACHE_SIZE=512m'
      - TZ=Asia/Shanghai
    volumes:
      - /data/jira-service/data:/var/jira-service
      - /etc/localtime:/etc/localtime:ro
    networks:
      jira_service-net:
    depends_on:
      - db

networks:
  jira_service-net:

注意

安装过程中会出现 /var/jira-service 无法写入的错误提示

  1. 停止当前的容器服务
  2. chmod 777 data
  3. 启动 JSD 容器服务
docker exec jira-service java -jar /var/agent/atlassian-agent.jar -p jsd -d -m a@b.com -n name -o http://127.0.0.1:8080 -s BB62-OSPA-MXLF-GRM0

隐藏版本信息

【系统】-【用户界面】-【公告栏】中增加以下代码

<style type="text/css">
#footer {
    display: none;
}
</style>


  • 无标签

0 评论

你还没有登录。你所做的任何更改会将作者标记为匿名用户。 如果你已经拥有帐户,请登录