-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile.tmpl
executable file
·48 lines (37 loc) · 1.83 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
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
# add backports for java 8
RUN echo "deb http://http.debian.net/debian jessie-backports main" >> /etc/apt/sources.list
# 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
RUN apt-get update && \
apt-get -y -t jessie-backports install \
openjdk-8-jre-headless \
ca-certificates-java
# grab the crowd dependencies
RUN apt-get update && apt-get install -y \
libtcnative-1 \
&& rm -rf /var/lib/apt/lists/*
ENV CROWD_VERSION {{.Version}}
ENV CROWD_HOME /var/atlassian/crowd
# extract crowd
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
&& mkdir -p /opt/atlassian \
&& curl -o /opt/atlassian/atlassian-crowd.tar.gz -SL '{{.ZipURL}}' \
&& tar xf /opt/atlassian/atlassian-crowd.tar.gz -C /opt/atlassian --strip-components=1 \
&& echo "crowd.home=$CROWD_HOME" > /opt/atlassian/crowd-webapp/WEB-INF/classes/crowd-init.properties \
&& rm -f /opt/atlassian/atlassian-crowd.tar.gz \
&& chown -R atlassian /opt/atlassian \
&& apt-get purge -y --auto-remove curl
VOLUME /var/atlassian/crowd
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
EXPOSE 8095
CMD ["crowd"]