我对portainer.io相当陌生,并在我的本地linux服务器上使用它。我使用以下撰写文件在portainer中为Jira创建了一个应用模板:
FROM openjdk:8-stretch
LABEL maintainer="haxqer <haxqer666@gmail.com>" version="8.11.0"
ARG JIRA_VERSION=8.11.0
# Production: jira-software jira-core
ARG JIRA_PRODUCT=jira-software
ARG AGENT_VERSION=1.2.2
ARG MYSQL_DRIVER_VERSION=5.1.48
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"]
现在看来我遇到以下错误:
Deployment error
yaml: unmarshal errors: line 1: cannot unmarshal !!str `FROM op...` into config.Config
现在,我不确定这是否是因为我们没有正确配置撰写文件,或者是兼容性问题。关于如何解决此问题的任何想法?