docker-scripts/bitbucket/6.2.0/Dockerfile

60 lines
2.2 KiB
Docker
Raw Normal View History

2019-03-06 19:54:00 +03:00
FROM debian:buster
2018-09-18 13:34:39 +03:00
MAINTAINER Atlassian Bitbucket Server Team
2019-03-06 19:54:00 +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-03-06 19:54:00 +03:00
ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket
ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket
ENV DEBIAN_FRONTEND noninteractive
#editing sources list
RUN rm /etc/apt/sources.list
COPY sources.list /etc/apt/sources.list
COPY locale.gen /etc/locale.gen
#installing utils
2019-04-17 14:05:43 +03:00
# url: missing
2019-03-06 19:54:00 +03:00
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
2019-04-18 12:12:14 +03:00
RUN apt-get update && apt-get install -y --allow-unauthenticated gnupg2 ca-certificates htop mc tmux iftop cmatrix iputils-ping cmatrix-xfont lsof lynx gnupg sudo apt-transport-https lsb-release apt-utils locales console-cyrillic wget curl bash procps openssl perl ttf-dejavu tini util-linux fontconfig git
2019-04-17 14:28:45 +03:00
#installing java
2019-04-17 14:05:43 +03:00
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A66C5D02
RUN echo 'deb https://rpardini.github.io/adoptopenjdk-deb-installer stable main' > /etc/apt/sources.list.d/rpardini-aoj.list
2019-04-17 14:28:45 +03:00
RUN apt-get update && apt-get install -y --allow-unauthenticated adoptopenjdk-8-installer
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-03-06 19:54:00 +03:00
ENTRYPOINT ["/usr/bin/tini", "--"]
2019-02-14 04:10:04 +03:00
2019-03-06 19:54:00 +03:00
COPY entrypoint.sh /entrypoint.sh
2018-09-18 13:34:39 +03:00
2019-03-06 19:54:00 +03:00
#After install fixes
RUN localedef en_US.UTF-8 -i en_US -f UTF-8
RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
RUN apt update
RUN apt upgrade -y
RUN apt dist-upgrade -y
RUN apt-get clean autoclean
RUN apt-get autoremove -y
RUN rm -rf /var/lib/apt/lists/*
2018-09-18 13:34:39 +03:00
2019-04-17 12:41:28 +03:00
ARG BITBUCKET_VERSION=6.2.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-03-06 19:54:00 +03:00
COPY . /tmp
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}/ \
2019-03-06 19:54:00 +03:00
&& sed -i -e 's/^# umask/umask/' ${BITBUCKET_INSTALL_DIR}/bin/_start-webapp.sh