【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>>
confluence 7.2.0 jre11 Dockerfile include atlassian-agent
支持中文预览、中国时区
1、download atlassian-agent tar到lib目录下
2、copy windows字体文件到win目录下
3、Dockerfile
FROM adoptopenjdk/openjdk11:alpine-jre
ENV CONF_HOME /var/atlassian/confluence
ENV CONF_INSTALL /opt/atlassian/confluence
ENV CONF_VERSION 7.2.0
COPY "win/" "/usr/share/fonts/win/"
RUN set -x \
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk upgrade --no-cache \
&& apk --no-cache add curl bash ttf-dejavu xmlstarlet tomcat-native \
&& mkdir -p "${CONF_INSTALL}" "${CONF_HOME}" \
&& curl -Ls "https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONF_VERSION}.tar.gz" | tar -xz --directory "${CONF_INSTALL}" --strip-components=1 --no-same-owner \
&& chown -R daemon:daemon "${CONF_INSTALL}" \
&& chown -R daemon:daemon "${CONF_HOME}" \
&& echo -e "\nconfluence.home=$CONF_HOME" >> "${CONF_INSTALL}/confluence/WEB-INF/classes/confluence-init.properties" \
&& xmlstarlet ed --inplace \
--delete "Server/@debug" \
--delete "Server/Service/Connector/@debug" \
--delete "Server/Service/Connector/@useURIValidationHack" \
--delete "Server/Service/Connector/@minProcessors" \
--delete "Server/Service/Connector/@maxProcessors" \
--delete "Server/Service/Engine/@debug" \
--delete "Server/Service/Engine/Host/@debug" \
--delete "Server/Service/Engine/Host/Context/@debug" \
"${CONF_INSTALL}/conf/server.xml" \
&& touch -d "@0" "${CONF_INSTALL}/conf/server.xml" \
&& sed -i -e '/Xms1024m/ s/Xms1024m/Xms1g/' -e '/Xmx1024m/ s/Xmx1024m/Xmx4g/' \
-e '/ReservedCodeCacheSize=256m/ s/ReservedCodeCacheSize=256m/ReservedCodeCacheSize=512m/' \
-e '/-XX:+UseG1GC/ s/-XX:+UseG1GC/-XX:+UnlockExperimentalVMOptions -XX:+UseZGC/' \
-e '/-Xloggc/ s/-Xloggc/-Xlog:gc/' \
-e '/export CATALINA_OPTS/d' \
-e '$i CATALINA_OPTS="-javaagent:/opt/atlassian-agent.jar ${CATALINA_OPTS}"' \
-e '$i CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/win -Duser.timezone=Asia/Shanghai ${CATALINA_OPTS}"' \
-e '$i CATALINA_OPTS="-server ${CATALINA_OPTS}"' \
-e '$i export CATALINA_OPTS' "${CONF_INSTALL}/bin/setenv.sh"
COPY "lib/atlassian-agent.jar" "/opt"
USER daemon:daemon
EXPOSE 8090 8091
VOLUME "/var/atlassian/confluence"
WORKDIR /var/atlassian/confluence
ENTRYPOINT ["/opt/atlassian/confluence/bin/start-confluence.sh", "-fg"]
4、docker build -t solaris/confluence:7.2.0 .
5、docker run -it --name confluence -p 8090:8090 solaris/confluence:7.2.0
参考了https://github.com/cptactionhank/docker-atlassian-confluence
来源:oschina
链接:https://my.oschina.net/solaris/blog/3144896