我正在尝试通过ECS启动Jenkins代理。以下是我的Dockerfile。当我在此代理上开始作业时,ECS任务显示“正在挂起”,然后显示“已停止”,并且詹金斯作业卡住了一条消息,指出该代理处于脱机状态。我对Jenkins文件有误吗?
FROM openjdk:8-jdk
MAINTAINER Munavir Chavody <munavir.chavody@myer.com.au>
ARG VERSION=2.164.1
ARG user=jenkins
ARG group=jenkins
ARG uid=1000
ARG gid=1000
ENV HOME /home/${user}
RUN groupadd -g ${gid} ${group}
RUN useradd -c "Jenkins user" -d $HOME -u ${uid} -g ${gid} -m ${user}
ARG AGENT_WORKDIR=/home/${user}/agent
RUN apt-get update
RUN apt-get install -y jq python-pip
RUN pip install awscli
RUN cd /tmp && curl -O https://packages.chef.io/files/stable/chefdk/1.2.22/debian/8/chefdk_1.2.22-1_amd64.deb && dpkg -i chefdk*.deb
RUN curl --create-dirs -sSLo /usr/share/jenkins/slave.jar http://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/3.9/remoting-3.9.jar \
&& chmod 755 /usr/share/jenkins \
&& chmod 644 /usr/share/jenkins/slave.jar
COPY jenkins-slave.sh /usr/local/bin/jenkins-slave.sh
RUN chmod 744 /usr/local/bin/jenkins-slave.sh
USER ${user}
ENV AGENT_WORKDIR=${AGENT_WORKDIR}
RUN mkdir /home/${user}/.jenkins && mkdir -p ${AGENT_WORKDIR}
VOLUME /home/${user}/.jenkins
VOLUME ${AGENT_WORKDIR}
WORKDIR /home/${user}
ENTRYPOINT ["jenkins-slave.sh"]
答案 0 :(得分:0)
入口点存在权限问题。