Fix: use generic jre + http protocol usage instead of git protocol to retrieve dependencies

This commit is contained in:
2016-02-05 10:39:01 +01:00
parent f8500d15da
commit a805da58e9
4 changed files with 28 additions and 11 deletions

View File

@@ -1,7 +1,11 @@
FROM debian
RUN apt-get clean && apt-get update \
&& apt-get install -y curl \
&& apt-get install -y \
curl \
default-jre-headless \
git \
subversion \
&& apt-get clean \
&& rm -rf /var/lib/apt/listss/*
@@ -17,6 +21,8 @@ RUN cd /tmp \
&& dpkg -i -E go-agent.deb \
&& sed -i -e 's#GO_SERVER=127.0.0.1#GO_SERVER=gocd-server#' /etc/default/go-agent
RUN git config --global url."https://".insteadOf git://
#VOLUME ["/var/lib/go-agent", "/var/log/go-agent", "/var/go/.ssh"]
COPY autoregister.properties /var/lib/go-agent/config/autoregister.properties

View File

@@ -1,7 +1,11 @@
FROM debian
RUN apt-get clean && apt-get update \
&& apt-get install -y curl
&& apt-get install -y \
curl \
default-jre-headless \
git \
subversion
RUN apt-get clean && apt-get install -y maven
RUN apt-get clean && apt-get install -y gradle \
&& apt-get clean \
@@ -28,6 +32,8 @@ RUN cd /tmp \
&& sed -i -e 's#GO_SERVER=127.0.0.1#GO_SERVER=gocd-server#' /etc/default/go-agent \
&& sed -i -e 's#JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/jre"#JAVA_HOME="/opt/jdk1.8.0_66/jre"#' /etc/default/go-agent
RUN git config --global url."https://".insteadOf git://
#VOLUME ["/var/lib/go-agent", "/var/log/go-agent", "/var/go/.ssh"]
COPY autoregister.properties /var/lib/go-agent/config/autoregister.properties

View File

@@ -1,13 +1,18 @@
FROM debian
RUN apt-get clean && apt-get update \
&& apt-get install -y curl
&& apt-get install -y \
curl \
default-jre-headless \
git \
subversion
RUN apt-get clean && apt-get install -y mongodb
RUN apt-get clean && apt-get install -y python-dev
RUN curl -sL https://deb.nodesource.com/setup_5.x | bash -E - \
&& apt-get update \
&& apt-get install -y \
build-essential \
nodejs
nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/listss/*
@@ -17,6 +22,8 @@ RUN cd /tmp \
&& dpkg -i -E go-agent.deb \
&& sed -i -e 's#GO_SERVER=127.0.0.1#GO_SERVER=gocd-server#' /etc/default/go-agent
RUN git config --global url."https://".insteadOf git://
#VOLUME ["/var/lib/go-agent", "/var/log/go-agent", "/var/go/.ssh"]
COPY autoregister.properties /var/lib/go-agent/config/autoregister.properties
@@ -25,5 +32,5 @@ CMD until curl -s -o /dev/null "http://${GO_SERVER}:${GO_SERVER_PORT}"; do sleep
if [ -n "$AGENT_KEY" ]]; then \
sed -i -e 's/=.*/=/g' -e "s/key=/key=$AGENT_KEY/" -e "s/resources=/resources=$AGENT_RESOURCES/" /var/lib/go-agent/config/autoregister.properties; \
fi; \
(/usr/share/go-agent/agent.sh &); while [ ! -f /var/log/go-agent/go-agent-bootstrapper.log ]; do sleep 1; done; exec tail -F /var/log/go-agent/*
(/usr/share/go-agent/agent.sh &); (service mongodb start); while [ ! -f /var/log/go-agent/go-agent-bootstrapper.log ]; do sleep 1; done; exec tail -F /var/log/go-agent/*

View File

@@ -3,7 +3,7 @@ FROM debian
RUN apt-get clean && apt-get update \
&& apt-get install -y \
curl \
openjdk-7-jre-headless
default-jre-headless
RUN apt-get clean && apt-get install -y \
git \
subversion
@@ -35,15 +35,13 @@ RUN cd /tmp \
&& sed -i -e "s/DAEMON=Y/DAEMON=N/" /etc/default/go-server \
&& sed -i -e 's#JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/jre"#JAVA_HOME="/opt/jdk1.8.0_66/jre"#' /etc/default/go-server
RUN git config --global url."https://".insteadOf git://
VOLUME ["/var/lib/go-server", "/var/log/go-server", "/etc/go", "/var/go/.ssh"]
# Building CloudFoundry plugin
RUN cd /tmp \
&& git clone -b v2.0.0 https://github.com/Sounie/springer-gocd-cloudfoundry-plugin.git \
&& cd springer-gocd-cloudfoundry-plugin \
&& ./gradlew build \
&& cp build/libs/springer-gocd-cloudfoundry-plugin*.jar /tmp/springer-gocd-cloudfoundry-plugin-2.0.1.jar \
&& rm -rf /root/.gradle
&& curl -sL -o springer-gocd-cloudfoundry-plugin-2.0.1.jar "https://github.com/Sounie/springer-gocd-cloudfoundry-plugin/releases/download/v2.0.0/springer-gocd-cloudfoundry-plugin-2.0.0.jar"
# expose ports
EXPOSE 8153 8154