-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
55 lines (43 loc) · 1.66 KB
/
Dockerfile
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
51
52
53
54
55
FROM docker.io/openjdk:11-slim
ARG BUILD_ID=""
ARG BAMBOO_VERSION="9.4.2"
ARG PORT=""
ARG REF=""
LABEL org.opencontainers.image.description="Containerised Atlassian Bamboo Server"
LABEL org.opencontainers.image.authors="Said Sef <said@saidsef.co.uk> (saidsef.co.uk/)"
LABEL org.opencontainers.image.version="uk.co.saidsef.bamboo=${REF}"
LABEL org.opencontainers.image.documentation="https://confluence.atlassian.com/bambooreleases/bamboo-9-4-release-notes-1312161836.html"
ENV BAMBOO_HOME /data
ENV BB_PKG_NAME atlassian-bamboo-${BAMBOO_VERSION}
ENV PATH /opt/$BB_PKG_NAME/bin:$PATH
ENV HOME /tmp
ENV PORT ${PORT:-8085}
USER root
# Define working directory.
WORKDIR $BAMBOO_HOME
# Install wget and Download Bamboo
RUN apt-get update && \
apt-get upgrade -y && \
# wget and curl are required by Atlassian Bamboo Server
apt-get install -yq procps wget curl && \
rm -rf /var/lib/apt/lists/* && \
echo $BB_PKG_NAME && \
wget https://www.atlassian.com/software/bamboo/downloads/binary/$BB_PKG_NAME.tar.gz && \
tar xvzf $BB_PKG_NAME.tar.gz && \
rm -vf $BB_PKG_NAME.tar.gz && \
mkdir -p /opt && \
mv $BB_PKG_NAME /opt/atlassian-bamboo && \
apt-get autoremove -y
# COPY bamboo-init.properties config
COPY config/bamboo-init.properties /opt/atlassian-bamboo/WEB-INF/classes/
COPY config/bamboo-init.properties /opt/atlassian-bamboo/
# Fix dir permissions/ownership
RUN chown nobody -R /opt/atlassian-bamboo && \
chmod g+rwx /opt/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties
USER nobody
# Define mountable directories
VOLUME ["/data"]
# Expose ports
EXPOSE ${PORT}
# Define default command.
CMD /opt/atlassian-bamboo/bin/start-bamboo.sh -fg