This commit is contained in:
Mr Bot 2019-02-14 04:10:04 +03:00
parent efc8743a29
commit 3a0a9852a4
4 changed files with 73 additions and 32 deletions

View File

@ -15,8 +15,8 @@
## Changelog ## Changelog
* 02/14/2019 * 02/14/2019
* bitbucket `5.16.0` -> `5.16.1` (*6x will be later*)
* *jira 8 will be later!* * *jira 8 will be later!*
* bitbucket `5.16.0` -> `6.0.0`. [Upgrade notes and guide](https://confluence.atlassian.com/bitbucketserver/bitbucket-server-upgrade-guide-776640551.html)!!!
* confluence `6.14.0` -> `6.14.1` * confluence `6.14.0` -> `6.14.1`
* 02/12/2019 * 02/12/2019
* added curl binary to `balancer` and `websites` containers. * added curl binary to `balancer` and `websites` containers.

View File

@ -1,32 +1,38 @@
FROM openjdk:8-jdk-alpine FROM adoptopenjdk/openjdk8:slim
MAINTAINER Atlassian Bitbucket Server Team MAINTAINER Atlassian Bitbucket Server Team
ENV RUN_USER daemon ENV RUN_USER daemon
ENV RUN_GROUP daemon ENV RUN_GROUP daemon
# https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory
ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket
ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket
VOLUME ["${BITBUCKET_HOME}"] VOLUME ["${BITBUCKET_HOME}"]
WORKDIR $BITBUCKET_HOME
# Expose HTTP and SSH ports # Expose HTTP and SSH ports
EXPOSE 7990 EXPOSE 7990
EXPOSE 7999 EXPOSE 7999
WORKDIR $BITBUCKET_HOME
CMD ["/entrypoint.sh", "-fg"] CMD ["/entrypoint.sh", "-fg"]
ENTRYPOINT ["/sbin/tini", "--"] ENTRYPOINT ["/tini", "--"]
RUN apk add --no-cache wget curl git git-daemon openssh bash procps openssl perl ttf-dejavu 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/*
COPY entrypoint.sh /entrypoint.sh ARG TINI_VERSION=v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ARG BITBUCKET_VERSION=5.16.1 COPY entrypoint.sh /entrypoint.sh
ARG DOWNLOAD_URL=https://downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz
COPY . /tmp
RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ ARG BITBUCKET_VERSION=6.0.0
&& curl -L --silent ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$BITBUCKET_INSTALL_DIR" \ ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz
&& chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR}/
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

View File

@ -8,23 +8,23 @@ Learn more about Bitbucket Server: <https://www.atlassian.com/software/bitbucket
This Docker container makes it easy to get an instance of Bitbucket up and running. This Docker container makes it easy to get an instance of Bitbucket up and running.
** We strongly recommend you run this image using a specific version tag instead of latest. This is because the image referenced by the latest tag changes often and we cannot guarantee that it will be backwards compatible. **
# Quick Start # Quick Start
For the `BITBUCKET_HOME` directory that is used to store the repository data For the `BITBUCKET_HOME` directory that is used to store the repository data
(amongst other things) we recommend mounting a host directory as a [data volume](https://docs.docker.com/engine/tutorials/dockervolumes/#/data-volumes), or via a named volume if using a docker version >= 1.9. (amongst other things) we recommend mounting a host directory as a [data volume](https://docs.docker.com/engine/tutorials/dockervolumes/#/data-volumes), or via a named volume if using a docker version >= 1.9.
## For other versions Volume permission is managed by entry scripts. To get started you can use a data volume, or named volumes. In this example we'll use named volumes.
Set permissions for the data directory so that the runuser can write to it: $> docker volume create --name bitbucketVolume
$> docker run -v bitbucketVolume:/var/atlassian/application-data/bitbucket --name="bitbucket" -d -p 7990:7990 -p 7999:7999 atlassian/bitbucket-server
$> docker run -u root -v /data/bitbucket:/var/atlassian/application-data/bitbucket epicmorg/bitbucket chown -R daemon /var/atlassian/application-data/bitbucket Note that this command can substitute folder paths with named volumes.
Note that this command can be replaced by named volumes.
Start Atlassian Bitbucket Server: Start Atlassian Bitbucket Server:
$> docker run -v /data/bitbucket:/var/atlassian/application-data/bitbucket --name="bitbucket" -d -p 7990:7990 -p 7999:7999 epicmorg/bitbucket $> docker run -v /data/bitbucket:/var/atlassian/application-data/bitbucket --name="bitbucket" -d -p 7990:7990 -p 7999:7999 atlassian/bitbucket-server
**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* **Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)*
@ -58,7 +58,27 @@ SERVER_PROXY_NAME=<Your url here>
Then you run Bitbucket as usual Then you run Bitbucket as usual
`docker run -v bitbucketVolume:/var/atlassian/application-data/bitbucket --name="bitbucket" -d -p 7990:7990 -p 7999:7999 --env-file=/path/to/env/file/secure-bitbucket.env epicmorg/bitbucket` `docker run -v bitbucketVolume:/var/atlassian/application-data/bitbucket --name="bitbucket" -d -p 7990:7990 -p 7999:7999 --env-file=/path/to/env/file/secure-bitbucket.env atlassian/bitbucket-server:5.0`
### Bitbucket Server < 5.0
To set the reverse proxy arguments, you specify the following as environment variables in the `docker run` command
* `CATALINA_CONNECTOR_PROXYNAME` (default: NONE)
The reverse proxy's fully qualified hostname.
* `CATALINA_CONNECTOR_PROXYPORT` (default: NONE)
The reverse proxy's port number via which bitbucket is accessed.
* `CATALINA_CONNECTOR_SCHEME` (default: http)
The protocol via which bitbucket is accessed.
* `CATALINA_CONNECTOR_SECURE` (default: false)
Set 'true' if CATALINA\_CONNECTOR\_SCHEME is 'https'.
## JVM Configuration (Bitbucket Server 5.0 + only) ## JVM Configuration (Bitbucket Server 5.0 + only)
@ -117,7 +137,7 @@ Note: Docker networks may support multicast, however the below example shows con
$> docker run --network=myBitbucketNetwork --ip=172.18.1.1 -e ELASTICSEARCH_ENABLED=false \ $> docker run --network=myBitbucketNetwork --ip=172.18.1.1 -e ELASTICSEARCH_ENABLED=false \
-e HAZELCAST_NETWORK_TCPIP=true -e HAZELCAST_NETWORK_TCPIP_MEMBERS=172.18.1.1:5701,172.18.1.2:5701,172.18.1.3:5701 \ -e HAZELCAST_NETWORK_TCPIP=true -e HAZELCAST_NETWORK_TCPIP_MEMBERS=172.18.1.1:5701,172.18.1.2:5701,172.18.1.3:5701 \
-e HAZELCAST_GROUP_NAME=bitbucket -e HAZELCAST_GROUP_PASSWORD=mysecretpassword \ -e HAZELCAST_GROUP_NAME=bitbucket -e HAZELCAST_GROUP_PASSWORD=mysecretpassword \
-v /data/bitbucket-shared:/var/atlassian/application-data/bitbucket/shared --name="bitbucket" -d -p 7990:7990 -p 7999:7999 epicmorg/bitbucket -v /data/bitbucket-shared:/var/atlassian/application-data/bitbucket/shared --name="bitbucket" -d -p 7990:7990 -p 7999:7999 atlassian/bitbucket-server
## JMX Monitoring (Bitbucket Server 5.0 + only) ## JMX Monitoring (Bitbucket Server 5.0 + only)
@ -149,7 +169,7 @@ Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX,
$> docker run -e JMX_ENABLED=true -e JMX_REMOTE_AUTH=password -e JMX_REMOTE_RMI_PORT=3333 -e RMI_SERVER_HOSTNAME=bitbucket \ $> docker run -e JMX_ENABLED=true -e JMX_REMOTE_AUTH=password -e JMX_REMOTE_RMI_PORT=3333 -e RMI_SERVER_HOSTNAME=bitbucket \
-e JMX_PASSWORD_FILE=/data/bitbucket:/var/atlassian/application-data/bitbucket/jmx.access \ -e JMX_PASSWORD_FILE=/data/bitbucket:/var/atlassian/application-data/bitbucket/jmx.access \
-v /data/bitbucket:/var/atlassian/application-data/bitbucket --name="bitbucket" -d -p 7990:7990 -p 7999:7999 -p 3333:3333 epicmorg/bitbucket -v /data/bitbucket:/var/atlassian/application-data/bitbucket --name="bitbucket" -d -p 7990:7990 -p 7999:7999 -p 3333:3333 atlassian/bitbucket-server
# Upgrade # Upgrade
@ -158,7 +178,7 @@ container and start a new one based on a more recent image:
$> docker stop bitbucket $> docker stop bitbucket
$> docker rm bitbucket $> docker rm bitbucket
$> docker pull epicmorg/bitbucket $> docker pull atlassian/bitbucket-server:<desired_version>
$> docker run ... (See above) $> docker run ... (See above)
As your data is stored in the data volume directory on the host it will still As your data is stored in the data volume directory on the host it will still
@ -177,5 +197,20 @@ Read more about data recovery and backups: [https://confluence.atlassian.com/dis
# Versioning # Versioning
The `latest` tag matches the most recent version of this repository. Thus using `epicmorg/bitbucket:latest` or `epicmorg/bitbucket` will ensure you are running the most up to date version of this image. The `latest` tag matches the most recent version of this repository. Thus using `atlassian/bitbucket:latest` or `atlassian/bitbucket` will ensure you are running the most up to date version of this image.
However, we ** strongly recommend ** that for non-eval workloads you select a specific version in order to prevent breaking changes from impacting your setup.
You can use a specific minor version of Bitbucket Server by using a version number
tag: `atlassian/bitbucket-server:4.14`. This will install the latest `4.14.x` version that
is available.
# Issue tracker
Please raise an [issue](https://bitbucket.org/atlassian/docker-atlassian-bitbucket-server/issues) if you encounter any problems with this Dockerfile.
# Support
For product support, go to [support.atlassian.com](https://support.atlassian.com/)
Octotree is enabled on this page. Click this button or press cmd shift s (or ctrl shift s) to show it.
Support us • Feedback?