view bamboo-agent/Dockerfile @ 537:ad36483ba0c2

Update scripts to add execute permission
author Matt Calmes <calmes@ssdt-ohio.org>
date Mon, 06 May 2024 10:59:39 -0400
parents 83f30dc7e9fb
children
line wrap: on
line source
FROM  ubuntu:16.04

RUN apt-get update
RUN apt-get install -y ca-certificates

####NOTE we are no longer using the docker-bamboo agent images due to migration to mutli-agent servers.

# set up nsswitch.conf for Go's "netgo" implementation (which Docker explicitly uses)
# - https://github.com/docker/docker-ce/blob/v17.09.0-ce/components/engine/hack/make.sh#L149
# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
RUN  echo 'hosts: files dns' > /etc/nsswitch.conf

ENV DOCKER_CHANNEL stable
ENV DOCKER_VERSION 17.03.2-ce
ENV PATH "$PATH:/usr/local/bin"
ENV DOCKER_HOST unix:///var/run/docker.sock
#RUN set -ex
# why we use "curl" instead of "wget":
# + wget -O docker.tgz https://download.docker.com/linux/static/stable/x86_64/docker-17.03.1-ce.tgz
# Connecting to download.docker.com (54.230.87.253:443)
# wget: error getting response: Connection reset by peer

RUN apt-get update -y


RUN apt-get install -y mercurial \

#    && apt-get install -y vim \

#    && apt-get install -y nano \

    && apt-get install -y tar \

    && apt-get install -y curl \
	
	&& apt-get install -y unzip \

    && apt-get install -y openjdk-8-jdk \

    && apt-get install -y zip 
	


#RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
#dpkg-reconfigure -f noninteractive tzdata

    
ENV ANT_VERSION 1.10.6
RUN cd && \
    curl -fL -o apache-ant-bin.tar.gz http://www.us.apache.org/dist//ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz && \
    tar -xzf apache-ant-bin.tar.gz && \
    mv apache-ant-${ANT_VERSION} /opt/ant && \
    rm apache-ant-bin.tar.gz
ENV ANT_HOME /opt/ant
ENV PATH ${PATH}:/opt/ant/bin


RUN cd && \
    curl -fL -o apache-maven-bin.tar.gz http://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.0.3/apache-maven-3.0.3-bin.tar.gz  && \
    tar -xzf apache-maven-bin.tar.gz && \
     mv apache-maven-3.0.3 /usr/share  && \
    rm apache-maven-bin.tar.gz
ENV PATH ${PATH}:/usr/share/apache-maven-3.0.3/bin

RUN curl -fL -o docker.tgz "https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz"; 
RUN	tar --extract \
		--file docker.tgz \
		--strip-components 1 \
		--directory /usr/local/bin/ \
	; \
	rm docker.tgz; \
	\
	apt-get autoremove  \
	\
	dockerd -v; \
	docker -v

#COPY modprobe.sh /usr/local/bin/modprobe
COPY docker-entrypoint.sh /usr/local/bin/

run chmod +x /usr/local/bin/docker-entrypoint.sh

#EXPOSE 2375/tcp

COPY atlassian-bamboo-agent-installer-6.5.0.jar /root

RUN mkdir -p /root/bamboo-agent-home/bin
COPY bamboo-capabilities.properties /root/bamboo-agent-home/bin/bamboo-capabilities.properties

RUN curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

RUN chmod +x /usr/local/bin/docker-compose

RUN apt-get install tzdata

RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata

ENTRYPOINT ["docker-entrypoint.sh"]

CMD java -jar /root/atlassian-bamboo-agent-installer-6.5.0.jar $BAMBOO_SERVER/agentServer/
#CMD []