-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.tmpl
executable file
·50 lines (41 loc) · 2.36 KB
/
Dockerfile.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM debian:jessie
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
RUN groupadd -r atlassian && useradd -r -g atlassian atlassian
# grab gosu for easy step-down from root
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
&& gpg --keyserver pgp.mit.edu --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \
&& curl -o /tmp/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \
&& gpg --verify /tmp/gosu.asc /usr/local/bin/gosu \
&& rm /tmp/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
&& apt-get purge -y --auto-remove curl
# grab the confluence dependencies
RUN apt-get update && apt-get install -y ca-certificates \
&& echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections \
&& echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/webupd8team-java.list \
&& echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list.d/webupd8team-java.list \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 \
&& apt-get update && apt-get install -y \
oracle-java8-installer \
oracle-java8-set-default \
libtcnative-1 \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/oracle-jdk8-installer \
&& rm -f /ect/apt/sources.list.d/webupd8team-java.list
ENV CONFLUENCE_VERSION {{.Version}}
ENV CONFLUENCE_HOME /var/atlassian/confluence
# extract confluence
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
&& mkdir -p /opt/atlassian \
&& curl -o /opt/atlassian/atlassian-confluence.tar.gz -SL '{{.ZipURL}}' \
&& tar xf /opt/atlassian/atlassian-confluence.tar.gz -C /opt/atlassian --strip-components=1 \
&& echo "confluence.home=$CONFLUENCE_HOME" > /opt/atlassian/confluence/WEB-INF/classes/confluence-init.properties \
&& rm -f /opt/atlassian/atlassian-confluence.tar.gz \
&& chown -R atlassian /opt/atlassian \
&& apt-get purge -y --auto-remove curl
VOLUME /var/atlassian/confluence
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 8090
CMD ["confluence"]