Optim: using alpine linux as base

Feature: add gocd-agent-docker
This commit is contained in:
2016-04-06 16:02:36 +02:00
parent 81b4a5834a
commit 0b76f9f70f
8 changed files with 156 additions and 66 deletions

View File

@@ -5,7 +5,7 @@ RUN apt-get clean && apt-get update \
curl \
default-jre-headless \
git \
subversion
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 - \
@@ -18,7 +18,7 @@ RUN curl -sL https://deb.nodesource.com/setup_5.x | bash -E - \
# Installing Go agent
RUN cd /tmp \
&& curl -sL -o go-agent.deb "https://download.go.cd/gocd-deb/go-agent-15.2.0-2248.deb" \
&& curl -sL -o go-agent.deb "https://download.go.cd/binaries/16.3.0-3183/deb/go-agent-16.3.0-3183.deb" \
&& dpkg -i -E go-agent.deb \
&& sed -i -e 's#GO_SERVER=127.0.0.1#GO_SERVER=gocd-server#' /etc/default/go-agent
@@ -30,7 +30,6 @@ COPY autoregister.properties /var/lib/go-agent/config/autoregister.properties
CMD until curl -s -o /dev/null "http://${GO_SERVER}:${GO_SERVER_PORT}"; do sleep 5; done; \
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; \
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 &); (service mongodb start); while [ ! -f /var/log/go-agent/go-agent-bootstrapper.log ]; do sleep 1; done; exec tail -F /var/log/go-agent/*