diff --git a/README.md b/README.md index f459c701f..38f0f91b2 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ ## Changelog * 02/14/2019 - * bitbucket `5.16.0` -> `5.16.1` (*6x 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` * 02/12/2019 * added curl binary to `balancer` and `websites` containers. diff --git a/bitbucket/latest/Dockerfile b/bitbucket/latest/Dockerfile index c35f89eb7..3c6667fbb 100644 --- a/bitbucket/latest/Dockerfile +++ b/bitbucket/latest/Dockerfile @@ -1,32 +1,38 @@ -FROM openjdk:8-jdk-alpine +FROM adoptopenjdk/openjdk8:slim + MAINTAINER Atlassian Bitbucket Server Team -ENV RUN_USER daemon -ENV RUN_GROUP daemon +ENV RUN_USER daemon +ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory -ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket -ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket +ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket +ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME # Expose HTTP and SSH ports EXPOSE 7990 EXPOSE 7999 -WORKDIR $BITBUCKET_HOME - 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 -ARG DOWNLOAD_URL=https://downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz -COPY . /tmp +COPY entrypoint.sh /entrypoint.sh -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}/ +ARG BITBUCKET_VERSION=6.0.0 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +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 \ No newline at end of file diff --git a/bitbucket/latest/README.md b/bitbucket/latest/README.md index 277f1dcc7..b60c42068 100644 --- a/bitbucket/latest/README.md +++ b/bitbucket/latest/README.md @@ -7,24 +7,24 @@ Learn more about Bitbucket Server: = 1.9. - -## For other versions -Set permissions for the data directory so that the runuser can write to it: +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. - $> 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 be replaced by named volumes. + $> 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 + +Note that this command can substitute folder paths with named volumes. 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)* @@ -58,8 +58,28 @@ SERVER_PROXY_NAME= 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) If you need to override Bitbucket Server's default memory configuration or pass additional JVM arguments, use the environment variables below @@ -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 \ -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 \ - -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) @@ -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 \ -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 @@ -158,7 +178,7 @@ container and start a new one based on a more recent image: $> docker stop bitbucket $> docker rm bitbucket - $> docker pull epicmorg/bitbucket + $> docker pull atlassian/bitbucket-server: $> docker run ... (See above) 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 -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? diff --git a/bitbucket/latest/entrypoint.sh b/bitbucket/latest/entrypoint.sh index fa06f8bb1..eb02f69b3 100755 --- a/bitbucket/latest/entrypoint.sh +++ b/bitbucket/latest/entrypoint.sh @@ -46,4 +46,4 @@ if [ "${UID}" -eq 0 ]; then exec su -s /bin/bash "${RUN_USER}" -c "${BITBUCKET_INSTALL_DIR}/bin/start-bitbucket.sh ${ARGS}" else exec "${BITBUCKET_INSTALL_DIR}/bin/start-bitbucket.sh" ${ARGS} -fi \ No newline at end of file +fi