annotate bamboo-agent/Dockerfile @ 305:44f0c4e37a7c

trying to fix time zone issue
author aldrich@nwoca.org
date Thu, 27 Jun 2019 18:22:57 +0100
parents 7fcdf01e19eb
children 7352b7aa3784
rev   line source
249
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
1 FROM ubuntu:16.04
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
2
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
3 RUN apt-get update
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
4 RUN apt-get install -y ca-certificates
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
5
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
6 # set up nsswitch.conf for Go's "netgo" implementation (which Docker explicitly uses)
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
7 # - https://github.com/docker/docker-ce/blob/v17.09.0-ce/components/engine/hack/make.sh#L149
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
8 # - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
9 # - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
10 RUN echo 'hosts: files dns' > /etc/nsswitch.conf
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
11
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
12 ENV DOCKER_CHANNEL stable
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
13 ENV DOCKER_VERSION 17.03.2-ce
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
14 ENV PATH "$PATH:/usr/local/bin"
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
15 ENV DOCKER_HOST unix:///var/run/docker.sock
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
16 #RUN set -ex
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
17 # why we use "curl" instead of "wget":
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
18 # + wget -O docker.tgz https://download.docker.com/linux/static/stable/x86_64/docker-17.03.1-ce.tgz
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
19 # Connecting to download.docker.com (54.230.87.253:443)
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
20 # wget: error getting response: Connection reset by peer
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
21
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
22 RUN apt-get update -y
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
23
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
24
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
25 RUN apt-get install -y mercurial \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
26
253
538179e4c675 adding bamboo agent configuration files - fix 2
aldrich@nwoca.org
parents: 252
diff changeset
27 # && apt-get install -y vim \
249
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
28
253
538179e4c675 adding bamboo agent configuration files - fix 2
aldrich@nwoca.org
parents: 252
diff changeset
29 # && apt-get install -y nano \
249
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
30
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
31 && apt-get install -y tar \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
32
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
33 && apt-get install -y curl \
250
a7ae41f4a55b adding bamboo agent configuration files - fix 1
aldrich@nwoca.org
parents: 249
diff changeset
34
a7ae41f4a55b adding bamboo agent configuration files - fix 1
aldrich@nwoca.org
parents: 249
diff changeset
35 && apt-get install -y unzip \
249
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
36
258
0fae07b2519b update bamboo agent
aldrich@nwoca.org
parents: 253
diff changeset
37 && apt-get install -y openjdk-8-jdk \
0fae07b2519b update bamboo agent
aldrich@nwoca.org
parents: 253
diff changeset
38
305
44f0c4e37a7c trying to fix time zone issue
aldrich@nwoca.org
parents: 296
diff changeset
39 && apt-get install -y zip \
44f0c4e37a7c trying to fix time zone issue
aldrich@nwoca.org
parents: 296
diff changeset
40
44f0c4e37a7c trying to fix time zone issue
aldrich@nwoca.org
parents: 296
diff changeset
41 && apt-get install tzdata -y
44f0c4e37a7c trying to fix time zone issue
aldrich@nwoca.org
parents: 296
diff changeset
42
44f0c4e37a7c trying to fix time zone issue
aldrich@nwoca.org
parents: 296
diff changeset
43 RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
44f0c4e37a7c trying to fix time zone issue
aldrich@nwoca.org
parents: 296
diff changeset
44 dpkg-reconfigure -f noninteractive tzdata
44f0c4e37a7c trying to fix time zone issue
aldrich@nwoca.org
parents: 296
diff changeset
45
251
bb2791f6d619 add ant
smith@nwoca.org
parents: 250
diff changeset
46
286
477609392d1b fix missing ant version
smith@nwoca.org
parents: 258
diff changeset
47 ENV ANT_VERSION 1.10.5
251
bb2791f6d619 add ant
smith@nwoca.org
parents: 250
diff changeset
48 RUN cd && \
bb2791f6d619 add ant
smith@nwoca.org
parents: 250
diff changeset
49 curl -fL -o apache-ant-bin.tar.gz http://www.us.apache.org/dist//ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz && \
bb2791f6d619 add ant
smith@nwoca.org
parents: 250
diff changeset
50 tar -xzf apache-ant-bin.tar.gz && \
bb2791f6d619 add ant
smith@nwoca.org
parents: 250
diff changeset
51 mv apache-ant-${ANT_VERSION} /opt/ant && \
252
30d959c35269 fix ant install
smith@nwoca.org
parents: 251
diff changeset
52 rm apache-ant-bin.tar.gz
251
bb2791f6d619 add ant
smith@nwoca.org
parents: 250
diff changeset
53 ENV ANT_HOME /opt/ant
bb2791f6d619 add ant
smith@nwoca.org
parents: 250
diff changeset
54 ENV PATH ${PATH}:/opt/ant/bin
249
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
55
296
7fcdf01e19eb adding maven 3 to bamboo agents
aldrich@nwoca.org
parents: 286
diff changeset
56
7fcdf01e19eb adding maven 3 to bamboo agents
aldrich@nwoca.org
parents: 286
diff changeset
57 RUN cd && \
7fcdf01e19eb adding maven 3 to bamboo agents
aldrich@nwoca.org
parents: 286
diff changeset
58 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 && \
7fcdf01e19eb adding maven 3 to bamboo agents
aldrich@nwoca.org
parents: 286
diff changeset
59 tar -xzf apache-maven-bin.tar.gz && \
7fcdf01e19eb adding maven 3 to bamboo agents
aldrich@nwoca.org
parents: 286
diff changeset
60 mv apache-maven-3.0.3 /usr/share && \
7fcdf01e19eb adding maven 3 to bamboo agents
aldrich@nwoca.org
parents: 286
diff changeset
61 rm apache-maven-bin.tar.gz
7fcdf01e19eb adding maven 3 to bamboo agents
aldrich@nwoca.org
parents: 286
diff changeset
62 ENV PATH ${PATH}:/usr/share/apache-maven-3.0.3/bin
7fcdf01e19eb adding maven 3 to bamboo agents
aldrich@nwoca.org
parents: 286
diff changeset
63
249
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
64 RUN curl -fL -o docker.tgz "https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz";
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
65 RUN tar --extract \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
66 --file docker.tgz \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
67 --strip-components 1 \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
68 --directory /usr/local/bin/ \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
69 ; \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
70 rm docker.tgz; \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
71 \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
72 apt-get autoremove \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
73 \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
74 dockerd -v; \
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
75 docker -v
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
76
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
77 #COPY modprobe.sh /usr/local/bin/modprobe
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
78 COPY docker-entrypoint.sh /usr/local/bin/
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
79
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
80 run chmod +x /usr/local/bin/docker-entrypoint.sh
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
81
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
82 #EXPOSE 2375/tcp
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
83
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
84 COPY atlassian-bamboo-agent-installer-6.5.0.jar /root
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
85
251
bb2791f6d619 add ant
smith@nwoca.org
parents: 250
diff changeset
86 RUN mkdir -p /root/bamboo-agent-home/bin
bb2791f6d619 add ant
smith@nwoca.org
parents: 250
diff changeset
87 COPY bamboo-capabilities.properties /root/bamboo-agent-home/bin/bamboo-capabilities.properties
249
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
88
253
538179e4c675 adding bamboo agent configuration files - fix 2
aldrich@nwoca.org
parents: 252
diff changeset
89 RUN curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
538179e4c675 adding bamboo agent configuration files - fix 2
aldrich@nwoca.org
parents: 252
diff changeset
90
538179e4c675 adding bamboo agent configuration files - fix 2
aldrich@nwoca.org
parents: 252
diff changeset
91 RUN chmod +x /usr/local/bin/docker-compose
538179e4c675 adding bamboo agent configuration files - fix 2
aldrich@nwoca.org
parents: 252
diff changeset
92
249
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
93 ENTRYPOINT ["docker-entrypoint.sh"]
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
94
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
95 CMD java -jar /root/atlassian-bamboo-agent-installer-6.5.0.jar $BAMBOO_SERVER/agentServer/
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
96 #CMD []
3799d9706864 adding bamboo agent configuration files
aldrich@nwoca.org
parents:
diff changeset
97