docker-scripts/bitbucket/latest/Dockerfile

38 lines
1.4 KiB
Docker
Raw Normal View History

2019-02-14 04:10:04 +03:00
FROM adoptopenjdk/openjdk8:slim
2018-09-18 13:34:39 +03:00
MAINTAINER Atlassian Bitbucket Server Team
2019-02-14 04:10:04 +03:00
ENV RUN_USER daemon
ENV RUN_GROUP daemon
2018-09-18 13:34:39 +03:00
# https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory
2019-02-14 04:10:04 +03:00
ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket
ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket
2018-09-18 13:34:39 +03:00
VOLUME ["${BITBUCKET_HOME}"]
2019-02-14 04:10:04 +03:00
WORKDIR $BITBUCKET_HOME
2018-09-18 13:34:39 +03:00
# Expose HTTP and SSH ports
EXPOSE 7990
EXPOSE 7999
CMD ["/entrypoint.sh", "-fg"]
2019-02-14 04:10:04 +03:00
ENTRYPOINT ["/tini", "--"]
RUN apt-get update \
&& apt-get install -y --no-install-recommends fontconfig git perl \
&& apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
2018-09-18 13:34:39 +03:00
2019-02-14 04:10:04 +03:00
ARG TINI_VERSION=v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
2018-09-18 13:34:39 +03:00
2019-02-14 04:10:04 +03:00
COPY entrypoint.sh /entrypoint.sh
2018-09-18 13:34:39 +03:00
2019-03-06 17:33:52 +03:00
ARG BITBUCKET_VERSION=6.1.0
2019-02-14 04:10:04 +03:00
ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz
2018-09-18 13:34:39 +03:00
2019-02-14 04:10:04 +03:00
RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \
&& curl -L --silent ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" \
&& chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR}/ \
&& sed -i -e 's/^# umask/umask/' ${BITBUCKET_INSTALL_DIR}/bin/_start-webapp.sh