diff --git a/.github/workflows/epicmorg.base.images.current.debian12.yml b/.github/workflows/epicmorg.base.images.current.debian12.yml.disabled similarity index 100% rename from .github/workflows/epicmorg.base.images.current.debian12.yml rename to .github/workflows/epicmorg.base.images.current.debian12.yml.disabled diff --git a/CHANGELOG.md b/CHANGELOG.md index f43865c59..cb3c9f0ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog ## 2023 * `jan` + * added new `jira` releases + * added new `bitbucket` releases + * added new `confluence` releases + * fixed `git` binary sources ------------------------------------------------------------------- ## 2022 * `dec` diff --git a/Makefile b/Makefile index cce8ca54c..4c4fe1cb3 100644 --- a/Makefile +++ b/Makefile @@ -242,7 +242,7 @@ ecosystem-debian-images: make ecosystem-debian-stretch-images make ecosystem-debian-buster-images make ecosystem-debian-bullseye-images - make ecosystem-debian-bookworm-images +# make ecosystem-debian-bookworm-images ecosystem-debian-squeeze-images: cd `pwd`/linux/ecosystem/epicmorg/debian/06-squeeze/slim && pwd && make build && make deploy @@ -536,10 +536,44 @@ bundle-atlassian: @echo "=======================================" cd `pwd`/linux/ecosystem/atlassian/bitbucket/latest && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/confluence/latest && pwd && make build && make deploy - cd `pwd`/linux/ecosystem/atlassian/crucible/latest && pwd && make build && make deploy - cd `pwd`/linux/ecosystem/atlassian/fisheye/latest && pwd && make build && make deploy +# cd `pwd`/linux/ecosystem/atlassian/crucible/latest && pwd && make build && make deploy +# cd `pwd`/linux/ecosystem/atlassian/fisheye/latest && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/fisheye-crucible/latest && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/jira/latest && pwd && make build && make deploy +# + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.3.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.3.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.4.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.4.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.4.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.5.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.5.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.6.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.6.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.7.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/7/7.19.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/7/7.19.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/7/7.19.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/7/7.19.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/7/7.19.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/7/7.20.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/7/7.20.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/7/7.20.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/7/7.20.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/8/8.0.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/8/8.0.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/confluence/8/8.0.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/jira/9/9.2.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/jira/9/9.3.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/jira/9/9.3.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/jira/9/9.3.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/jira/9/9.3.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/jira/9/9.4.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/jira/9/9.4.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/jira/9/9.4.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/jira/9/9.5.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/jira/9/9.5.1 && pwd && make build && make deploy + bundle-web: @echo "=======================================" diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile index b1db908cc..4952fa9ad 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile.jdk11 index 9bf8ba62f..683b1a904 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile.jdk11 @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile index e4fd2a4e2..3baedc6b9 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile.jdk11 index 2baba6334..1bd1bb22b 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile.jdk11 @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile index 21bc06319..3bb7aa5c9 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile.jdk11 index cb08b9828..8158f0beb 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile.jdk11 @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile index 4acacd040..30c300840 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile.jdk11 index b11c4d665..5b70cceb7 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile.jdk11 @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile index b434989a8..934f239ca 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile.jdk11 index ae9caebaa..884d383a4 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile.jdk11 @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile index e18573764..dcb237e36 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile.jdk11 index efc26fae1..91ee5a7b3 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile.jdk11 @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile index 7b4dc95b1..5a76d76df 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile.jdk11 index a735be298..0255b1166 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile.jdk11 @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile index d70459e5f..2c1d42833 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile.jdk11 index f0abcb185..6f32e7686 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile.jdk11 @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bookworm-jdk11 +FROM epicmorg/debian:bullseye-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile new file mode 100644 index 000000000..948a130b5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile @@ -0,0 +1,44 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.3.2 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile.jdk11 new file mode 100644 index 000000000..38f86ed92 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.3.2 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/README.md b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/README.md new file mode 100644 index 000000000..b60c42068 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/README.md @@ -0,0 +1,216 @@ +![Atlassian Bitbucket Server](https://www.atlassian.com/dam/wac/legacy/bitbucket_logo_landing.png) + +Bitbucket Server is an on-premises source code management solution for Git that's secure, fast, and enterprise grade. Create and manage repositories, set up fine-grained permissions, and collaborate on code - all with the flexibility of your servers. + +Learn more about Bitbucket Server: + +# Overview + +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 + +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. + +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 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 atlassian/bitbucket-server + +**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate both the application server +and the git processes. +See [Supported Platforms](https://confluence.atlassian.com/display/BitbucketServer/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):7990` instead._ + +## Reverse Proxy Settings + +If Bitbucket is run behind a reverse proxy server as [described here](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html), +then you need to specify extra options to make bitbucket aware of the setup. They can be controlled via the below +environment variables. + +### Bitbucket Server 5.0 + + +Due to the migration to Spring Boot in 5.0, there are changes to how you set up Bitbucket to run behind a reverse proxy. + +In this example, we'll use an environment file. You can also do this via [specifying each environment variable](https://docs.docker.com/engine/reference/run/#env-environment-variables) via the `-e` argument in `docker run`. + +#### secure-bitbucket.env +``` +SERVER_SECURE=true +SERVER_SCHEME=https +SERVER_PROXY_PORT=443 +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 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 + +* `JVM_MINIMUM_MEMORY` (default: 512m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +* `JVM_SUPPORT_RECOMMENDED_ARGS` (default: NONE) + + Additional JVM arguments for Bitbucket Server, such as a custom Java Trust Store + +## Application Mode Settings (Bitbucket Server 5.0 + only) + +This docker image can be run as a [Smart Mirror](https://confluence.atlassian.com/bitbucketserver/smart-mirroring-776640046.html) or as part of a [Data Center](https://confluence.atlassian.com/enterprise/bitbucket-data-center-668468332.html) cluster. +You can specify the following properties to start Bitbucket as a mirror or as a Data Center node: + +* `ELASTICSEARCH_ENABLED` (default: true) + + Set 'false' to prevent Elasticsearch from starting in the container. This should be used if Elasticsearch is running remotely, e.g. for if Bitbucket is running in a Data Center cluster + +* `APPLICATION_MODE` (default: default) + + The mode Bitbucket will run in. This can be set to 'mirror' to start Bitbucket as a Smart Mirror. This will also disable Elasticsearch even if `ELASTICSEARCH_ENABLED` has not been set to 'false'. + +* `HAZELCAST_NETWORK_MULTICAST` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via multicast. `HAZELCAST_NETWORK_TCPIP` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via TCPIP. This setting requires `HAZELCAST_NETWORK_TCPIP_MEMBERS` to be specified. `HAZELCAST_NETWORK_MULTICAST` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP_MEMBERS` + + Data Center: List of members that Hazelcast nodes should connect to when HAZELCAST_NETWORK_TCPIP is 'true' + +* `HAZELCAST_GROUP_NAME` + + Data Center: Specifies the cluster group the instance should join. + +* `HAZELCAST_GROUP_PASSWORD` + + Data Center: The password required to join the specified cluster group. + +To run Bitbucket as part of a Data Center cluster, create a Docker network and assign the Bitbucket container a static IP. + +Note: Docker networks may support multicast, however the below example shows configuration using TCPIP. + + $> docker network create --driver bridge --subnet=172.18.0.0/16 myBitbucketNetwork + $> 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 atlassian/bitbucket-server + +## JMX Monitoring (Bitbucket Server 5.0 + only) + +Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX, use the environment variables below. For further information on JMX configuration, see [Enabling JMX counters for performance monitoring](https://confluence.atlassian.com/bitbucketserver/enabling-jmx-counters-for-performance-monitoring-776640189.html) + +* `JMX_ENABLED` (default: false) + + Enable Bitbucket to publish JMX data + +* `JMX_REMOTE_AUTH` (default: NONE) + + Set the authentication to use for remote JMX access. This value is required: anything other than "password" or "ssl" will cause remote JMX access to be disabled + +* `JMX_REMOTE_PORT` (default: 3333) + + The port used to negotiate a JMX connection. Note: this port is only used during the initial authorization, after which a different RMI port used for data transfer + +* `JMX_REMOTE_RMI_PORT` (default: ) + + The port used for all subsequent JMX-RMI data transfer. If desired, the RMI data port can be set to the same value as `JMX_REMOTE_PORT` to allow a single port to be used for both JMX authorization and data transfer + +* `RMI_SERVER_HOSTNAME` (default: NONE) + + The hostname or IP address that clients will use to connect to the application for JMX monitoring. This must be resolvable by both clients and from the JVM host machine. + +* `JMX_PASSWORD_FILE` (default: NONE) + + The full path to the JMX username/password file used to authenticate remote JMX clients. This is required when `JMX_REMOTE_AUTH` is set to "password" + + $> 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 atlassian/bitbucket-server + +# Upgrade + +To upgrade to a more recent version of Bitbucket Server you can simply stop the `bitbucket` +container and start a new one based on a more recent image: + + $> docker stop bitbucket + $> docker rm 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 +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `bitbucket` +container and its volumes using the `-v` option._ + +# Backup + +For evaluations you can use the built-in database that will store its files in the Bitbucket Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/bitbucket` in the example above). + +The [Bitbucket Server Backup Client](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) is currently not supported in the Docker setup. You can however use the [Bitbucket Server DIY Backup](https://confluence.atlassian.com/display/BitbucketServer/Using+Bitbucket+Server+DIY+Backup) approach in case you decided to use an external database. + +Read more about data recovery and backups: [https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) + +# Versioning + +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/linux/ecosystem/atlassian/bitbucket/8/8.3.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/docker-compose.yml new file mode 100644 index 000000000..362cddb71 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/bitbucket:8.3.2" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.3.2-jdk11" + build: + context: . + dockerfile: ./Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -euo pipefail + +# Set recommended umask of "u=,g=w,o=rwx" (0027) +umask 0027 + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +#export PATH=$JAVA_HOME/bin:$PATH + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +: ${ELASTICSEARCH_ENABLED:=true} +: ${APPLICATION_MODE:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +ARGS="$@" + +# Start Bitbucket without Elasticsearch +if [ "${ELASTICSEARCH_ENABLED}" == "false" ] || [ "${APPLICATION_MODE}" == "mirror" ]; then + ARGS="--no-search ${ARGS}" +fi + +# Start Bitbucket as the correct user. +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${BITBUCKET_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + echo "Updating permissions for BITBUCKET_HOME" + mkdir -p "${BITBUCKET_HOME}/lib" && + chmod -R 700 "${BITBUCKET_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${BITBUCKET_HOME}" + fi + # Now drop privileges + 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 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile new file mode 100644 index 000000000..2346c1364 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile @@ -0,0 +1,44 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.3.3 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile.jdk11 new file mode 100644 index 000000000..1a80db6f1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.3.3 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/README.md b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/README.md new file mode 100644 index 000000000..b60c42068 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/README.md @@ -0,0 +1,216 @@ +![Atlassian Bitbucket Server](https://www.atlassian.com/dam/wac/legacy/bitbucket_logo_landing.png) + +Bitbucket Server is an on-premises source code management solution for Git that's secure, fast, and enterprise grade. Create and manage repositories, set up fine-grained permissions, and collaborate on code - all with the flexibility of your servers. + +Learn more about Bitbucket Server: + +# Overview + +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 + +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. + +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 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 atlassian/bitbucket-server + +**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate both the application server +and the git processes. +See [Supported Platforms](https://confluence.atlassian.com/display/BitbucketServer/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):7990` instead._ + +## Reverse Proxy Settings + +If Bitbucket is run behind a reverse proxy server as [described here](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html), +then you need to specify extra options to make bitbucket aware of the setup. They can be controlled via the below +environment variables. + +### Bitbucket Server 5.0 + + +Due to the migration to Spring Boot in 5.0, there are changes to how you set up Bitbucket to run behind a reverse proxy. + +In this example, we'll use an environment file. You can also do this via [specifying each environment variable](https://docs.docker.com/engine/reference/run/#env-environment-variables) via the `-e` argument in `docker run`. + +#### secure-bitbucket.env +``` +SERVER_SECURE=true +SERVER_SCHEME=https +SERVER_PROXY_PORT=443 +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 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 + +* `JVM_MINIMUM_MEMORY` (default: 512m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +* `JVM_SUPPORT_RECOMMENDED_ARGS` (default: NONE) + + Additional JVM arguments for Bitbucket Server, such as a custom Java Trust Store + +## Application Mode Settings (Bitbucket Server 5.0 + only) + +This docker image can be run as a [Smart Mirror](https://confluence.atlassian.com/bitbucketserver/smart-mirroring-776640046.html) or as part of a [Data Center](https://confluence.atlassian.com/enterprise/bitbucket-data-center-668468332.html) cluster. +You can specify the following properties to start Bitbucket as a mirror or as a Data Center node: + +* `ELASTICSEARCH_ENABLED` (default: true) + + Set 'false' to prevent Elasticsearch from starting in the container. This should be used if Elasticsearch is running remotely, e.g. for if Bitbucket is running in a Data Center cluster + +* `APPLICATION_MODE` (default: default) + + The mode Bitbucket will run in. This can be set to 'mirror' to start Bitbucket as a Smart Mirror. This will also disable Elasticsearch even if `ELASTICSEARCH_ENABLED` has not been set to 'false'. + +* `HAZELCAST_NETWORK_MULTICAST` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via multicast. `HAZELCAST_NETWORK_TCPIP` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via TCPIP. This setting requires `HAZELCAST_NETWORK_TCPIP_MEMBERS` to be specified. `HAZELCAST_NETWORK_MULTICAST` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP_MEMBERS` + + Data Center: List of members that Hazelcast nodes should connect to when HAZELCAST_NETWORK_TCPIP is 'true' + +* `HAZELCAST_GROUP_NAME` + + Data Center: Specifies the cluster group the instance should join. + +* `HAZELCAST_GROUP_PASSWORD` + + Data Center: The password required to join the specified cluster group. + +To run Bitbucket as part of a Data Center cluster, create a Docker network and assign the Bitbucket container a static IP. + +Note: Docker networks may support multicast, however the below example shows configuration using TCPIP. + + $> docker network create --driver bridge --subnet=172.18.0.0/16 myBitbucketNetwork + $> 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 atlassian/bitbucket-server + +## JMX Monitoring (Bitbucket Server 5.0 + only) + +Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX, use the environment variables below. For further information on JMX configuration, see [Enabling JMX counters for performance monitoring](https://confluence.atlassian.com/bitbucketserver/enabling-jmx-counters-for-performance-monitoring-776640189.html) + +* `JMX_ENABLED` (default: false) + + Enable Bitbucket to publish JMX data + +* `JMX_REMOTE_AUTH` (default: NONE) + + Set the authentication to use for remote JMX access. This value is required: anything other than "password" or "ssl" will cause remote JMX access to be disabled + +* `JMX_REMOTE_PORT` (default: 3333) + + The port used to negotiate a JMX connection. Note: this port is only used during the initial authorization, after which a different RMI port used for data transfer + +* `JMX_REMOTE_RMI_PORT` (default: ) + + The port used for all subsequent JMX-RMI data transfer. If desired, the RMI data port can be set to the same value as `JMX_REMOTE_PORT` to allow a single port to be used for both JMX authorization and data transfer + +* `RMI_SERVER_HOSTNAME` (default: NONE) + + The hostname or IP address that clients will use to connect to the application for JMX monitoring. This must be resolvable by both clients and from the JVM host machine. + +* `JMX_PASSWORD_FILE` (default: NONE) + + The full path to the JMX username/password file used to authenticate remote JMX clients. This is required when `JMX_REMOTE_AUTH` is set to "password" + + $> 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 atlassian/bitbucket-server + +# Upgrade + +To upgrade to a more recent version of Bitbucket Server you can simply stop the `bitbucket` +container and start a new one based on a more recent image: + + $> docker stop bitbucket + $> docker rm 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 +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `bitbucket` +container and its volumes using the `-v` option._ + +# Backup + +For evaluations you can use the built-in database that will store its files in the Bitbucket Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/bitbucket` in the example above). + +The [Bitbucket Server Backup Client](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) is currently not supported in the Docker setup. You can however use the [Bitbucket Server DIY Backup](https://confluence.atlassian.com/display/BitbucketServer/Using+Bitbucket+Server+DIY+Backup) approach in case you decided to use an external database. + +Read more about data recovery and backups: [https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) + +# Versioning + +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/linux/ecosystem/atlassian/bitbucket/8/8.3.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/docker-compose.yml new file mode 100644 index 000000000..795331897 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/bitbucket:8.3.3" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.3.3-jdk11" + build: + context: . + dockerfile: ./Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -euo pipefail + +# Set recommended umask of "u=,g=w,o=rwx" (0027) +umask 0027 + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +#export PATH=$JAVA_HOME/bin:$PATH + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +: ${ELASTICSEARCH_ENABLED:=true} +: ${APPLICATION_MODE:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +ARGS="$@" + +# Start Bitbucket without Elasticsearch +if [ "${ELASTICSEARCH_ENABLED}" == "false" ] || [ "${APPLICATION_MODE}" == "mirror" ]; then + ARGS="--no-search ${ARGS}" +fi + +# Start Bitbucket as the correct user. +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${BITBUCKET_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + echo "Updating permissions for BITBUCKET_HOME" + mkdir -p "${BITBUCKET_HOME}/lib" && + chmod -R 700 "${BITBUCKET_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${BITBUCKET_HOME}" + fi + # Now drop privileges + 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 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile new file mode 100644 index 000000000..c6fa35882 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile @@ -0,0 +1,44 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.4.0 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile.jdk11 new file mode 100644 index 000000000..4fadd129f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.4.0 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/README.md b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/README.md new file mode 100644 index 000000000..b60c42068 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/README.md @@ -0,0 +1,216 @@ +![Atlassian Bitbucket Server](https://www.atlassian.com/dam/wac/legacy/bitbucket_logo_landing.png) + +Bitbucket Server is an on-premises source code management solution for Git that's secure, fast, and enterprise grade. Create and manage repositories, set up fine-grained permissions, and collaborate on code - all with the flexibility of your servers. + +Learn more about Bitbucket Server: + +# Overview + +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 + +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. + +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 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 atlassian/bitbucket-server + +**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate both the application server +and the git processes. +See [Supported Platforms](https://confluence.atlassian.com/display/BitbucketServer/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):7990` instead._ + +## Reverse Proxy Settings + +If Bitbucket is run behind a reverse proxy server as [described here](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html), +then you need to specify extra options to make bitbucket aware of the setup. They can be controlled via the below +environment variables. + +### Bitbucket Server 5.0 + + +Due to the migration to Spring Boot in 5.0, there are changes to how you set up Bitbucket to run behind a reverse proxy. + +In this example, we'll use an environment file. You can also do this via [specifying each environment variable](https://docs.docker.com/engine/reference/run/#env-environment-variables) via the `-e` argument in `docker run`. + +#### secure-bitbucket.env +``` +SERVER_SECURE=true +SERVER_SCHEME=https +SERVER_PROXY_PORT=443 +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 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 + +* `JVM_MINIMUM_MEMORY` (default: 512m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +* `JVM_SUPPORT_RECOMMENDED_ARGS` (default: NONE) + + Additional JVM arguments for Bitbucket Server, such as a custom Java Trust Store + +## Application Mode Settings (Bitbucket Server 5.0 + only) + +This docker image can be run as a [Smart Mirror](https://confluence.atlassian.com/bitbucketserver/smart-mirroring-776640046.html) or as part of a [Data Center](https://confluence.atlassian.com/enterprise/bitbucket-data-center-668468332.html) cluster. +You can specify the following properties to start Bitbucket as a mirror or as a Data Center node: + +* `ELASTICSEARCH_ENABLED` (default: true) + + Set 'false' to prevent Elasticsearch from starting in the container. This should be used if Elasticsearch is running remotely, e.g. for if Bitbucket is running in a Data Center cluster + +* `APPLICATION_MODE` (default: default) + + The mode Bitbucket will run in. This can be set to 'mirror' to start Bitbucket as a Smart Mirror. This will also disable Elasticsearch even if `ELASTICSEARCH_ENABLED` has not been set to 'false'. + +* `HAZELCAST_NETWORK_MULTICAST` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via multicast. `HAZELCAST_NETWORK_TCPIP` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via TCPIP. This setting requires `HAZELCAST_NETWORK_TCPIP_MEMBERS` to be specified. `HAZELCAST_NETWORK_MULTICAST` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP_MEMBERS` + + Data Center: List of members that Hazelcast nodes should connect to when HAZELCAST_NETWORK_TCPIP is 'true' + +* `HAZELCAST_GROUP_NAME` + + Data Center: Specifies the cluster group the instance should join. + +* `HAZELCAST_GROUP_PASSWORD` + + Data Center: The password required to join the specified cluster group. + +To run Bitbucket as part of a Data Center cluster, create a Docker network and assign the Bitbucket container a static IP. + +Note: Docker networks may support multicast, however the below example shows configuration using TCPIP. + + $> docker network create --driver bridge --subnet=172.18.0.0/16 myBitbucketNetwork + $> 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 atlassian/bitbucket-server + +## JMX Monitoring (Bitbucket Server 5.0 + only) + +Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX, use the environment variables below. For further information on JMX configuration, see [Enabling JMX counters for performance monitoring](https://confluence.atlassian.com/bitbucketserver/enabling-jmx-counters-for-performance-monitoring-776640189.html) + +* `JMX_ENABLED` (default: false) + + Enable Bitbucket to publish JMX data + +* `JMX_REMOTE_AUTH` (default: NONE) + + Set the authentication to use for remote JMX access. This value is required: anything other than "password" or "ssl" will cause remote JMX access to be disabled + +* `JMX_REMOTE_PORT` (default: 3333) + + The port used to negotiate a JMX connection. Note: this port is only used during the initial authorization, after which a different RMI port used for data transfer + +* `JMX_REMOTE_RMI_PORT` (default: ) + + The port used for all subsequent JMX-RMI data transfer. If desired, the RMI data port can be set to the same value as `JMX_REMOTE_PORT` to allow a single port to be used for both JMX authorization and data transfer + +* `RMI_SERVER_HOSTNAME` (default: NONE) + + The hostname or IP address that clients will use to connect to the application for JMX monitoring. This must be resolvable by both clients and from the JVM host machine. + +* `JMX_PASSWORD_FILE` (default: NONE) + + The full path to the JMX username/password file used to authenticate remote JMX clients. This is required when `JMX_REMOTE_AUTH` is set to "password" + + $> 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 atlassian/bitbucket-server + +# Upgrade + +To upgrade to a more recent version of Bitbucket Server you can simply stop the `bitbucket` +container and start a new one based on a more recent image: + + $> docker stop bitbucket + $> docker rm 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 +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `bitbucket` +container and its volumes using the `-v` option._ + +# Backup + +For evaluations you can use the built-in database that will store its files in the Bitbucket Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/bitbucket` in the example above). + +The [Bitbucket Server Backup Client](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) is currently not supported in the Docker setup. You can however use the [Bitbucket Server DIY Backup](https://confluence.atlassian.com/display/BitbucketServer/Using+Bitbucket+Server+DIY+Backup) approach in case you decided to use an external database. + +Read more about data recovery and backups: [https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) + +# Versioning + +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/linux/ecosystem/atlassian/bitbucket/8/8.4.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/docker-compose.yml new file mode 100644 index 000000000..a7aef3f59 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/bitbucket:8.4.0" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.4.0-jdk11" + build: + context: . + dockerfile: ./Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -euo pipefail + +# Set recommended umask of "u=,g=w,o=rwx" (0027) +umask 0027 + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +#export PATH=$JAVA_HOME/bin:$PATH + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +: ${ELASTICSEARCH_ENABLED:=true} +: ${APPLICATION_MODE:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +ARGS="$@" + +# Start Bitbucket without Elasticsearch +if [ "${ELASTICSEARCH_ENABLED}" == "false" ] || [ "${APPLICATION_MODE}" == "mirror" ]; then + ARGS="--no-search ${ARGS}" +fi + +# Start Bitbucket as the correct user. +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${BITBUCKET_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + echo "Updating permissions for BITBUCKET_HOME" + mkdir -p "${BITBUCKET_HOME}/lib" && + chmod -R 700 "${BITBUCKET_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${BITBUCKET_HOME}" + fi + # Now drop privileges + 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 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile new file mode 100644 index 000000000..9f1d1ddc9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile @@ -0,0 +1,44 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.4.1 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile.jdk11 new file mode 100644 index 000000000..92a769297 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.4.1 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/README.md b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/README.md new file mode 100644 index 000000000..b60c42068 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/README.md @@ -0,0 +1,216 @@ +![Atlassian Bitbucket Server](https://www.atlassian.com/dam/wac/legacy/bitbucket_logo_landing.png) + +Bitbucket Server is an on-premises source code management solution for Git that's secure, fast, and enterprise grade. Create and manage repositories, set up fine-grained permissions, and collaborate on code - all with the flexibility of your servers. + +Learn more about Bitbucket Server: + +# Overview + +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 + +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. + +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 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 atlassian/bitbucket-server + +**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate both the application server +and the git processes. +See [Supported Platforms](https://confluence.atlassian.com/display/BitbucketServer/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):7990` instead._ + +## Reverse Proxy Settings + +If Bitbucket is run behind a reverse proxy server as [described here](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html), +then you need to specify extra options to make bitbucket aware of the setup. They can be controlled via the below +environment variables. + +### Bitbucket Server 5.0 + + +Due to the migration to Spring Boot in 5.0, there are changes to how you set up Bitbucket to run behind a reverse proxy. + +In this example, we'll use an environment file. You can also do this via [specifying each environment variable](https://docs.docker.com/engine/reference/run/#env-environment-variables) via the `-e` argument in `docker run`. + +#### secure-bitbucket.env +``` +SERVER_SECURE=true +SERVER_SCHEME=https +SERVER_PROXY_PORT=443 +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 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 + +* `JVM_MINIMUM_MEMORY` (default: 512m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +* `JVM_SUPPORT_RECOMMENDED_ARGS` (default: NONE) + + Additional JVM arguments for Bitbucket Server, such as a custom Java Trust Store + +## Application Mode Settings (Bitbucket Server 5.0 + only) + +This docker image can be run as a [Smart Mirror](https://confluence.atlassian.com/bitbucketserver/smart-mirroring-776640046.html) or as part of a [Data Center](https://confluence.atlassian.com/enterprise/bitbucket-data-center-668468332.html) cluster. +You can specify the following properties to start Bitbucket as a mirror or as a Data Center node: + +* `ELASTICSEARCH_ENABLED` (default: true) + + Set 'false' to prevent Elasticsearch from starting in the container. This should be used if Elasticsearch is running remotely, e.g. for if Bitbucket is running in a Data Center cluster + +* `APPLICATION_MODE` (default: default) + + The mode Bitbucket will run in. This can be set to 'mirror' to start Bitbucket as a Smart Mirror. This will also disable Elasticsearch even if `ELASTICSEARCH_ENABLED` has not been set to 'false'. + +* `HAZELCAST_NETWORK_MULTICAST` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via multicast. `HAZELCAST_NETWORK_TCPIP` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via TCPIP. This setting requires `HAZELCAST_NETWORK_TCPIP_MEMBERS` to be specified. `HAZELCAST_NETWORK_MULTICAST` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP_MEMBERS` + + Data Center: List of members that Hazelcast nodes should connect to when HAZELCAST_NETWORK_TCPIP is 'true' + +* `HAZELCAST_GROUP_NAME` + + Data Center: Specifies the cluster group the instance should join. + +* `HAZELCAST_GROUP_PASSWORD` + + Data Center: The password required to join the specified cluster group. + +To run Bitbucket as part of a Data Center cluster, create a Docker network and assign the Bitbucket container a static IP. + +Note: Docker networks may support multicast, however the below example shows configuration using TCPIP. + + $> docker network create --driver bridge --subnet=172.18.0.0/16 myBitbucketNetwork + $> 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 atlassian/bitbucket-server + +## JMX Monitoring (Bitbucket Server 5.0 + only) + +Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX, use the environment variables below. For further information on JMX configuration, see [Enabling JMX counters for performance monitoring](https://confluence.atlassian.com/bitbucketserver/enabling-jmx-counters-for-performance-monitoring-776640189.html) + +* `JMX_ENABLED` (default: false) + + Enable Bitbucket to publish JMX data + +* `JMX_REMOTE_AUTH` (default: NONE) + + Set the authentication to use for remote JMX access. This value is required: anything other than "password" or "ssl" will cause remote JMX access to be disabled + +* `JMX_REMOTE_PORT` (default: 3333) + + The port used to negotiate a JMX connection. Note: this port is only used during the initial authorization, after which a different RMI port used for data transfer + +* `JMX_REMOTE_RMI_PORT` (default: ) + + The port used for all subsequent JMX-RMI data transfer. If desired, the RMI data port can be set to the same value as `JMX_REMOTE_PORT` to allow a single port to be used for both JMX authorization and data transfer + +* `RMI_SERVER_HOSTNAME` (default: NONE) + + The hostname or IP address that clients will use to connect to the application for JMX monitoring. This must be resolvable by both clients and from the JVM host machine. + +* `JMX_PASSWORD_FILE` (default: NONE) + + The full path to the JMX username/password file used to authenticate remote JMX clients. This is required when `JMX_REMOTE_AUTH` is set to "password" + + $> 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 atlassian/bitbucket-server + +# Upgrade + +To upgrade to a more recent version of Bitbucket Server you can simply stop the `bitbucket` +container and start a new one based on a more recent image: + + $> docker stop bitbucket + $> docker rm 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 +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `bitbucket` +container and its volumes using the `-v` option._ + +# Backup + +For evaluations you can use the built-in database that will store its files in the Bitbucket Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/bitbucket` in the example above). + +The [Bitbucket Server Backup Client](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) is currently not supported in the Docker setup. You can however use the [Bitbucket Server DIY Backup](https://confluence.atlassian.com/display/BitbucketServer/Using+Bitbucket+Server+DIY+Backup) approach in case you decided to use an external database. + +Read more about data recovery and backups: [https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) + +# Versioning + +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/linux/ecosystem/atlassian/bitbucket/8/8.4.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/docker-compose.yml new file mode 100644 index 000000000..c08ad12b9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/bitbucket:8.4.1" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.4.1-jdk11" + build: + context: . + dockerfile: ./Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -euo pipefail + +# Set recommended umask of "u=,g=w,o=rwx" (0027) +umask 0027 + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +#export PATH=$JAVA_HOME/bin:$PATH + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +: ${ELASTICSEARCH_ENABLED:=true} +: ${APPLICATION_MODE:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +ARGS="$@" + +# Start Bitbucket without Elasticsearch +if [ "${ELASTICSEARCH_ENABLED}" == "false" ] || [ "${APPLICATION_MODE}" == "mirror" ]; then + ARGS="--no-search ${ARGS}" +fi + +# Start Bitbucket as the correct user. +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${BITBUCKET_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + echo "Updating permissions for BITBUCKET_HOME" + mkdir -p "${BITBUCKET_HOME}/lib" && + chmod -R 700 "${BITBUCKET_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${BITBUCKET_HOME}" + fi + # Now drop privileges + 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 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile new file mode 100644 index 000000000..f7f3fa884 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile @@ -0,0 +1,44 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.4.2 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile.jdk11 new file mode 100644 index 000000000..4c76530c2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.4.2 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/README.md b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/README.md new file mode 100644 index 000000000..b60c42068 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/README.md @@ -0,0 +1,216 @@ +![Atlassian Bitbucket Server](https://www.atlassian.com/dam/wac/legacy/bitbucket_logo_landing.png) + +Bitbucket Server is an on-premises source code management solution for Git that's secure, fast, and enterprise grade. Create and manage repositories, set up fine-grained permissions, and collaborate on code - all with the flexibility of your servers. + +Learn more about Bitbucket Server: + +# Overview + +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 + +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. + +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 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 atlassian/bitbucket-server + +**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate both the application server +and the git processes. +See [Supported Platforms](https://confluence.atlassian.com/display/BitbucketServer/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):7990` instead._ + +## Reverse Proxy Settings + +If Bitbucket is run behind a reverse proxy server as [described here](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html), +then you need to specify extra options to make bitbucket aware of the setup. They can be controlled via the below +environment variables. + +### Bitbucket Server 5.0 + + +Due to the migration to Spring Boot in 5.0, there are changes to how you set up Bitbucket to run behind a reverse proxy. + +In this example, we'll use an environment file. You can also do this via [specifying each environment variable](https://docs.docker.com/engine/reference/run/#env-environment-variables) via the `-e` argument in `docker run`. + +#### secure-bitbucket.env +``` +SERVER_SECURE=true +SERVER_SCHEME=https +SERVER_PROXY_PORT=443 +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 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 + +* `JVM_MINIMUM_MEMORY` (default: 512m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +* `JVM_SUPPORT_RECOMMENDED_ARGS` (default: NONE) + + Additional JVM arguments for Bitbucket Server, such as a custom Java Trust Store + +## Application Mode Settings (Bitbucket Server 5.0 + only) + +This docker image can be run as a [Smart Mirror](https://confluence.atlassian.com/bitbucketserver/smart-mirroring-776640046.html) or as part of a [Data Center](https://confluence.atlassian.com/enterprise/bitbucket-data-center-668468332.html) cluster. +You can specify the following properties to start Bitbucket as a mirror or as a Data Center node: + +* `ELASTICSEARCH_ENABLED` (default: true) + + Set 'false' to prevent Elasticsearch from starting in the container. This should be used if Elasticsearch is running remotely, e.g. for if Bitbucket is running in a Data Center cluster + +* `APPLICATION_MODE` (default: default) + + The mode Bitbucket will run in. This can be set to 'mirror' to start Bitbucket as a Smart Mirror. This will also disable Elasticsearch even if `ELASTICSEARCH_ENABLED` has not been set to 'false'. + +* `HAZELCAST_NETWORK_MULTICAST` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via multicast. `HAZELCAST_NETWORK_TCPIP` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via TCPIP. This setting requires `HAZELCAST_NETWORK_TCPIP_MEMBERS` to be specified. `HAZELCAST_NETWORK_MULTICAST` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP_MEMBERS` + + Data Center: List of members that Hazelcast nodes should connect to when HAZELCAST_NETWORK_TCPIP is 'true' + +* `HAZELCAST_GROUP_NAME` + + Data Center: Specifies the cluster group the instance should join. + +* `HAZELCAST_GROUP_PASSWORD` + + Data Center: The password required to join the specified cluster group. + +To run Bitbucket as part of a Data Center cluster, create a Docker network and assign the Bitbucket container a static IP. + +Note: Docker networks may support multicast, however the below example shows configuration using TCPIP. + + $> docker network create --driver bridge --subnet=172.18.0.0/16 myBitbucketNetwork + $> 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 atlassian/bitbucket-server + +## JMX Monitoring (Bitbucket Server 5.0 + only) + +Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX, use the environment variables below. For further information on JMX configuration, see [Enabling JMX counters for performance monitoring](https://confluence.atlassian.com/bitbucketserver/enabling-jmx-counters-for-performance-monitoring-776640189.html) + +* `JMX_ENABLED` (default: false) + + Enable Bitbucket to publish JMX data + +* `JMX_REMOTE_AUTH` (default: NONE) + + Set the authentication to use for remote JMX access. This value is required: anything other than "password" or "ssl" will cause remote JMX access to be disabled + +* `JMX_REMOTE_PORT` (default: 3333) + + The port used to negotiate a JMX connection. Note: this port is only used during the initial authorization, after which a different RMI port used for data transfer + +* `JMX_REMOTE_RMI_PORT` (default: ) + + The port used for all subsequent JMX-RMI data transfer. If desired, the RMI data port can be set to the same value as `JMX_REMOTE_PORT` to allow a single port to be used for both JMX authorization and data transfer + +* `RMI_SERVER_HOSTNAME` (default: NONE) + + The hostname or IP address that clients will use to connect to the application for JMX monitoring. This must be resolvable by both clients and from the JVM host machine. + +* `JMX_PASSWORD_FILE` (default: NONE) + + The full path to the JMX username/password file used to authenticate remote JMX clients. This is required when `JMX_REMOTE_AUTH` is set to "password" + + $> 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 atlassian/bitbucket-server + +# Upgrade + +To upgrade to a more recent version of Bitbucket Server you can simply stop the `bitbucket` +container and start a new one based on a more recent image: + + $> docker stop bitbucket + $> docker rm 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 +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `bitbucket` +container and its volumes using the `-v` option._ + +# Backup + +For evaluations you can use the built-in database that will store its files in the Bitbucket Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/bitbucket` in the example above). + +The [Bitbucket Server Backup Client](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) is currently not supported in the Docker setup. You can however use the [Bitbucket Server DIY Backup](https://confluence.atlassian.com/display/BitbucketServer/Using+Bitbucket+Server+DIY+Backup) approach in case you decided to use an external database. + +Read more about data recovery and backups: [https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) + +# Versioning + +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/linux/ecosystem/atlassian/bitbucket/8/8.4.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/docker-compose.yml new file mode 100644 index 000000000..122c146c3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/bitbucket:8.4.2" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.4.2-jdk11" + build: + context: . + dockerfile: ./Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -euo pipefail + +# Set recommended umask of "u=,g=w,o=rwx" (0027) +umask 0027 + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +#export PATH=$JAVA_HOME/bin:$PATH + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +: ${ELASTICSEARCH_ENABLED:=true} +: ${APPLICATION_MODE:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +ARGS="$@" + +# Start Bitbucket without Elasticsearch +if [ "${ELASTICSEARCH_ENABLED}" == "false" ] || [ "${APPLICATION_MODE}" == "mirror" ]; then + ARGS="--no-search ${ARGS}" +fi + +# Start Bitbucket as the correct user. +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${BITBUCKET_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + echo "Updating permissions for BITBUCKET_HOME" + mkdir -p "${BITBUCKET_HOME}/lib" && + chmod -R 700 "${BITBUCKET_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${BITBUCKET_HOME}" + fi + # Now drop privileges + 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 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile new file mode 100644 index 000000000..f1fcd8020 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile @@ -0,0 +1,44 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.5.0 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile.jdk11 new file mode 100644 index 000000000..1ca6bcef3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.5.0 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/README.md b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/README.md new file mode 100644 index 000000000..b60c42068 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/README.md @@ -0,0 +1,216 @@ +![Atlassian Bitbucket Server](https://www.atlassian.com/dam/wac/legacy/bitbucket_logo_landing.png) + +Bitbucket Server is an on-premises source code management solution for Git that's secure, fast, and enterprise grade. Create and manage repositories, set up fine-grained permissions, and collaborate on code - all with the flexibility of your servers. + +Learn more about Bitbucket Server: + +# Overview + +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 + +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. + +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 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 atlassian/bitbucket-server + +**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate both the application server +and the git processes. +See [Supported Platforms](https://confluence.atlassian.com/display/BitbucketServer/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):7990` instead._ + +## Reverse Proxy Settings + +If Bitbucket is run behind a reverse proxy server as [described here](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html), +then you need to specify extra options to make bitbucket aware of the setup. They can be controlled via the below +environment variables. + +### Bitbucket Server 5.0 + + +Due to the migration to Spring Boot in 5.0, there are changes to how you set up Bitbucket to run behind a reverse proxy. + +In this example, we'll use an environment file. You can also do this via [specifying each environment variable](https://docs.docker.com/engine/reference/run/#env-environment-variables) via the `-e` argument in `docker run`. + +#### secure-bitbucket.env +``` +SERVER_SECURE=true +SERVER_SCHEME=https +SERVER_PROXY_PORT=443 +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 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 + +* `JVM_MINIMUM_MEMORY` (default: 512m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +* `JVM_SUPPORT_RECOMMENDED_ARGS` (default: NONE) + + Additional JVM arguments for Bitbucket Server, such as a custom Java Trust Store + +## Application Mode Settings (Bitbucket Server 5.0 + only) + +This docker image can be run as a [Smart Mirror](https://confluence.atlassian.com/bitbucketserver/smart-mirroring-776640046.html) or as part of a [Data Center](https://confluence.atlassian.com/enterprise/bitbucket-data-center-668468332.html) cluster. +You can specify the following properties to start Bitbucket as a mirror or as a Data Center node: + +* `ELASTICSEARCH_ENABLED` (default: true) + + Set 'false' to prevent Elasticsearch from starting in the container. This should be used if Elasticsearch is running remotely, e.g. for if Bitbucket is running in a Data Center cluster + +* `APPLICATION_MODE` (default: default) + + The mode Bitbucket will run in. This can be set to 'mirror' to start Bitbucket as a Smart Mirror. This will also disable Elasticsearch even if `ELASTICSEARCH_ENABLED` has not been set to 'false'. + +* `HAZELCAST_NETWORK_MULTICAST` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via multicast. `HAZELCAST_NETWORK_TCPIP` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via TCPIP. This setting requires `HAZELCAST_NETWORK_TCPIP_MEMBERS` to be specified. `HAZELCAST_NETWORK_MULTICAST` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP_MEMBERS` + + Data Center: List of members that Hazelcast nodes should connect to when HAZELCAST_NETWORK_TCPIP is 'true' + +* `HAZELCAST_GROUP_NAME` + + Data Center: Specifies the cluster group the instance should join. + +* `HAZELCAST_GROUP_PASSWORD` + + Data Center: The password required to join the specified cluster group. + +To run Bitbucket as part of a Data Center cluster, create a Docker network and assign the Bitbucket container a static IP. + +Note: Docker networks may support multicast, however the below example shows configuration using TCPIP. + + $> docker network create --driver bridge --subnet=172.18.0.0/16 myBitbucketNetwork + $> 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 atlassian/bitbucket-server + +## JMX Monitoring (Bitbucket Server 5.0 + only) + +Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX, use the environment variables below. For further information on JMX configuration, see [Enabling JMX counters for performance monitoring](https://confluence.atlassian.com/bitbucketserver/enabling-jmx-counters-for-performance-monitoring-776640189.html) + +* `JMX_ENABLED` (default: false) + + Enable Bitbucket to publish JMX data + +* `JMX_REMOTE_AUTH` (default: NONE) + + Set the authentication to use for remote JMX access. This value is required: anything other than "password" or "ssl" will cause remote JMX access to be disabled + +* `JMX_REMOTE_PORT` (default: 3333) + + The port used to negotiate a JMX connection. Note: this port is only used during the initial authorization, after which a different RMI port used for data transfer + +* `JMX_REMOTE_RMI_PORT` (default: ) + + The port used for all subsequent JMX-RMI data transfer. If desired, the RMI data port can be set to the same value as `JMX_REMOTE_PORT` to allow a single port to be used for both JMX authorization and data transfer + +* `RMI_SERVER_HOSTNAME` (default: NONE) + + The hostname or IP address that clients will use to connect to the application for JMX monitoring. This must be resolvable by both clients and from the JVM host machine. + +* `JMX_PASSWORD_FILE` (default: NONE) + + The full path to the JMX username/password file used to authenticate remote JMX clients. This is required when `JMX_REMOTE_AUTH` is set to "password" + + $> 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 atlassian/bitbucket-server + +# Upgrade + +To upgrade to a more recent version of Bitbucket Server you can simply stop the `bitbucket` +container and start a new one based on a more recent image: + + $> docker stop bitbucket + $> docker rm 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 +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `bitbucket` +container and its volumes using the `-v` option._ + +# Backup + +For evaluations you can use the built-in database that will store its files in the Bitbucket Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/bitbucket` in the example above). + +The [Bitbucket Server Backup Client](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) is currently not supported in the Docker setup. You can however use the [Bitbucket Server DIY Backup](https://confluence.atlassian.com/display/BitbucketServer/Using+Bitbucket+Server+DIY+Backup) approach in case you decided to use an external database. + +Read more about data recovery and backups: [https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) + +# Versioning + +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/linux/ecosystem/atlassian/bitbucket/8/8.5.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/docker-compose.yml new file mode 100644 index 000000000..2dc7aca41 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/bitbucket:8.5.0" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.5.0-jdk11" + build: + context: . + dockerfile: ./Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -euo pipefail + +# Set recommended umask of "u=,g=w,o=rwx" (0027) +umask 0027 + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +#export PATH=$JAVA_HOME/bin:$PATH + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +: ${ELASTICSEARCH_ENABLED:=true} +: ${APPLICATION_MODE:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +ARGS="$@" + +# Start Bitbucket without Elasticsearch +if [ "${ELASTICSEARCH_ENABLED}" == "false" ] || [ "${APPLICATION_MODE}" == "mirror" ]; then + ARGS="--no-search ${ARGS}" +fi + +# Start Bitbucket as the correct user. +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${BITBUCKET_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + echo "Updating permissions for BITBUCKET_HOME" + mkdir -p "${BITBUCKET_HOME}/lib" && + chmod -R 700 "${BITBUCKET_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${BITBUCKET_HOME}" + fi + # Now drop privileges + 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 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile new file mode 100644 index 000000000..95172c8d1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile @@ -0,0 +1,44 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.5.1 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile.jdk11 new file mode 100644 index 000000000..1f0a26d38 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.5.1 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/README.md b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/README.md new file mode 100644 index 000000000..b60c42068 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/README.md @@ -0,0 +1,216 @@ +![Atlassian Bitbucket Server](https://www.atlassian.com/dam/wac/legacy/bitbucket_logo_landing.png) + +Bitbucket Server is an on-premises source code management solution for Git that's secure, fast, and enterprise grade. Create and manage repositories, set up fine-grained permissions, and collaborate on code - all with the flexibility of your servers. + +Learn more about Bitbucket Server: + +# Overview + +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 + +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. + +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 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 atlassian/bitbucket-server + +**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate both the application server +and the git processes. +See [Supported Platforms](https://confluence.atlassian.com/display/BitbucketServer/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):7990` instead._ + +## Reverse Proxy Settings + +If Bitbucket is run behind a reverse proxy server as [described here](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html), +then you need to specify extra options to make bitbucket aware of the setup. They can be controlled via the below +environment variables. + +### Bitbucket Server 5.0 + + +Due to the migration to Spring Boot in 5.0, there are changes to how you set up Bitbucket to run behind a reverse proxy. + +In this example, we'll use an environment file. You can also do this via [specifying each environment variable](https://docs.docker.com/engine/reference/run/#env-environment-variables) via the `-e` argument in `docker run`. + +#### secure-bitbucket.env +``` +SERVER_SECURE=true +SERVER_SCHEME=https +SERVER_PROXY_PORT=443 +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 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 + +* `JVM_MINIMUM_MEMORY` (default: 512m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +* `JVM_SUPPORT_RECOMMENDED_ARGS` (default: NONE) + + Additional JVM arguments for Bitbucket Server, such as a custom Java Trust Store + +## Application Mode Settings (Bitbucket Server 5.0 + only) + +This docker image can be run as a [Smart Mirror](https://confluence.atlassian.com/bitbucketserver/smart-mirroring-776640046.html) or as part of a [Data Center](https://confluence.atlassian.com/enterprise/bitbucket-data-center-668468332.html) cluster. +You can specify the following properties to start Bitbucket as a mirror or as a Data Center node: + +* `ELASTICSEARCH_ENABLED` (default: true) + + Set 'false' to prevent Elasticsearch from starting in the container. This should be used if Elasticsearch is running remotely, e.g. for if Bitbucket is running in a Data Center cluster + +* `APPLICATION_MODE` (default: default) + + The mode Bitbucket will run in. This can be set to 'mirror' to start Bitbucket as a Smart Mirror. This will also disable Elasticsearch even if `ELASTICSEARCH_ENABLED` has not been set to 'false'. + +* `HAZELCAST_NETWORK_MULTICAST` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via multicast. `HAZELCAST_NETWORK_TCPIP` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via TCPIP. This setting requires `HAZELCAST_NETWORK_TCPIP_MEMBERS` to be specified. `HAZELCAST_NETWORK_MULTICAST` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP_MEMBERS` + + Data Center: List of members that Hazelcast nodes should connect to when HAZELCAST_NETWORK_TCPIP is 'true' + +* `HAZELCAST_GROUP_NAME` + + Data Center: Specifies the cluster group the instance should join. + +* `HAZELCAST_GROUP_PASSWORD` + + Data Center: The password required to join the specified cluster group. + +To run Bitbucket as part of a Data Center cluster, create a Docker network and assign the Bitbucket container a static IP. + +Note: Docker networks may support multicast, however the below example shows configuration using TCPIP. + + $> docker network create --driver bridge --subnet=172.18.0.0/16 myBitbucketNetwork + $> 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 atlassian/bitbucket-server + +## JMX Monitoring (Bitbucket Server 5.0 + only) + +Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX, use the environment variables below. For further information on JMX configuration, see [Enabling JMX counters for performance monitoring](https://confluence.atlassian.com/bitbucketserver/enabling-jmx-counters-for-performance-monitoring-776640189.html) + +* `JMX_ENABLED` (default: false) + + Enable Bitbucket to publish JMX data + +* `JMX_REMOTE_AUTH` (default: NONE) + + Set the authentication to use for remote JMX access. This value is required: anything other than "password" or "ssl" will cause remote JMX access to be disabled + +* `JMX_REMOTE_PORT` (default: 3333) + + The port used to negotiate a JMX connection. Note: this port is only used during the initial authorization, after which a different RMI port used for data transfer + +* `JMX_REMOTE_RMI_PORT` (default: ) + + The port used for all subsequent JMX-RMI data transfer. If desired, the RMI data port can be set to the same value as `JMX_REMOTE_PORT` to allow a single port to be used for both JMX authorization and data transfer + +* `RMI_SERVER_HOSTNAME` (default: NONE) + + The hostname or IP address that clients will use to connect to the application for JMX monitoring. This must be resolvable by both clients and from the JVM host machine. + +* `JMX_PASSWORD_FILE` (default: NONE) + + The full path to the JMX username/password file used to authenticate remote JMX clients. This is required when `JMX_REMOTE_AUTH` is set to "password" + + $> 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 atlassian/bitbucket-server + +# Upgrade + +To upgrade to a more recent version of Bitbucket Server you can simply stop the `bitbucket` +container and start a new one based on a more recent image: + + $> docker stop bitbucket + $> docker rm 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 +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `bitbucket` +container and its volumes using the `-v` option._ + +# Backup + +For evaluations you can use the built-in database that will store its files in the Bitbucket Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/bitbucket` in the example above). + +The [Bitbucket Server Backup Client](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) is currently not supported in the Docker setup. You can however use the [Bitbucket Server DIY Backup](https://confluence.atlassian.com/display/BitbucketServer/Using+Bitbucket+Server+DIY+Backup) approach in case you decided to use an external database. + +Read more about data recovery and backups: [https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) + +# Versioning + +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/linux/ecosystem/atlassian/bitbucket/8/8.5.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/docker-compose.yml new file mode 100644 index 000000000..465111d7f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/bitbucket:8.5.1" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.5.1-jdk11" + build: + context: . + dockerfile: ./Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -euo pipefail + +# Set recommended umask of "u=,g=w,o=rwx" (0027) +umask 0027 + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +#export PATH=$JAVA_HOME/bin:$PATH + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +: ${ELASTICSEARCH_ENABLED:=true} +: ${APPLICATION_MODE:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +ARGS="$@" + +# Start Bitbucket without Elasticsearch +if [ "${ELASTICSEARCH_ENABLED}" == "false" ] || [ "${APPLICATION_MODE}" == "mirror" ]; then + ARGS="--no-search ${ARGS}" +fi + +# Start Bitbucket as the correct user. +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${BITBUCKET_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + echo "Updating permissions for BITBUCKET_HOME" + mkdir -p "${BITBUCKET_HOME}/lib" && + chmod -R 700 "${BITBUCKET_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${BITBUCKET_HOME}" + fi + # Now drop privileges + 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 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile new file mode 100644 index 000000000..f002be025 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile @@ -0,0 +1,44 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.6.0 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile.jdk11 new file mode 100644 index 000000000..35d17e84c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.6.0 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/README.md b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/README.md new file mode 100644 index 000000000..b60c42068 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/README.md @@ -0,0 +1,216 @@ +![Atlassian Bitbucket Server](https://www.atlassian.com/dam/wac/legacy/bitbucket_logo_landing.png) + +Bitbucket Server is an on-premises source code management solution for Git that's secure, fast, and enterprise grade. Create and manage repositories, set up fine-grained permissions, and collaborate on code - all with the flexibility of your servers. + +Learn more about Bitbucket Server: + +# Overview + +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 + +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. + +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 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 atlassian/bitbucket-server + +**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate both the application server +and the git processes. +See [Supported Platforms](https://confluence.atlassian.com/display/BitbucketServer/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):7990` instead._ + +## Reverse Proxy Settings + +If Bitbucket is run behind a reverse proxy server as [described here](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html), +then you need to specify extra options to make bitbucket aware of the setup. They can be controlled via the below +environment variables. + +### Bitbucket Server 5.0 + + +Due to the migration to Spring Boot in 5.0, there are changes to how you set up Bitbucket to run behind a reverse proxy. + +In this example, we'll use an environment file. You can also do this via [specifying each environment variable](https://docs.docker.com/engine/reference/run/#env-environment-variables) via the `-e` argument in `docker run`. + +#### secure-bitbucket.env +``` +SERVER_SECURE=true +SERVER_SCHEME=https +SERVER_PROXY_PORT=443 +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 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 + +* `JVM_MINIMUM_MEMORY` (default: 512m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +* `JVM_SUPPORT_RECOMMENDED_ARGS` (default: NONE) + + Additional JVM arguments for Bitbucket Server, such as a custom Java Trust Store + +## Application Mode Settings (Bitbucket Server 5.0 + only) + +This docker image can be run as a [Smart Mirror](https://confluence.atlassian.com/bitbucketserver/smart-mirroring-776640046.html) or as part of a [Data Center](https://confluence.atlassian.com/enterprise/bitbucket-data-center-668468332.html) cluster. +You can specify the following properties to start Bitbucket as a mirror or as a Data Center node: + +* `ELASTICSEARCH_ENABLED` (default: true) + + Set 'false' to prevent Elasticsearch from starting in the container. This should be used if Elasticsearch is running remotely, e.g. for if Bitbucket is running in a Data Center cluster + +* `APPLICATION_MODE` (default: default) + + The mode Bitbucket will run in. This can be set to 'mirror' to start Bitbucket as a Smart Mirror. This will also disable Elasticsearch even if `ELASTICSEARCH_ENABLED` has not been set to 'false'. + +* `HAZELCAST_NETWORK_MULTICAST` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via multicast. `HAZELCAST_NETWORK_TCPIP` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via TCPIP. This setting requires `HAZELCAST_NETWORK_TCPIP_MEMBERS` to be specified. `HAZELCAST_NETWORK_MULTICAST` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP_MEMBERS` + + Data Center: List of members that Hazelcast nodes should connect to when HAZELCAST_NETWORK_TCPIP is 'true' + +* `HAZELCAST_GROUP_NAME` + + Data Center: Specifies the cluster group the instance should join. + +* `HAZELCAST_GROUP_PASSWORD` + + Data Center: The password required to join the specified cluster group. + +To run Bitbucket as part of a Data Center cluster, create a Docker network and assign the Bitbucket container a static IP. + +Note: Docker networks may support multicast, however the below example shows configuration using TCPIP. + + $> docker network create --driver bridge --subnet=172.18.0.0/16 myBitbucketNetwork + $> 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 atlassian/bitbucket-server + +## JMX Monitoring (Bitbucket Server 5.0 + only) + +Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX, use the environment variables below. For further information on JMX configuration, see [Enabling JMX counters for performance monitoring](https://confluence.atlassian.com/bitbucketserver/enabling-jmx-counters-for-performance-monitoring-776640189.html) + +* `JMX_ENABLED` (default: false) + + Enable Bitbucket to publish JMX data + +* `JMX_REMOTE_AUTH` (default: NONE) + + Set the authentication to use for remote JMX access. This value is required: anything other than "password" or "ssl" will cause remote JMX access to be disabled + +* `JMX_REMOTE_PORT` (default: 3333) + + The port used to negotiate a JMX connection. Note: this port is only used during the initial authorization, after which a different RMI port used for data transfer + +* `JMX_REMOTE_RMI_PORT` (default: ) + + The port used for all subsequent JMX-RMI data transfer. If desired, the RMI data port can be set to the same value as `JMX_REMOTE_PORT` to allow a single port to be used for both JMX authorization and data transfer + +* `RMI_SERVER_HOSTNAME` (default: NONE) + + The hostname or IP address that clients will use to connect to the application for JMX monitoring. This must be resolvable by both clients and from the JVM host machine. + +* `JMX_PASSWORD_FILE` (default: NONE) + + The full path to the JMX username/password file used to authenticate remote JMX clients. This is required when `JMX_REMOTE_AUTH` is set to "password" + + $> 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 atlassian/bitbucket-server + +# Upgrade + +To upgrade to a more recent version of Bitbucket Server you can simply stop the `bitbucket` +container and start a new one based on a more recent image: + + $> docker stop bitbucket + $> docker rm 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 +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `bitbucket` +container and its volumes using the `-v` option._ + +# Backup + +For evaluations you can use the built-in database that will store its files in the Bitbucket Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/bitbucket` in the example above). + +The [Bitbucket Server Backup Client](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) is currently not supported in the Docker setup. You can however use the [Bitbucket Server DIY Backup](https://confluence.atlassian.com/display/BitbucketServer/Using+Bitbucket+Server+DIY+Backup) approach in case you decided to use an external database. + +Read more about data recovery and backups: [https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) + +# Versioning + +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/linux/ecosystem/atlassian/bitbucket/8/8.6.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/docker-compose.yml new file mode 100644 index 000000000..8849dd96d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/bitbucket:8.6.0" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.6.0-jdk11" + build: + context: . + dockerfile: ./Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -euo pipefail + +# Set recommended umask of "u=,g=w,o=rwx" (0027) +umask 0027 + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +#export PATH=$JAVA_HOME/bin:$PATH + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +: ${ELASTICSEARCH_ENABLED:=true} +: ${APPLICATION_MODE:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +ARGS="$@" + +# Start Bitbucket without Elasticsearch +if [ "${ELASTICSEARCH_ENABLED}" == "false" ] || [ "${APPLICATION_MODE}" == "mirror" ]; then + ARGS="--no-search ${ARGS}" +fi + +# Start Bitbucket as the correct user. +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${BITBUCKET_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + echo "Updating permissions for BITBUCKET_HOME" + mkdir -p "${BITBUCKET_HOME}/lib" && + chmod -R 700 "${BITBUCKET_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${BITBUCKET_HOME}" + fi + # Now drop privileges + 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 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile new file mode 100644 index 000000000..f36e3c7f3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile @@ -0,0 +1,44 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.6.1 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile.jdk11 new file mode 100644 index 000000000..fbee1d53d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.6.1 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/README.md b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/README.md new file mode 100644 index 000000000..b60c42068 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/README.md @@ -0,0 +1,216 @@ +![Atlassian Bitbucket Server](https://www.atlassian.com/dam/wac/legacy/bitbucket_logo_landing.png) + +Bitbucket Server is an on-premises source code management solution for Git that's secure, fast, and enterprise grade. Create and manage repositories, set up fine-grained permissions, and collaborate on code - all with the flexibility of your servers. + +Learn more about Bitbucket Server: + +# Overview + +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 + +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. + +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 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 atlassian/bitbucket-server + +**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate both the application server +and the git processes. +See [Supported Platforms](https://confluence.atlassian.com/display/BitbucketServer/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):7990` instead._ + +## Reverse Proxy Settings + +If Bitbucket is run behind a reverse proxy server as [described here](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html), +then you need to specify extra options to make bitbucket aware of the setup. They can be controlled via the below +environment variables. + +### Bitbucket Server 5.0 + + +Due to the migration to Spring Boot in 5.0, there are changes to how you set up Bitbucket to run behind a reverse proxy. + +In this example, we'll use an environment file. You can also do this via [specifying each environment variable](https://docs.docker.com/engine/reference/run/#env-environment-variables) via the `-e` argument in `docker run`. + +#### secure-bitbucket.env +``` +SERVER_SECURE=true +SERVER_SCHEME=https +SERVER_PROXY_PORT=443 +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 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 + +* `JVM_MINIMUM_MEMORY` (default: 512m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +* `JVM_SUPPORT_RECOMMENDED_ARGS` (default: NONE) + + Additional JVM arguments for Bitbucket Server, such as a custom Java Trust Store + +## Application Mode Settings (Bitbucket Server 5.0 + only) + +This docker image can be run as a [Smart Mirror](https://confluence.atlassian.com/bitbucketserver/smart-mirroring-776640046.html) or as part of a [Data Center](https://confluence.atlassian.com/enterprise/bitbucket-data-center-668468332.html) cluster. +You can specify the following properties to start Bitbucket as a mirror or as a Data Center node: + +* `ELASTICSEARCH_ENABLED` (default: true) + + Set 'false' to prevent Elasticsearch from starting in the container. This should be used if Elasticsearch is running remotely, e.g. for if Bitbucket is running in a Data Center cluster + +* `APPLICATION_MODE` (default: default) + + The mode Bitbucket will run in. This can be set to 'mirror' to start Bitbucket as a Smart Mirror. This will also disable Elasticsearch even if `ELASTICSEARCH_ENABLED` has not been set to 'false'. + +* `HAZELCAST_NETWORK_MULTICAST` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via multicast. `HAZELCAST_NETWORK_TCPIP` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via TCPIP. This setting requires `HAZELCAST_NETWORK_TCPIP_MEMBERS` to be specified. `HAZELCAST_NETWORK_MULTICAST` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP_MEMBERS` + + Data Center: List of members that Hazelcast nodes should connect to when HAZELCAST_NETWORK_TCPIP is 'true' + +* `HAZELCAST_GROUP_NAME` + + Data Center: Specifies the cluster group the instance should join. + +* `HAZELCAST_GROUP_PASSWORD` + + Data Center: The password required to join the specified cluster group. + +To run Bitbucket as part of a Data Center cluster, create a Docker network and assign the Bitbucket container a static IP. + +Note: Docker networks may support multicast, however the below example shows configuration using TCPIP. + + $> docker network create --driver bridge --subnet=172.18.0.0/16 myBitbucketNetwork + $> 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 atlassian/bitbucket-server + +## JMX Monitoring (Bitbucket Server 5.0 + only) + +Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX, use the environment variables below. For further information on JMX configuration, see [Enabling JMX counters for performance monitoring](https://confluence.atlassian.com/bitbucketserver/enabling-jmx-counters-for-performance-monitoring-776640189.html) + +* `JMX_ENABLED` (default: false) + + Enable Bitbucket to publish JMX data + +* `JMX_REMOTE_AUTH` (default: NONE) + + Set the authentication to use for remote JMX access. This value is required: anything other than "password" or "ssl" will cause remote JMX access to be disabled + +* `JMX_REMOTE_PORT` (default: 3333) + + The port used to negotiate a JMX connection. Note: this port is only used during the initial authorization, after which a different RMI port used for data transfer + +* `JMX_REMOTE_RMI_PORT` (default: ) + + The port used for all subsequent JMX-RMI data transfer. If desired, the RMI data port can be set to the same value as `JMX_REMOTE_PORT` to allow a single port to be used for both JMX authorization and data transfer + +* `RMI_SERVER_HOSTNAME` (default: NONE) + + The hostname or IP address that clients will use to connect to the application for JMX monitoring. This must be resolvable by both clients and from the JVM host machine. + +* `JMX_PASSWORD_FILE` (default: NONE) + + The full path to the JMX username/password file used to authenticate remote JMX clients. This is required when `JMX_REMOTE_AUTH` is set to "password" + + $> 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 atlassian/bitbucket-server + +# Upgrade + +To upgrade to a more recent version of Bitbucket Server you can simply stop the `bitbucket` +container and start a new one based on a more recent image: + + $> docker stop bitbucket + $> docker rm 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 +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `bitbucket` +container and its volumes using the `-v` option._ + +# Backup + +For evaluations you can use the built-in database that will store its files in the Bitbucket Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/bitbucket` in the example above). + +The [Bitbucket Server Backup Client](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) is currently not supported in the Docker setup. You can however use the [Bitbucket Server DIY Backup](https://confluence.atlassian.com/display/BitbucketServer/Using+Bitbucket+Server+DIY+Backup) approach in case you decided to use an external database. + +Read more about data recovery and backups: [https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) + +# Versioning + +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/linux/ecosystem/atlassian/bitbucket/8/8.6.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/docker-compose.yml new file mode 100644 index 000000000..f6f9feacd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/bitbucket:8.6.1" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.6.1-jdk11" + build: + context: . + dockerfile: ./Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -euo pipefail + +# Set recommended umask of "u=,g=w,o=rwx" (0027) +umask 0027 + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +#export PATH=$JAVA_HOME/bin:$PATH + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +: ${ELASTICSEARCH_ENABLED:=true} +: ${APPLICATION_MODE:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +ARGS="$@" + +# Start Bitbucket without Elasticsearch +if [ "${ELASTICSEARCH_ENABLED}" == "false" ] || [ "${APPLICATION_MODE}" == "mirror" ]; then + ARGS="--no-search ${ARGS}" +fi + +# Start Bitbucket as the correct user. +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${BITBUCKET_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + echo "Updating permissions for BITBUCKET_HOME" + mkdir -p "${BITBUCKET_HOME}/lib" && + chmod -R 700 "${BITBUCKET_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${BITBUCKET_HOME}" + fi + # Now drop privileges + 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 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile new file mode 100644 index 000000000..8221dcdac --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile @@ -0,0 +1,44 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.7.0 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile.jdk11 new file mode 100644 index 000000000..fd63115ce --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG BITBUCKET_VERSION=8.7.0 +ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +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 + +VOLUME ["${BITBUCKET_HOME}"] +WORKDIR $BITBUCKET_HOME + +# Expose HTTP and SSH ports +EXPOSE 7990 +EXPOSE 7999 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} \ + && curl -L ${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 && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/README.md b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/README.md new file mode 100644 index 000000000..b60c42068 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/README.md @@ -0,0 +1,216 @@ +![Atlassian Bitbucket Server](https://www.atlassian.com/dam/wac/legacy/bitbucket_logo_landing.png) + +Bitbucket Server is an on-premises source code management solution for Git that's secure, fast, and enterprise grade. Create and manage repositories, set up fine-grained permissions, and collaborate on code - all with the flexibility of your servers. + +Learn more about Bitbucket Server: + +# Overview + +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 + +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. + +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 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 atlassian/bitbucket-server + +**Success**. Bitbucket is now available on [http://localhost:7990](http://localhost:7990)* + +Please ensure your container has the necessary resources allocated to it. +We recommend 2GiB of memory allocated to accommodate both the application server +and the git processes. +See [Supported Platforms](https://confluence.atlassian.com/display/BitbucketServer/Supported+platforms) for further information. + + +_* Note: If you are using `docker-machine` on Mac OS X, please use `open http://$(docker-machine ip default):7990` instead._ + +## Reverse Proxy Settings + +If Bitbucket is run behind a reverse proxy server as [described here](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html), +then you need to specify extra options to make bitbucket aware of the setup. They can be controlled via the below +environment variables. + +### Bitbucket Server 5.0 + + +Due to the migration to Spring Boot in 5.0, there are changes to how you set up Bitbucket to run behind a reverse proxy. + +In this example, we'll use an environment file. You can also do this via [specifying each environment variable](https://docs.docker.com/engine/reference/run/#env-environment-variables) via the `-e` argument in `docker run`. + +#### secure-bitbucket.env +``` +SERVER_SECURE=true +SERVER_SCHEME=https +SERVER_PROXY_PORT=443 +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 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 + +* `JVM_MINIMUM_MEMORY` (default: 512m) + + The minimum heap size of the JVM + +* `JVM_MAXIMUM_MEMORY` (default: 1024m) + + The maximum heap size of the JVM + +* `JVM_SUPPORT_RECOMMENDED_ARGS` (default: NONE) + + Additional JVM arguments for Bitbucket Server, such as a custom Java Trust Store + +## Application Mode Settings (Bitbucket Server 5.0 + only) + +This docker image can be run as a [Smart Mirror](https://confluence.atlassian.com/bitbucketserver/smart-mirroring-776640046.html) or as part of a [Data Center](https://confluence.atlassian.com/enterprise/bitbucket-data-center-668468332.html) cluster. +You can specify the following properties to start Bitbucket as a mirror or as a Data Center node: + +* `ELASTICSEARCH_ENABLED` (default: true) + + Set 'false' to prevent Elasticsearch from starting in the container. This should be used if Elasticsearch is running remotely, e.g. for if Bitbucket is running in a Data Center cluster + +* `APPLICATION_MODE` (default: default) + + The mode Bitbucket will run in. This can be set to 'mirror' to start Bitbucket as a Smart Mirror. This will also disable Elasticsearch even if `ELASTICSEARCH_ENABLED` has not been set to 'false'. + +* `HAZELCAST_NETWORK_MULTICAST` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via multicast. `HAZELCAST_NETWORK_TCPIP` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP` (default: false) + + Data Center: Set 'true' to enable Bitbucket to find new Data Center cluster members via TCPIP. This setting requires `HAZELCAST_NETWORK_TCPIP_MEMBERS` to be specified. `HAZELCAST_NETWORK_MULTICAST` should not be specified when using this setting. + +* `HAZELCAST_NETWORK_TCPIP_MEMBERS` + + Data Center: List of members that Hazelcast nodes should connect to when HAZELCAST_NETWORK_TCPIP is 'true' + +* `HAZELCAST_GROUP_NAME` + + Data Center: Specifies the cluster group the instance should join. + +* `HAZELCAST_GROUP_PASSWORD` + + Data Center: The password required to join the specified cluster group. + +To run Bitbucket as part of a Data Center cluster, create a Docker network and assign the Bitbucket container a static IP. + +Note: Docker networks may support multicast, however the below example shows configuration using TCPIP. + + $> docker network create --driver bridge --subnet=172.18.0.0/16 myBitbucketNetwork + $> 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 atlassian/bitbucket-server + +## JMX Monitoring (Bitbucket Server 5.0 + only) + +Bitbucket Server supports detailed JMX monitoring. To enable and configure JMX, use the environment variables below. For further information on JMX configuration, see [Enabling JMX counters for performance monitoring](https://confluence.atlassian.com/bitbucketserver/enabling-jmx-counters-for-performance-monitoring-776640189.html) + +* `JMX_ENABLED` (default: false) + + Enable Bitbucket to publish JMX data + +* `JMX_REMOTE_AUTH` (default: NONE) + + Set the authentication to use for remote JMX access. This value is required: anything other than "password" or "ssl" will cause remote JMX access to be disabled + +* `JMX_REMOTE_PORT` (default: 3333) + + The port used to negotiate a JMX connection. Note: this port is only used during the initial authorization, after which a different RMI port used for data transfer + +* `JMX_REMOTE_RMI_PORT` (default: ) + + The port used for all subsequent JMX-RMI data transfer. If desired, the RMI data port can be set to the same value as `JMX_REMOTE_PORT` to allow a single port to be used for both JMX authorization and data transfer + +* `RMI_SERVER_HOSTNAME` (default: NONE) + + The hostname or IP address that clients will use to connect to the application for JMX monitoring. This must be resolvable by both clients and from the JVM host machine. + +* `JMX_PASSWORD_FILE` (default: NONE) + + The full path to the JMX username/password file used to authenticate remote JMX clients. This is required when `JMX_REMOTE_AUTH` is set to "password" + + $> 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 atlassian/bitbucket-server + +# Upgrade + +To upgrade to a more recent version of Bitbucket Server you can simply stop the `bitbucket` +container and start a new one based on a more recent image: + + $> docker stop bitbucket + $> docker rm 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 +be available after the upgrade. + +_Note: Please make sure that you **don't** accidentally remove the `bitbucket` +container and its volumes using the `-v` option._ + +# Backup + +For evaluations you can use the built-in database that will store its files in the Bitbucket Server home directory. In that case it is sufficient to create a backup archive of the directory on the host that is used as a volume (`/data/bitbucket` in the example above). + +The [Bitbucket Server Backup Client](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) is currently not supported in the Docker setup. You can however use the [Bitbucket Server DIY Backup](https://confluence.atlassian.com/display/BitbucketServer/Using+Bitbucket+Server+DIY+Backup) approach in case you decided to use an external database. + +Read more about data recovery and backups: [https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups](https://confluence.atlassian.com/display/BitbucketServer/Data+recovery+and+backups) + +# Versioning + +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/linux/ecosystem/atlassian/bitbucket/8/8.7.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/docker-compose.yml new file mode 100644 index 000000000..c1df37b21 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/bitbucket:8.7.0" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.7.0-jdk11" + build: + context: . + dockerfile: ./Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -euo pipefail + +# Set recommended umask of "u=,g=w,o=rwx" (0027) +umask 0027 + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +#export PATH=$JAVA_HOME/bin:$PATH + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +: ${ELASTICSEARCH_ENABLED:=true} +: ${APPLICATION_MODE:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +ARGS="$@" + +# Start Bitbucket without Elasticsearch +if [ "${ELASTICSEARCH_ENABLED}" == "false" ] || [ "${APPLICATION_MODE}" == "mirror" ]; then + ARGS="--no-search ${ARGS}" +fi + +# Start Bitbucket as the correct user. +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${BITBUCKET_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + echo "Updating permissions for BITBUCKET_HOME" + mkdir -p "${BITBUCKET_HOME}/lib" && + chmod -R 700 "${BITBUCKET_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${BITBUCKET_HOME}" + fi + # Now drop privileges + 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 diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.0/Dockerfile b/linux/ecosystem/atlassian/confluence/7/7.19.0/Dockerfile new file mode 100644 index 000000000..5578451b7 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.0/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.0 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/7/7.19.0/Dockerfile.jdk11 new file mode 100644 index 000000000..fef988fcb --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.0/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.0 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.0/Makefile b/linux/ecosystem/atlassian/confluence/7/7.19.0/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.0/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.0/docker-compose.yml b/linux/ecosystem/atlassian/confluence/7/7.19.0/docker-compose.yml new file mode 100644 index 000000000..fb28f33b4 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.0/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:7.19.0" + build: + context: . + app-jdk11: + image: "epicmorg/confluence:7.19.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.0/entrypoint.sh b/linux/ecosystem/atlassian/confluence/7/7.19.0/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.0/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.1/Dockerfile b/linux/ecosystem/atlassian/confluence/7/7.19.1/Dockerfile new file mode 100644 index 000000000..831f8687e --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.1/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.1 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/7/7.19.1/Dockerfile.jdk11 new file mode 100644 index 000000000..a8ab599ca --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.1/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.1 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.1/Makefile b/linux/ecosystem/atlassian/confluence/7/7.19.1/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.1/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.1/docker-compose.yml b/linux/ecosystem/atlassian/confluence/7/7.19.1/docker-compose.yml new file mode 100644 index 000000000..2be28a129 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.1/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:7.19.1" + build: + context: . + app-jdk11: + image: "epicmorg/confluence:7.19.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.1/entrypoint.sh b/linux/ecosystem/atlassian/confluence/7/7.19.1/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.1/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.2/Dockerfile b/linux/ecosystem/atlassian/confluence/7/7.19.2/Dockerfile new file mode 100644 index 000000000..d1a580d49 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.2/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.2 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/7/7.19.2/Dockerfile.jdk11 new file mode 100644 index 000000000..4cea64d9e --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.2/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.2 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.2/Makefile b/linux/ecosystem/atlassian/confluence/7/7.19.2/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.2/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.2/docker-compose.yml b/linux/ecosystem/atlassian/confluence/7/7.19.2/docker-compose.yml new file mode 100644 index 000000000..7a9d09f83 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.2/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:7.19.2" + build: + context: . + app-jdk11: + image: "epicmorg/confluence:7.19.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.2/entrypoint.sh b/linux/ecosystem/atlassian/confluence/7/7.19.2/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.2/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.3/Dockerfile b/linux/ecosystem/atlassian/confluence/7/7.19.3/Dockerfile new file mode 100644 index 000000000..6a781643a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.3/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.3 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/7/7.19.3/Dockerfile.jdk11 new file mode 100644 index 000000000..d85e8965e --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.3/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.3 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.3/Makefile b/linux/ecosystem/atlassian/confluence/7/7.19.3/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.3/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.3/docker-compose.yml b/linux/ecosystem/atlassian/confluence/7/7.19.3/docker-compose.yml new file mode 100644 index 000000000..3b1ff79a0 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.3/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:7.19.3" + build: + context: . + app-jdk11: + image: "epicmorg/confluence:7.19.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.3/entrypoint.sh b/linux/ecosystem/atlassian/confluence/7/7.19.3/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.3/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.4/Dockerfile b/linux/ecosystem/atlassian/confluence/7/7.19.4/Dockerfile new file mode 100644 index 000000000..fff4f2585 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.4/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.4 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/7/7.19.4/Dockerfile.jdk11 new file mode 100644 index 000000000..d5d93e715 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.4/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.4 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.4/Makefile b/linux/ecosystem/atlassian/confluence/7/7.19.4/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.4/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.4/docker-compose.yml b/linux/ecosystem/atlassian/confluence/7/7.19.4/docker-compose.yml new file mode 100644 index 000000000..3a914ba6d --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.4/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:7.19.4" + build: + context: . + app-jdk11: + image: "epicmorg/confluence:7.19.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/confluence/7/7.19.4/entrypoint.sh b/linux/ecosystem/atlassian/confluence/7/7.19.4/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.19.4/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.0/Dockerfile b/linux/ecosystem/atlassian/confluence/7/7.20.0/Dockerfile new file mode 100644 index 000000000..456fb5305 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.0/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.20.0 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/7/7.20.0/Dockerfile.jdk11 new file mode 100644 index 000000000..429736f49 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.0/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.20.0 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.0/Makefile b/linux/ecosystem/atlassian/confluence/7/7.20.0/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.0/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.0/docker-compose.yml b/linux/ecosystem/atlassian/confluence/7/7.20.0/docker-compose.yml new file mode 100644 index 000000000..f7058b151 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.0/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:7.20.0" + build: + context: . + app-jdk11: + image: "epicmorg/confluence:7.20.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.0/entrypoint.sh b/linux/ecosystem/atlassian/confluence/7/7.20.0/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.0/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.1/Dockerfile b/linux/ecosystem/atlassian/confluence/7/7.20.1/Dockerfile new file mode 100644 index 000000000..b8ecd4eb2 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.1/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.20.1 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/7/7.20.1/Dockerfile.jdk11 new file mode 100644 index 000000000..328841c95 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.1/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.20.1 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.1/Makefile b/linux/ecosystem/atlassian/confluence/7/7.20.1/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.1/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.1/docker-compose.yml b/linux/ecosystem/atlassian/confluence/7/7.20.1/docker-compose.yml new file mode 100644 index 000000000..d7abb3ebb --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.1/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:7.20.1" + build: + context: . + app-jdk11: + image: "epicmorg/confluence:7.20.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.1/entrypoint.sh b/linux/ecosystem/atlassian/confluence/7/7.20.1/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.1/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.2/Dockerfile b/linux/ecosystem/atlassian/confluence/7/7.20.2/Dockerfile new file mode 100644 index 000000000..45155e90e --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.2/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.20.2 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/7/7.20.2/Dockerfile.jdk11 new file mode 100644 index 000000000..d57f79ff5 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.2/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.20.2 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.2/Makefile b/linux/ecosystem/atlassian/confluence/7/7.20.2/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.2/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.2/docker-compose.yml b/linux/ecosystem/atlassian/confluence/7/7.20.2/docker-compose.yml new file mode 100644 index 000000000..20c789170 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.2/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:7.20.2" + build: + context: . + app-jdk11: + image: "epicmorg/confluence:7.20.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.2/entrypoint.sh b/linux/ecosystem/atlassian/confluence/7/7.20.2/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.2/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.3/Dockerfile b/linux/ecosystem/atlassian/confluence/7/7.20.3/Dockerfile new file mode 100644 index 000000000..483be57bf --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.3/Dockerfile @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.20.3 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/7/7.20.3/Dockerfile.jdk11 new file mode 100644 index 000000000..a7d3a49ef --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.3/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.20.3 +ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.3/Makefile b/linux/ecosystem/atlassian/confluence/7/7.20.3/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.3/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.3/docker-compose.yml b/linux/ecosystem/atlassian/confluence/7/7.20.3/docker-compose.yml new file mode 100644 index 000000000..1cb311828 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.3/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:7.20.3" + build: + context: . + app-jdk11: + image: "epicmorg/confluence:7.20.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/confluence/7/7.20.3/entrypoint.sh b/linux/ecosystem/atlassian/confluence/7/7.20.3/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/7/7.20.3/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.0/.env b/linux/ecosystem/atlassian/confluence/8/8.0.0/.env new file mode 100644 index 000000000..804af17fe --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.0/.env @@ -0,0 +1,3 @@ + +RELEASE=8.0.0 +DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-8.0.0.tar.gz diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.0/Dockerfile b/linux/ecosystem/atlassian/confluence/8/8.0.0/Dockerfile new file mode 100644 index 000000000..1740f38c7 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE +ARG DOWNLOAD_URL + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/8/8.0.0/Dockerfile.jdk11 new file mode 100644 index 000000000..1a2cd4210 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.0/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE +ARG DOWNLOAD_URL + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/confluence/8/8.0.0/Dockerfile.jdk17 new file mode 100644 index 000000000..f362b2321 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.0/Dockerfile.jdk17 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk17 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE +ARG DOWNLOAD_URL + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.0/Makefile b/linux/ecosystem/atlassian/confluence/8/8.0.0/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.0/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.0/docker-compose.yml b/linux/ecosystem/atlassian/confluence/8/8.0.0/docker-compose.yml new file mode 100644 index 000000000..732168c9a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.0/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/confluence:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk17: + image: "epicmorg/confluence:${RELEASE}-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.0/entrypoint.sh b/linux/ecosystem/atlassian/confluence/8/8.0.0/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.0/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.1/.env b/linux/ecosystem/atlassian/confluence/8/8.0.1/.env new file mode 100644 index 000000000..338cafa42 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.1/.env @@ -0,0 +1,3 @@ + +RELEASE=8.0.1 +DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-8.0.1.tar.gz diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.1/Dockerfile b/linux/ecosystem/atlassian/confluence/8/8.0.1/Dockerfile new file mode 100644 index 000000000..1740f38c7 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE +ARG DOWNLOAD_URL + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/8/8.0.1/Dockerfile.jdk11 new file mode 100644 index 000000000..1a2cd4210 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.1/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE +ARG DOWNLOAD_URL + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/confluence/8/8.0.1/Dockerfile.jdk17 new file mode 100644 index 000000000..f362b2321 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.1/Dockerfile.jdk17 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk17 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE +ARG DOWNLOAD_URL + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.1/Makefile b/linux/ecosystem/atlassian/confluence/8/8.0.1/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.1/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.1/docker-compose.yml b/linux/ecosystem/atlassian/confluence/8/8.0.1/docker-compose.yml new file mode 100644 index 000000000..732168c9a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.1/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/confluence:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk17: + image: "epicmorg/confluence:${RELEASE}-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.1/entrypoint.sh b/linux/ecosystem/atlassian/confluence/8/8.0.1/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.1/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.2/.env b/linux/ecosystem/atlassian/confluence/8/8.0.2/.env new file mode 100644 index 000000000..168a590ac --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.2/.env @@ -0,0 +1,3 @@ + +RELEASE=8.0.2 +DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-8.0.2.tar.gz diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.2/Dockerfile b/linux/ecosystem/atlassian/confluence/8/8.0.2/Dockerfile new file mode 100644 index 000000000..1740f38c7 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE +ARG DOWNLOAD_URL + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/confluence/8/8.0.2/Dockerfile.jdk11 new file mode 100644 index 000000000..1a2cd4210 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.2/Dockerfile.jdk11 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE +ARG DOWNLOAD_URL + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.2/Dockerfile.jdk17 b/linux/ecosystem/atlassian/confluence/8/8.0.2/Dockerfile.jdk17 new file mode 100644 index 000000000..f362b2321 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.2/Dockerfile.jdk17 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk17 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG RELEASE +ARG DOWNLOAD_URL + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.2/Makefile b/linux/ecosystem/atlassian/confluence/8/8.0.2/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.2/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.2/docker-compose.yml b/linux/ecosystem/atlassian/confluence/8/8.0.2/docker-compose.yml new file mode 100644 index 000000000..732168c9a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.2/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.9' +services: + app: + image: "epicmorg/confluence:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/confluence:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk17: + image: "epicmorg/confluence:${RELEASE}-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/confluence/8/8.0.2/entrypoint.sh b/linux/ecosystem/atlassian/confluence/8/8.0.2/entrypoint.sh new file mode 100755 index 000000000..250fc031a --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/8/8.0.2/entrypoint.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export CATALINA_OPTS + + +# Start Confluence as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${CONFLUENCE_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${CONFLUENCE_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${CONFLUENCE_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh $@" +else + exec "$CONFLUENCE_INSTALL_DIR/bin/start-confluence.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/confluence/latest/Dockerfile.jdk17 b/linux/ecosystem/atlassian/confluence/latest/Dockerfile.jdk17 new file mode 100644 index 000000000..3ab236121 --- /dev/null +++ b/linux/ecosystem/atlassian/confluence/latest/Dockerfile.jdk17 @@ -0,0 +1,46 @@ +FROM epicmorg/debian:bullseye-jdk17 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## +ARG CONFLUENCE_VERSION=7.19.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/doc/confluence-home-and-other-important-directories-590259707.html +ENV CONFLUENCE_HOME /var/atlassian/application-data/confluence +ENV CONFLUENCE_INSTALL_DIR /opt/atlassian/confluence + +VOLUME ["${CONFLUENCE_HOME}"] +WORKDIR $CONFLUENCE_HOME + +# Expose HTTP and Synchrony ports +EXPOSE 8090 +EXPOSE 8091 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ + && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml && \ + + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/confluence/latest/docker-compose.yml b/linux/ecosystem/atlassian/confluence/latest/docker-compose.yml index 191f5b119..66c8366b8 100644 --- a/linux/ecosystem/atlassian/confluence/latest/docker-compose.yml +++ b/linux/ecosystem/atlassian/confluence/latest/docker-compose.yml @@ -4,3 +4,13 @@ services: image: "epicmorg/confluence:latest" build: context: . + app-jdk11: + image: "epicmorg/confluence:latest-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/confluence:latest-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/jira/9/9.2.1/.env b/linux/ecosystem/atlassian/jira/9/9.2.1/.env new file mode 100644 index 000000000..db859927f --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.2.1/.env @@ -0,0 +1,3 @@ + +RELEASE=9.2.1 +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.2.1.tar.gz diff --git a/linux/ecosystem/atlassian/jira/9/9.2.1/Dockerfile b/linux/ecosystem/atlassian/jira/9/9.2.1/Dockerfile new file mode 100644 index 000000000..0bb89734c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.2.1/Dockerfile @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.2.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/9/9.2.1/Dockerfile.jdk11 new file mode 100644 index 000000000..8719b8c56 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.2.1/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.2.1/Makefile b/linux/ecosystem/atlassian/jira/9/9.2.1/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.2.1/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/jira/9/9.2.1/docker-compose.yml b/linux/ecosystem/atlassian/jira/9/9.2.1/docker-compose.yml new file mode 100644 index 000000000..81592d775 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.2.1/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.9' +services: + app: + image: "epicmorg/jira:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/jira:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/9/9.2.1/entrypoint.sh b/linux/ecosystem/atlassian/jira/9/9.2.1/entrypoint.sh new file mode 100755 index 000000000..50ee4ecd1 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.2.1/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +# Setup Data Center configuration +if [ ! -f "/etc/container_id" ]; then + uuidgen > /etc/container_id +fi +CONTAINER_ID=$(cat /etc/container_id) +CONTAINER_SHORT_ID=${CONTAINER_ID::8} + +: ${CLUSTERED:=false} +: ${JIRA_NODE_ID:=jira_node_${CONTAINER_SHORT_ID}} +: ${JIRA_SHARED_HOME:=${JIRA_HOME}/shared} +: ${EHCACHE_PEER_DISCOVERY:=} +: ${EHCACHE_LISTENER_HOSTNAME:=} +: ${EHCACHE_LISTENER_PORT:=} +: ${EHCACHE_LISTENER_SOCKETTIMEOUTMILLIS:=} +: ${EHCACHE_MULTICAST_ADDRESS:=} +: ${EHCACHE_MULTICAST_PORT:=} +: ${EHCACHE_MULTICAST_TIMETOLIVE:=} +: ${EHCACHE_MULTICAST_HOSTNAME:=} + +# Cleanly set/unset values in cluster.properties +function set_cluster_property { + if [ -z $2 ]; then + if [ -f "${JIRA_HOME}/cluster.properties" ]; then + sed -i -e "/^${1}/d" "${JIRA_HOME}/cluster.properties" + fi + return + fi + if [ ! -f "${JIRA_HOME}/cluster.properties" ]; then + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + elif grep "^${1}" "${JIRA_HOME}/cluster.properties"; then + sed -i -e "s#^${1}=.*#${1}=${2}#g" "${JIRA_HOME}/cluster.properties" + else + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + fi +} + +if [ "${CLUSTERED}" == "true" ]; then + set_cluster_property "jira.node.id" "${JIRA_NODE_ID}" + set_cluster_property "jira.shared.home" "${JIRA_SHARED_HOME}" + set_cluster_property "ehcache.peer.discovery" "${EHCACHE_PEER_DISCOVERY}" + set_cluster_property "ehcache.listener.hostName" "${EHCACHE_LISTENER_HOSTNAME}" + set_cluster_property "ehcache.listener.port" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.listener.socketTimeoutMillis" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.multicast.address" "${EHCACHE_MULTICAST_ADDRESS}" + set_cluster_property "ehcache.multicast.port" "${EHCACHE_MULTICAST_PORT}" + set_cluster_property "ehcache.multicast.timeToLive" "${EHCACHE_MULTICAST_TIMETOLIVE}" + set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" +fi + + +# Start Jira as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${JIRA_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${JIRA_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" +else + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/jira/9/9.3.0/.env b/linux/ecosystem/atlassian/jira/9/9.3.0/.env new file mode 100644 index 000000000..fd38c2041 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.0/.env @@ -0,0 +1,3 @@ + +RELEASE=9.3.0 +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.3.0.tar.gz diff --git a/linux/ecosystem/atlassian/jira/9/9.3.0/Dockerfile b/linux/ecosystem/atlassian/jira/9/9.3.0/Dockerfile new file mode 100644 index 000000000..0bb89734c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.0/Dockerfile @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.3.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/9/9.3.0/Dockerfile.jdk11 new file mode 100644 index 000000000..8719b8c56 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.0/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.3.0/Makefile b/linux/ecosystem/atlassian/jira/9/9.3.0/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.0/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/jira/9/9.3.0/docker-compose.yml b/linux/ecosystem/atlassian/jira/9/9.3.0/docker-compose.yml new file mode 100644 index 000000000..81592d775 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.0/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.9' +services: + app: + image: "epicmorg/jira:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/jira:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/9/9.3.0/entrypoint.sh b/linux/ecosystem/atlassian/jira/9/9.3.0/entrypoint.sh new file mode 100755 index 000000000..50ee4ecd1 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.0/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +# Setup Data Center configuration +if [ ! -f "/etc/container_id" ]; then + uuidgen > /etc/container_id +fi +CONTAINER_ID=$(cat /etc/container_id) +CONTAINER_SHORT_ID=${CONTAINER_ID::8} + +: ${CLUSTERED:=false} +: ${JIRA_NODE_ID:=jira_node_${CONTAINER_SHORT_ID}} +: ${JIRA_SHARED_HOME:=${JIRA_HOME}/shared} +: ${EHCACHE_PEER_DISCOVERY:=} +: ${EHCACHE_LISTENER_HOSTNAME:=} +: ${EHCACHE_LISTENER_PORT:=} +: ${EHCACHE_LISTENER_SOCKETTIMEOUTMILLIS:=} +: ${EHCACHE_MULTICAST_ADDRESS:=} +: ${EHCACHE_MULTICAST_PORT:=} +: ${EHCACHE_MULTICAST_TIMETOLIVE:=} +: ${EHCACHE_MULTICAST_HOSTNAME:=} + +# Cleanly set/unset values in cluster.properties +function set_cluster_property { + if [ -z $2 ]; then + if [ -f "${JIRA_HOME}/cluster.properties" ]; then + sed -i -e "/^${1}/d" "${JIRA_HOME}/cluster.properties" + fi + return + fi + if [ ! -f "${JIRA_HOME}/cluster.properties" ]; then + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + elif grep "^${1}" "${JIRA_HOME}/cluster.properties"; then + sed -i -e "s#^${1}=.*#${1}=${2}#g" "${JIRA_HOME}/cluster.properties" + else + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + fi +} + +if [ "${CLUSTERED}" == "true" ]; then + set_cluster_property "jira.node.id" "${JIRA_NODE_ID}" + set_cluster_property "jira.shared.home" "${JIRA_SHARED_HOME}" + set_cluster_property "ehcache.peer.discovery" "${EHCACHE_PEER_DISCOVERY}" + set_cluster_property "ehcache.listener.hostName" "${EHCACHE_LISTENER_HOSTNAME}" + set_cluster_property "ehcache.listener.port" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.listener.socketTimeoutMillis" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.multicast.address" "${EHCACHE_MULTICAST_ADDRESS}" + set_cluster_property "ehcache.multicast.port" "${EHCACHE_MULTICAST_PORT}" + set_cluster_property "ehcache.multicast.timeToLive" "${EHCACHE_MULTICAST_TIMETOLIVE}" + set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" +fi + + +# Start Jira as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${JIRA_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${JIRA_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" +else + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/jira/9/9.3.1/.env b/linux/ecosystem/atlassian/jira/9/9.3.1/.env new file mode 100644 index 000000000..d216aa7c9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.1/.env @@ -0,0 +1,3 @@ + +RELEASE=9.3.1 +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.3.1.tar.gz diff --git a/linux/ecosystem/atlassian/jira/9/9.3.1/Dockerfile b/linux/ecosystem/atlassian/jira/9/9.3.1/Dockerfile new file mode 100644 index 000000000..0bb89734c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.1/Dockerfile @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.3.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/9/9.3.1/Dockerfile.jdk11 new file mode 100644 index 000000000..8719b8c56 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.1/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.3.1/Makefile b/linux/ecosystem/atlassian/jira/9/9.3.1/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.1/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/jira/9/9.3.1/docker-compose.yml b/linux/ecosystem/atlassian/jira/9/9.3.1/docker-compose.yml new file mode 100644 index 000000000..81592d775 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.1/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.9' +services: + app: + image: "epicmorg/jira:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/jira:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/9/9.3.1/entrypoint.sh b/linux/ecosystem/atlassian/jira/9/9.3.1/entrypoint.sh new file mode 100755 index 000000000..50ee4ecd1 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.1/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +# Setup Data Center configuration +if [ ! -f "/etc/container_id" ]; then + uuidgen > /etc/container_id +fi +CONTAINER_ID=$(cat /etc/container_id) +CONTAINER_SHORT_ID=${CONTAINER_ID::8} + +: ${CLUSTERED:=false} +: ${JIRA_NODE_ID:=jira_node_${CONTAINER_SHORT_ID}} +: ${JIRA_SHARED_HOME:=${JIRA_HOME}/shared} +: ${EHCACHE_PEER_DISCOVERY:=} +: ${EHCACHE_LISTENER_HOSTNAME:=} +: ${EHCACHE_LISTENER_PORT:=} +: ${EHCACHE_LISTENER_SOCKETTIMEOUTMILLIS:=} +: ${EHCACHE_MULTICAST_ADDRESS:=} +: ${EHCACHE_MULTICAST_PORT:=} +: ${EHCACHE_MULTICAST_TIMETOLIVE:=} +: ${EHCACHE_MULTICAST_HOSTNAME:=} + +# Cleanly set/unset values in cluster.properties +function set_cluster_property { + if [ -z $2 ]; then + if [ -f "${JIRA_HOME}/cluster.properties" ]; then + sed -i -e "/^${1}/d" "${JIRA_HOME}/cluster.properties" + fi + return + fi + if [ ! -f "${JIRA_HOME}/cluster.properties" ]; then + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + elif grep "^${1}" "${JIRA_HOME}/cluster.properties"; then + sed -i -e "s#^${1}=.*#${1}=${2}#g" "${JIRA_HOME}/cluster.properties" + else + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + fi +} + +if [ "${CLUSTERED}" == "true" ]; then + set_cluster_property "jira.node.id" "${JIRA_NODE_ID}" + set_cluster_property "jira.shared.home" "${JIRA_SHARED_HOME}" + set_cluster_property "ehcache.peer.discovery" "${EHCACHE_PEER_DISCOVERY}" + set_cluster_property "ehcache.listener.hostName" "${EHCACHE_LISTENER_HOSTNAME}" + set_cluster_property "ehcache.listener.port" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.listener.socketTimeoutMillis" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.multicast.address" "${EHCACHE_MULTICAST_ADDRESS}" + set_cluster_property "ehcache.multicast.port" "${EHCACHE_MULTICAST_PORT}" + set_cluster_property "ehcache.multicast.timeToLive" "${EHCACHE_MULTICAST_TIMETOLIVE}" + set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" +fi + + +# Start Jira as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${JIRA_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${JIRA_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" +else + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/jira/9/9.3.2/.env b/linux/ecosystem/atlassian/jira/9/9.3.2/.env new file mode 100644 index 000000000..b52aee2fb --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.2/.env @@ -0,0 +1,3 @@ + +RELEASE=9.3.2 +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.3.2.tar.gz diff --git a/linux/ecosystem/atlassian/jira/9/9.3.2/Dockerfile b/linux/ecosystem/atlassian/jira/9/9.3.2/Dockerfile new file mode 100644 index 000000000..0bb89734c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.2/Dockerfile @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.3.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/9/9.3.2/Dockerfile.jdk11 new file mode 100644 index 000000000..8719b8c56 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.2/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.3.2/Makefile b/linux/ecosystem/atlassian/jira/9/9.3.2/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.2/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/jira/9/9.3.2/docker-compose.yml b/linux/ecosystem/atlassian/jira/9/9.3.2/docker-compose.yml new file mode 100644 index 000000000..81592d775 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.2/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.9' +services: + app: + image: "epicmorg/jira:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/jira:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/9/9.3.2/entrypoint.sh b/linux/ecosystem/atlassian/jira/9/9.3.2/entrypoint.sh new file mode 100755 index 000000000..50ee4ecd1 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.2/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +# Setup Data Center configuration +if [ ! -f "/etc/container_id" ]; then + uuidgen > /etc/container_id +fi +CONTAINER_ID=$(cat /etc/container_id) +CONTAINER_SHORT_ID=${CONTAINER_ID::8} + +: ${CLUSTERED:=false} +: ${JIRA_NODE_ID:=jira_node_${CONTAINER_SHORT_ID}} +: ${JIRA_SHARED_HOME:=${JIRA_HOME}/shared} +: ${EHCACHE_PEER_DISCOVERY:=} +: ${EHCACHE_LISTENER_HOSTNAME:=} +: ${EHCACHE_LISTENER_PORT:=} +: ${EHCACHE_LISTENER_SOCKETTIMEOUTMILLIS:=} +: ${EHCACHE_MULTICAST_ADDRESS:=} +: ${EHCACHE_MULTICAST_PORT:=} +: ${EHCACHE_MULTICAST_TIMETOLIVE:=} +: ${EHCACHE_MULTICAST_HOSTNAME:=} + +# Cleanly set/unset values in cluster.properties +function set_cluster_property { + if [ -z $2 ]; then + if [ -f "${JIRA_HOME}/cluster.properties" ]; then + sed -i -e "/^${1}/d" "${JIRA_HOME}/cluster.properties" + fi + return + fi + if [ ! -f "${JIRA_HOME}/cluster.properties" ]; then + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + elif grep "^${1}" "${JIRA_HOME}/cluster.properties"; then + sed -i -e "s#^${1}=.*#${1}=${2}#g" "${JIRA_HOME}/cluster.properties" + else + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + fi +} + +if [ "${CLUSTERED}" == "true" ]; then + set_cluster_property "jira.node.id" "${JIRA_NODE_ID}" + set_cluster_property "jira.shared.home" "${JIRA_SHARED_HOME}" + set_cluster_property "ehcache.peer.discovery" "${EHCACHE_PEER_DISCOVERY}" + set_cluster_property "ehcache.listener.hostName" "${EHCACHE_LISTENER_HOSTNAME}" + set_cluster_property "ehcache.listener.port" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.listener.socketTimeoutMillis" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.multicast.address" "${EHCACHE_MULTICAST_ADDRESS}" + set_cluster_property "ehcache.multicast.port" "${EHCACHE_MULTICAST_PORT}" + set_cluster_property "ehcache.multicast.timeToLive" "${EHCACHE_MULTICAST_TIMETOLIVE}" + set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" +fi + + +# Start Jira as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${JIRA_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${JIRA_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" +else + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/jira/9/9.3.3/.env b/linux/ecosystem/atlassian/jira/9/9.3.3/.env new file mode 100644 index 000000000..8336df44a --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.3/.env @@ -0,0 +1,3 @@ + +RELEASE=9.3.3 +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.3.3.tar.gz diff --git a/linux/ecosystem/atlassian/jira/9/9.3.3/Dockerfile b/linux/ecosystem/atlassian/jira/9/9.3.3/Dockerfile new file mode 100644 index 000000000..0bb89734c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.3/Dockerfile @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.3.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/9/9.3.3/Dockerfile.jdk11 new file mode 100644 index 000000000..8719b8c56 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.3/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.3.3/Makefile b/linux/ecosystem/atlassian/jira/9/9.3.3/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.3/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/jira/9/9.3.3/docker-compose.yml b/linux/ecosystem/atlassian/jira/9/9.3.3/docker-compose.yml new file mode 100644 index 000000000..81592d775 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.3/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.9' +services: + app: + image: "epicmorg/jira:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/jira:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/9/9.3.3/entrypoint.sh b/linux/ecosystem/atlassian/jira/9/9.3.3/entrypoint.sh new file mode 100755 index 000000000..50ee4ecd1 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.3.3/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +# Setup Data Center configuration +if [ ! -f "/etc/container_id" ]; then + uuidgen > /etc/container_id +fi +CONTAINER_ID=$(cat /etc/container_id) +CONTAINER_SHORT_ID=${CONTAINER_ID::8} + +: ${CLUSTERED:=false} +: ${JIRA_NODE_ID:=jira_node_${CONTAINER_SHORT_ID}} +: ${JIRA_SHARED_HOME:=${JIRA_HOME}/shared} +: ${EHCACHE_PEER_DISCOVERY:=} +: ${EHCACHE_LISTENER_HOSTNAME:=} +: ${EHCACHE_LISTENER_PORT:=} +: ${EHCACHE_LISTENER_SOCKETTIMEOUTMILLIS:=} +: ${EHCACHE_MULTICAST_ADDRESS:=} +: ${EHCACHE_MULTICAST_PORT:=} +: ${EHCACHE_MULTICAST_TIMETOLIVE:=} +: ${EHCACHE_MULTICAST_HOSTNAME:=} + +# Cleanly set/unset values in cluster.properties +function set_cluster_property { + if [ -z $2 ]; then + if [ -f "${JIRA_HOME}/cluster.properties" ]; then + sed -i -e "/^${1}/d" "${JIRA_HOME}/cluster.properties" + fi + return + fi + if [ ! -f "${JIRA_HOME}/cluster.properties" ]; then + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + elif grep "^${1}" "${JIRA_HOME}/cluster.properties"; then + sed -i -e "s#^${1}=.*#${1}=${2}#g" "${JIRA_HOME}/cluster.properties" + else + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + fi +} + +if [ "${CLUSTERED}" == "true" ]; then + set_cluster_property "jira.node.id" "${JIRA_NODE_ID}" + set_cluster_property "jira.shared.home" "${JIRA_SHARED_HOME}" + set_cluster_property "ehcache.peer.discovery" "${EHCACHE_PEER_DISCOVERY}" + set_cluster_property "ehcache.listener.hostName" "${EHCACHE_LISTENER_HOSTNAME}" + set_cluster_property "ehcache.listener.port" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.listener.socketTimeoutMillis" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.multicast.address" "${EHCACHE_MULTICAST_ADDRESS}" + set_cluster_property "ehcache.multicast.port" "${EHCACHE_MULTICAST_PORT}" + set_cluster_property "ehcache.multicast.timeToLive" "${EHCACHE_MULTICAST_TIMETOLIVE}" + set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" +fi + + +# Start Jira as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${JIRA_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${JIRA_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" +else + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/jira/9/9.4.0/.env b/linux/ecosystem/atlassian/jira/9/9.4.0/.env new file mode 100644 index 000000000..0b74c8762 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.0/.env @@ -0,0 +1,3 @@ + +RELEASE=9.4.0 +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.4.0.tar.gz diff --git a/linux/ecosystem/atlassian/jira/9/9.4.0/Dockerfile b/linux/ecosystem/atlassian/jira/9/9.4.0/Dockerfile new file mode 100644 index 000000000..0bb89734c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.0/Dockerfile @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.4.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/9/9.4.0/Dockerfile.jdk11 new file mode 100644 index 000000000..8719b8c56 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.0/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.4.0/Makefile b/linux/ecosystem/atlassian/jira/9/9.4.0/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.0/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/jira/9/9.4.0/docker-compose.yml b/linux/ecosystem/atlassian/jira/9/9.4.0/docker-compose.yml new file mode 100644 index 000000000..81592d775 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.0/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.9' +services: + app: + image: "epicmorg/jira:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/jira:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/9/9.4.0/entrypoint.sh b/linux/ecosystem/atlassian/jira/9/9.4.0/entrypoint.sh new file mode 100755 index 000000000..50ee4ecd1 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.0/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +# Setup Data Center configuration +if [ ! -f "/etc/container_id" ]; then + uuidgen > /etc/container_id +fi +CONTAINER_ID=$(cat /etc/container_id) +CONTAINER_SHORT_ID=${CONTAINER_ID::8} + +: ${CLUSTERED:=false} +: ${JIRA_NODE_ID:=jira_node_${CONTAINER_SHORT_ID}} +: ${JIRA_SHARED_HOME:=${JIRA_HOME}/shared} +: ${EHCACHE_PEER_DISCOVERY:=} +: ${EHCACHE_LISTENER_HOSTNAME:=} +: ${EHCACHE_LISTENER_PORT:=} +: ${EHCACHE_LISTENER_SOCKETTIMEOUTMILLIS:=} +: ${EHCACHE_MULTICAST_ADDRESS:=} +: ${EHCACHE_MULTICAST_PORT:=} +: ${EHCACHE_MULTICAST_TIMETOLIVE:=} +: ${EHCACHE_MULTICAST_HOSTNAME:=} + +# Cleanly set/unset values in cluster.properties +function set_cluster_property { + if [ -z $2 ]; then + if [ -f "${JIRA_HOME}/cluster.properties" ]; then + sed -i -e "/^${1}/d" "${JIRA_HOME}/cluster.properties" + fi + return + fi + if [ ! -f "${JIRA_HOME}/cluster.properties" ]; then + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + elif grep "^${1}" "${JIRA_HOME}/cluster.properties"; then + sed -i -e "s#^${1}=.*#${1}=${2}#g" "${JIRA_HOME}/cluster.properties" + else + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + fi +} + +if [ "${CLUSTERED}" == "true" ]; then + set_cluster_property "jira.node.id" "${JIRA_NODE_ID}" + set_cluster_property "jira.shared.home" "${JIRA_SHARED_HOME}" + set_cluster_property "ehcache.peer.discovery" "${EHCACHE_PEER_DISCOVERY}" + set_cluster_property "ehcache.listener.hostName" "${EHCACHE_LISTENER_HOSTNAME}" + set_cluster_property "ehcache.listener.port" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.listener.socketTimeoutMillis" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.multicast.address" "${EHCACHE_MULTICAST_ADDRESS}" + set_cluster_property "ehcache.multicast.port" "${EHCACHE_MULTICAST_PORT}" + set_cluster_property "ehcache.multicast.timeToLive" "${EHCACHE_MULTICAST_TIMETOLIVE}" + set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" +fi + + +# Start Jira as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${JIRA_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${JIRA_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" +else + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/jira/9/9.4.1/.env b/linux/ecosystem/atlassian/jira/9/9.4.1/.env new file mode 100644 index 000000000..11ad2480c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.1/.env @@ -0,0 +1,3 @@ + +RELEASE=9.4.1 +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.4.1.tar.gz diff --git a/linux/ecosystem/atlassian/jira/9/9.4.1/Dockerfile b/linux/ecosystem/atlassian/jira/9/9.4.1/Dockerfile new file mode 100644 index 000000000..0bb89734c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.1/Dockerfile @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.4.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/9/9.4.1/Dockerfile.jdk11 new file mode 100644 index 000000000..8719b8c56 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.1/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.4.1/Makefile b/linux/ecosystem/atlassian/jira/9/9.4.1/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.1/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/jira/9/9.4.1/docker-compose.yml b/linux/ecosystem/atlassian/jira/9/9.4.1/docker-compose.yml new file mode 100644 index 000000000..81592d775 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.1/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.9' +services: + app: + image: "epicmorg/jira:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/jira:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/9/9.4.1/entrypoint.sh b/linux/ecosystem/atlassian/jira/9/9.4.1/entrypoint.sh new file mode 100755 index 000000000..50ee4ecd1 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.1/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +# Setup Data Center configuration +if [ ! -f "/etc/container_id" ]; then + uuidgen > /etc/container_id +fi +CONTAINER_ID=$(cat /etc/container_id) +CONTAINER_SHORT_ID=${CONTAINER_ID::8} + +: ${CLUSTERED:=false} +: ${JIRA_NODE_ID:=jira_node_${CONTAINER_SHORT_ID}} +: ${JIRA_SHARED_HOME:=${JIRA_HOME}/shared} +: ${EHCACHE_PEER_DISCOVERY:=} +: ${EHCACHE_LISTENER_HOSTNAME:=} +: ${EHCACHE_LISTENER_PORT:=} +: ${EHCACHE_LISTENER_SOCKETTIMEOUTMILLIS:=} +: ${EHCACHE_MULTICAST_ADDRESS:=} +: ${EHCACHE_MULTICAST_PORT:=} +: ${EHCACHE_MULTICAST_TIMETOLIVE:=} +: ${EHCACHE_MULTICAST_HOSTNAME:=} + +# Cleanly set/unset values in cluster.properties +function set_cluster_property { + if [ -z $2 ]; then + if [ -f "${JIRA_HOME}/cluster.properties" ]; then + sed -i -e "/^${1}/d" "${JIRA_HOME}/cluster.properties" + fi + return + fi + if [ ! -f "${JIRA_HOME}/cluster.properties" ]; then + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + elif grep "^${1}" "${JIRA_HOME}/cluster.properties"; then + sed -i -e "s#^${1}=.*#${1}=${2}#g" "${JIRA_HOME}/cluster.properties" + else + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + fi +} + +if [ "${CLUSTERED}" == "true" ]; then + set_cluster_property "jira.node.id" "${JIRA_NODE_ID}" + set_cluster_property "jira.shared.home" "${JIRA_SHARED_HOME}" + set_cluster_property "ehcache.peer.discovery" "${EHCACHE_PEER_DISCOVERY}" + set_cluster_property "ehcache.listener.hostName" "${EHCACHE_LISTENER_HOSTNAME}" + set_cluster_property "ehcache.listener.port" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.listener.socketTimeoutMillis" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.multicast.address" "${EHCACHE_MULTICAST_ADDRESS}" + set_cluster_property "ehcache.multicast.port" "${EHCACHE_MULTICAST_PORT}" + set_cluster_property "ehcache.multicast.timeToLive" "${EHCACHE_MULTICAST_TIMETOLIVE}" + set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" +fi + + +# Start Jira as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${JIRA_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${JIRA_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" +else + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/jira/9/9.4.2/.env b/linux/ecosystem/atlassian/jira/9/9.4.2/.env new file mode 100644 index 000000000..6decdc5c9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.2/.env @@ -0,0 +1,3 @@ + +RELEASE=9.4.2 +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.4.2.tar.gz diff --git a/linux/ecosystem/atlassian/jira/9/9.4.2/Dockerfile b/linux/ecosystem/atlassian/jira/9/9.4.2/Dockerfile new file mode 100644 index 000000000..0bb89734c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.2/Dockerfile @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.4.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/9/9.4.2/Dockerfile.jdk11 new file mode 100644 index 000000000..8719b8c56 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.2/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.4.2/Makefile b/linux/ecosystem/atlassian/jira/9/9.4.2/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.2/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/jira/9/9.4.2/docker-compose.yml b/linux/ecosystem/atlassian/jira/9/9.4.2/docker-compose.yml new file mode 100644 index 000000000..81592d775 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.2/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.9' +services: + app: + image: "epicmorg/jira:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/jira:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/9/9.4.2/entrypoint.sh b/linux/ecosystem/atlassian/jira/9/9.4.2/entrypoint.sh new file mode 100755 index 000000000..50ee4ecd1 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.4.2/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +# Setup Data Center configuration +if [ ! -f "/etc/container_id" ]; then + uuidgen > /etc/container_id +fi +CONTAINER_ID=$(cat /etc/container_id) +CONTAINER_SHORT_ID=${CONTAINER_ID::8} + +: ${CLUSTERED:=false} +: ${JIRA_NODE_ID:=jira_node_${CONTAINER_SHORT_ID}} +: ${JIRA_SHARED_HOME:=${JIRA_HOME}/shared} +: ${EHCACHE_PEER_DISCOVERY:=} +: ${EHCACHE_LISTENER_HOSTNAME:=} +: ${EHCACHE_LISTENER_PORT:=} +: ${EHCACHE_LISTENER_SOCKETTIMEOUTMILLIS:=} +: ${EHCACHE_MULTICAST_ADDRESS:=} +: ${EHCACHE_MULTICAST_PORT:=} +: ${EHCACHE_MULTICAST_TIMETOLIVE:=} +: ${EHCACHE_MULTICAST_HOSTNAME:=} + +# Cleanly set/unset values in cluster.properties +function set_cluster_property { + if [ -z $2 ]; then + if [ -f "${JIRA_HOME}/cluster.properties" ]; then + sed -i -e "/^${1}/d" "${JIRA_HOME}/cluster.properties" + fi + return + fi + if [ ! -f "${JIRA_HOME}/cluster.properties" ]; then + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + elif grep "^${1}" "${JIRA_HOME}/cluster.properties"; then + sed -i -e "s#^${1}=.*#${1}=${2}#g" "${JIRA_HOME}/cluster.properties" + else + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + fi +} + +if [ "${CLUSTERED}" == "true" ]; then + set_cluster_property "jira.node.id" "${JIRA_NODE_ID}" + set_cluster_property "jira.shared.home" "${JIRA_SHARED_HOME}" + set_cluster_property "ehcache.peer.discovery" "${EHCACHE_PEER_DISCOVERY}" + set_cluster_property "ehcache.listener.hostName" "${EHCACHE_LISTENER_HOSTNAME}" + set_cluster_property "ehcache.listener.port" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.listener.socketTimeoutMillis" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.multicast.address" "${EHCACHE_MULTICAST_ADDRESS}" + set_cluster_property "ehcache.multicast.port" "${EHCACHE_MULTICAST_PORT}" + set_cluster_property "ehcache.multicast.timeToLive" "${EHCACHE_MULTICAST_TIMETOLIVE}" + set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" +fi + + +# Start Jira as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${JIRA_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${JIRA_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" +else + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/jira/9/9.5.0/.env b/linux/ecosystem/atlassian/jira/9/9.5.0/.env new file mode 100644 index 000000000..2a42e4636 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.0/.env @@ -0,0 +1,3 @@ + +RELEASE=9.5.0 +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.5.0.tar.gz diff --git a/linux/ecosystem/atlassian/jira/9/9.5.0/Dockerfile b/linux/ecosystem/atlassian/jira/9/9.5.0/Dockerfile new file mode 100644 index 000000000..0bb89734c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.0/Dockerfile @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.5.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/9/9.5.0/Dockerfile.jdk11 new file mode 100644 index 000000000..8719b8c56 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.0/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.5.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/jira/9/9.5.0/Dockerfile.jdk17 new file mode 100644 index 000000000..3e2130633 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.0/Dockerfile.jdk17 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk17 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.5.0/Makefile b/linux/ecosystem/atlassian/jira/9/9.5.0/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.0/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/jira/9/9.5.0/docker-compose.yml b/linux/ecosystem/atlassian/jira/9/9.5.0/docker-compose.yml new file mode 100644 index 000000000..a08cce169 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.0/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.9' +services: + app: + image: "epicmorg/jira:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/jira:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk17: + image: "epicmorg/jira:${RELEASE}-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/9/9.5.0/entrypoint.sh b/linux/ecosystem/atlassian/jira/9/9.5.0/entrypoint.sh new file mode 100755 index 000000000..50ee4ecd1 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.0/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +# Setup Data Center configuration +if [ ! -f "/etc/container_id" ]; then + uuidgen > /etc/container_id +fi +CONTAINER_ID=$(cat /etc/container_id) +CONTAINER_SHORT_ID=${CONTAINER_ID::8} + +: ${CLUSTERED:=false} +: ${JIRA_NODE_ID:=jira_node_${CONTAINER_SHORT_ID}} +: ${JIRA_SHARED_HOME:=${JIRA_HOME}/shared} +: ${EHCACHE_PEER_DISCOVERY:=} +: ${EHCACHE_LISTENER_HOSTNAME:=} +: ${EHCACHE_LISTENER_PORT:=} +: ${EHCACHE_LISTENER_SOCKETTIMEOUTMILLIS:=} +: ${EHCACHE_MULTICAST_ADDRESS:=} +: ${EHCACHE_MULTICAST_PORT:=} +: ${EHCACHE_MULTICAST_TIMETOLIVE:=} +: ${EHCACHE_MULTICAST_HOSTNAME:=} + +# Cleanly set/unset values in cluster.properties +function set_cluster_property { + if [ -z $2 ]; then + if [ -f "${JIRA_HOME}/cluster.properties" ]; then + sed -i -e "/^${1}/d" "${JIRA_HOME}/cluster.properties" + fi + return + fi + if [ ! -f "${JIRA_HOME}/cluster.properties" ]; then + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + elif grep "^${1}" "${JIRA_HOME}/cluster.properties"; then + sed -i -e "s#^${1}=.*#${1}=${2}#g" "${JIRA_HOME}/cluster.properties" + else + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + fi +} + +if [ "${CLUSTERED}" == "true" ]; then + set_cluster_property "jira.node.id" "${JIRA_NODE_ID}" + set_cluster_property "jira.shared.home" "${JIRA_SHARED_HOME}" + set_cluster_property "ehcache.peer.discovery" "${EHCACHE_PEER_DISCOVERY}" + set_cluster_property "ehcache.listener.hostName" "${EHCACHE_LISTENER_HOSTNAME}" + set_cluster_property "ehcache.listener.port" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.listener.socketTimeoutMillis" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.multicast.address" "${EHCACHE_MULTICAST_ADDRESS}" + set_cluster_property "ehcache.multicast.port" "${EHCACHE_MULTICAST_PORT}" + set_cluster_property "ehcache.multicast.timeToLive" "${EHCACHE_MULTICAST_TIMETOLIVE}" + set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" +fi + + +# Start Jira as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${JIRA_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${JIRA_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" +else + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/jira/9/9.5.1/.env b/linux/ecosystem/atlassian/jira/9/9.5.1/.env new file mode 100644 index 000000000..89896836c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.1/.env @@ -0,0 +1,3 @@ + +RELEASE=9.5.1 +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-9.5.1.tar.gz diff --git a/linux/ecosystem/atlassian/jira/9/9.5.1/Dockerfile b/linux/ecosystem/atlassian/jira/9/9.5.1/Dockerfile new file mode 100644 index 000000000..0bb89734c --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.1/Dockerfile @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk8 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.5.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/9/9.5.1/Dockerfile.jdk11 new file mode 100644 index 000000000..8719b8c56 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.1/Dockerfile.jdk11 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk11 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.5.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/jira/9/9.5.1/Dockerfile.jdk17 new file mode 100644 index 000000000..3e2130633 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.1/Dockerfile.jdk17 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk17 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/9/9.5.1/Makefile b/linux/ecosystem/atlassian/jira/9/9.5.1/Makefile new file mode 100644 index 000000000..9ef622aa9 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.1/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel --progress plain + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/atlassian/jira/9/9.5.1/docker-compose.yml b/linux/ecosystem/atlassian/jira/9/9.5.1/docker-compose.yml new file mode 100644 index 000000000..a08cce169 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.1/docker-compose.yml @@ -0,0 +1,25 @@ +version: '3.9' +services: + app: + image: "epicmorg/jira:${RELEASE}" + build: + context: . + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk11: + image: "epicmorg/jira:${RELEASE}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk17: + image: "epicmorg/jira:${RELEASE}-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/9/9.5.1/entrypoint.sh b/linux/ecosystem/atlassian/jira/9/9.5.1/entrypoint.sh new file mode 100755 index 000000000..50ee4ecd1 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/9/9.5.1/entrypoint.sh @@ -0,0 +1,89 @@ +#!/bin/bash +set -euo pipefail + +export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") +export JRE_HOME="$JAVA_HOME/jre" +export JAVA_BINARY="$JRE_HOME/bin/java" +export JAVA_VERSION=$("$JAVA_BINARY" -version 2>&1 | awk -F '"' '/version/ {print $2}') + +# Setup Catalina Opts +: ${CATALINA_CONNECTOR_PROXYNAME:=} +: ${CATALINA_CONNECTOR_PROXYPORT:=} +: ${CATALINA_CONNECTOR_SCHEME:=http} +: ${CATALINA_CONNECTOR_SECURE:=false} + +: ${CATALINA_OPTS:=} + +: ${JAVA_OPTS:=} + +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTOR_PROXYNAME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" + +export JAVA_OPTS="${JAVA_OPTS} ${CATALINA_OPTS}" + +# Setup Data Center configuration +if [ ! -f "/etc/container_id" ]; then + uuidgen > /etc/container_id +fi +CONTAINER_ID=$(cat /etc/container_id) +CONTAINER_SHORT_ID=${CONTAINER_ID::8} + +: ${CLUSTERED:=false} +: ${JIRA_NODE_ID:=jira_node_${CONTAINER_SHORT_ID}} +: ${JIRA_SHARED_HOME:=${JIRA_HOME}/shared} +: ${EHCACHE_PEER_DISCOVERY:=} +: ${EHCACHE_LISTENER_HOSTNAME:=} +: ${EHCACHE_LISTENER_PORT:=} +: ${EHCACHE_LISTENER_SOCKETTIMEOUTMILLIS:=} +: ${EHCACHE_MULTICAST_ADDRESS:=} +: ${EHCACHE_MULTICAST_PORT:=} +: ${EHCACHE_MULTICAST_TIMETOLIVE:=} +: ${EHCACHE_MULTICAST_HOSTNAME:=} + +# Cleanly set/unset values in cluster.properties +function set_cluster_property { + if [ -z $2 ]; then + if [ -f "${JIRA_HOME}/cluster.properties" ]; then + sed -i -e "/^${1}/d" "${JIRA_HOME}/cluster.properties" + fi + return + fi + if [ ! -f "${JIRA_HOME}/cluster.properties" ]; then + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + elif grep "^${1}" "${JIRA_HOME}/cluster.properties"; then + sed -i -e "s#^${1}=.*#${1}=${2}#g" "${JIRA_HOME}/cluster.properties" + else + echo "${1}=${2}" >> "${JIRA_HOME}/cluster.properties" + fi +} + +if [ "${CLUSTERED}" == "true" ]; then + set_cluster_property "jira.node.id" "${JIRA_NODE_ID}" + set_cluster_property "jira.shared.home" "${JIRA_SHARED_HOME}" + set_cluster_property "ehcache.peer.discovery" "${EHCACHE_PEER_DISCOVERY}" + set_cluster_property "ehcache.listener.hostName" "${EHCACHE_LISTENER_HOSTNAME}" + set_cluster_property "ehcache.listener.port" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.listener.socketTimeoutMillis" "${EHCACHE_LISTENER_PORT}" + set_cluster_property "ehcache.multicast.address" "${EHCACHE_MULTICAST_ADDRESS}" + set_cluster_property "ehcache.multicast.port" "${EHCACHE_MULTICAST_PORT}" + set_cluster_property "ehcache.multicast.timeToLive" "${EHCACHE_MULTICAST_TIMETOLIVE}" + set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" +fi + + +# Start Jira as the correct user +if [ "${UID}" -eq 0 ]; then + echo "User is currently root. Will change directory ownership to ${RUN_USER}:${RUN_GROUP}, then downgrade permission to ${RUN_USER}" + PERMISSIONS_SIGNATURE=$(stat -c "%u:%U:%a" "${JIRA_HOME}") + EXPECTED_PERMISSIONS=$(id -u ${RUN_USER}):${RUN_USER}:700 + if [ "${PERMISSIONS_SIGNATURE}" != "${EXPECTED_PERMISSIONS}" ]; then + chmod -R 700 "${JIRA_HOME}" && + chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" + fi + # Now drop privileges + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" +else + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" +fi diff --git a/linux/ecosystem/atlassian/jira/latest/Dockerfile.jdk17 b/linux/ecosystem/atlassian/jira/latest/Dockerfile.jdk17 new file mode 100644 index 000000000..3e2130633 --- /dev/null +++ b/linux/ecosystem/atlassian/jira/latest/Dockerfile.jdk17 @@ -0,0 +1,49 @@ +FROM epicmorg/debian:bullseye-jdk17 +LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +#configured by dockerfile / .ENV +ARG RELEASE +ARG DOWNLOAD_URL + + +################################################################## +# Setup +################################################################## +ENV RUN_USER daemon +ENV RUN_GROUP daemon + +# https://confluence.atlassian.com/display/JSERVERM/Important+directories+and+files +ENV JIRA_HOME /var/atlassian/application-data/jira +ENV JIRA_INSTALL_DIR /opt/atlassian/jira + +VOLUME ["${JIRA_HOME}"] +WORKDIR $JIRA_HOME + +# Expose HTTP port +EXPOSE 8080 + +################################################################## +# Installing +################################################################## +RUN mkdir -p ${JIRA_INSTALL_DIR} \ + && curl -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$JIRA_INSTALL_DIR" \ + && chown -R ${RUN_USER}:${RUN_GROUP} ${JIRA_INSTALL_DIR}/ \ + && sed -i -e 's/^JVM_SUPPORT_RECOMMENDED_ARGS=""$/: \${JVM_SUPPORT_RECOMMENDED_ARGS:=""}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/^JVM_\(.*\)_MEMORY="\(.*\)"$/: \${JVM_\1_MEMORY:=\2}/g' ${JIRA_INSTALL_DIR}/bin/setenv.sh \ + && sed -i -e 's/grep "java version"/grep -E "(openjdk|java) version"/g' ${JIRA_INSTALL_DIR}/bin/check-java.sh \ + && sed -i -e 's/port="8080"/port="8080" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${JIRA_INSTALL_DIR}/conf/server.xml && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt clean -y && \ + apt autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh +COPY . /tmp diff --git a/linux/ecosystem/atlassian/jira/latest/docker-compose.yml b/linux/ecosystem/atlassian/jira/latest/docker-compose.yml index 89548e5ac..681e472c0 100644 --- a/linux/ecosystem/atlassian/jira/latest/docker-compose.yml +++ b/linux/ecosystem/atlassian/jira/latest/docker-compose.yml @@ -9,6 +9,14 @@ services: DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk11: image: "epicmorg/jira:latest-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + args: + RELEASE: ${RELEASE} + DOWNLOAD_URL: ${DOWNLOAD_URL} + app-jdk17: + image: "epicmorg/jira:latest-jdk17" build: context: . dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/electron-release-server/Dockerfile b/linux/ecosystem/electron-release-server/Dockerfile index 7dfbe9f86..2f0e80e0b 100644 --- a/linux/ecosystem/electron-release-server/Dockerfile +++ b/linux/ecosystem/electron-release-server/Dockerfile @@ -1,4 +1,4 @@ -FROM epicmorg/nodejs:node10 +FROM epicmorg/nodejs:node12 RUN git clone https://github.com/ArekSredzki/electron-release-server.git /usr/src/electron-release-server && \ tree /usr/src/electron-release-server diff --git a/linux/ecosystem/epicmorg/debian/06-squeeze/main/Dockerfile b/linux/ecosystem/epicmorg/debian/06-squeeze/main/Dockerfile index 7bf66412d..fe957044c 100644 --- a/linux/ecosystem/epicmorg/debian/06-squeeze/main/Dockerfile +++ b/linux/ecosystem/epicmorg/debian/06-squeeze/main/Dockerfile @@ -5,8 +5,8 @@ ARG DEBIAN_FRONTEND=noninteractive ################################################################## # perforce client binary ################################################################## -ENV P4_VERSION=r22.1 -ENV P4_DOWNLOAD_URL=http://filehost.perforce.com/perforce/${P4_VERSION}/bin.linux26x86_64/p4 +ARG P4_VERSION=r22.1 +ARG P4_DOWNLOAD_URL=http://filehost.perforce.com/perforce/${P4_VERSION}/bin.linux26x86_64/p4 ################################################################## # update lists diff --git a/linux/ecosystem/epicmorg/debian/10-buster/main/Dockerfile b/linux/ecosystem/epicmorg/debian/10-buster/main/Dockerfile index a7ba9b473..04e9f04d1 100644 --- a/linux/ecosystem/epicmorg/debian/10-buster/main/Dockerfile +++ b/linux/ecosystem/epicmorg/debian/10-buster/main/Dockerfile @@ -139,6 +139,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs \ # xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## diff --git a/linux/ecosystem/epicmorg/debian/10-buster/main/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/debian/10-buster/main/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..c48739d8d --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/10-buster/main/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/debian/10-buster/main/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/debian/10-buster/main/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..0f7803eaf --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/10-buster/main/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/main/Dockerfile b/linux/ecosystem/epicmorg/debian/11-bullseye/main/Dockerfile index 134a4b7fd..5c3583b14 100644 --- a/linux/ecosystem/epicmorg/debian/11-bullseye/main/Dockerfile +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/main/Dockerfile @@ -5,20 +5,20 @@ ARG DEBIAN_FRONTEND=noninteractive ################################################################## # perforce client binary ################################################################## -ENV P4_VERSION=r22.1 -ENV P4_DOWNLOAD_URL=https://filehost.perforce.com/perforce/${P4_VERSION}/bin.linux26x86_64/p4 +ARG P4_VERSION=r22.1 +ARG P4_DOWNLOAD_URL=https://filehost.perforce.com/perforce/${P4_VERSION}/bin.linux26x86_64/p4 ################################################################## # 7z official binary ################################################################## -ENV SZ_VERSION=7z2200 -ENV SZ_DOWNLOAD_URL=https://www.7-zip.org/a/${SZ_VERSION}-linux-x64.tar.xz +ARG SZ_VERSION=7z2200 +ARG SZ_DOWNLOAD_URL=https://www.7-zip.org/a/${SZ_VERSION}-linux-x64.tar.xz ################################################################## # LazyGit official binary ################################################################## -ENV LZGIT_VERSION=0.34 -ENV LZGIT_DOWNLOAD_URL=https://github.com/jesseduffield/lazygit/releases/download/v${LZGIT_VERSION}/lazygit_${LZGIT_VERSION}_Linux_x86_64.tar.gz +ARG LZGIT_VERSION=0.34 +ARG LZGIT_DOWNLOAD_URL=https://github.com/jesseduffield/lazygit/releases/download/v${LZGIT_VERSION}/lazygit_${LZGIT_VERSION}_Linux_x86_64.tar.gz ################################################################## # update lists @@ -138,6 +138,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs \ # xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## @@ -195,7 +208,7 @@ RUN wget --no-check-certificate -nv --random-wait --retry-connrefused --continue ################################################################## # dumb init ################################################################## -ENV DUMB_INIT_VERSION=1.2.5 +ARG DUMB_INIT_VERSION=1.2.5 RUN wget -q --no-check-certificate -c https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_x86_64 --random-wait -O /usr/bin/dumb-init && \ chmod +x /usr/bin/dumb-init && \ dumb-init --version @@ -203,7 +216,7 @@ RUN wget -q --no-check-certificate -c https://github.com/Yelp/dumb-init/releases ################################################################## # grab gosu for easy step-down from root ################################################################## -ENV GOSU_VER 1.14 +ARG GOSU_VER 1.14 RUN wget -q --no-check-certificate -c https://github.com/tianon/gosu/releases/download/${GOSU_VER}/gosu-amd64 --random-wait -O /usr/local/bin/gosu && \ chmod +x /usr/local/bin/gosu && \ gosu --version diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/main/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/debian/11-bullseye/main/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..c48739d8d --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/main/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/debian/11-bullseye/main/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/debian/11-bullseye/main/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..0f7803eaf --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/11-bullseye/main/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/main/Dockerfile b/linux/ecosystem/epicmorg/debian/12-bookworm/main/Dockerfile index 02369dd62..6179adac0 100644 --- a/linux/ecosystem/epicmorg/debian/12-bookworm/main/Dockerfile +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/main/Dockerfile @@ -138,6 +138,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs ## xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/main/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/debian/12-bookworm/main/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..43280b672 --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/main/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu jammy main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu jammy main diff --git a/linux/ecosystem/epicmorg/debian/12-bookworm/main/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/debian/12-bookworm/main/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..08f372cbc --- /dev/null +++ b/linux/ecosystem/epicmorg/debian/12-bookworm/main/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu jammy main diff --git a/linux/ecosystem/epicmorg/python/main/2.7/Dockerfile b/linux/ecosystem/epicmorg/python/main/2.7/Dockerfile index 38a02d4b5..7e81eca6b 100644 --- a/linux/ecosystem/epicmorg/python/main/2.7/Dockerfile +++ b/linux/ecosystem/epicmorg/python/main/2.7/Dockerfile @@ -188,6 +188,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs \ # xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## diff --git a/linux/ecosystem/epicmorg/python/main/2.7/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/python/main/2.7/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..c48739d8d --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/2.7/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/2.7/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/python/main/2.7/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..0f7803eaf --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/2.7/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.10/Dockerfile b/linux/ecosystem/epicmorg/python/main/3.10/Dockerfile index 9d234a5bd..6e9f7c51a 100644 --- a/linux/ecosystem/epicmorg/python/main/3.10/Dockerfile +++ b/linux/ecosystem/epicmorg/python/main/3.10/Dockerfile @@ -192,6 +192,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs \ # xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## diff --git a/linux/ecosystem/epicmorg/python/main/3.10/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/python/main/3.10/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..c48739d8d --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.10/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.10/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/python/main/3.10/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..0f7803eaf --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.10/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.11/Dockerfile b/linux/ecosystem/epicmorg/python/main/3.11/Dockerfile index 58030f809..cfe6ce933 100644 --- a/linux/ecosystem/epicmorg/python/main/3.11/Dockerfile +++ b/linux/ecosystem/epicmorg/python/main/3.11/Dockerfile @@ -183,6 +183,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs \ # xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## diff --git a/linux/ecosystem/epicmorg/python/main/3.11/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/python/main/3.11/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..c48739d8d --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.11/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.11/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/python/main/3.11/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..0f7803eaf --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.11/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.12/Dockerfile b/linux/ecosystem/epicmorg/python/main/3.12/Dockerfile index 186540113..7b45fee2a 100644 --- a/linux/ecosystem/epicmorg/python/main/3.12/Dockerfile +++ b/linux/ecosystem/epicmorg/python/main/3.12/Dockerfile @@ -183,6 +183,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs \ # xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## diff --git a/linux/ecosystem/epicmorg/python/main/3.12/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/python/main/3.12/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..c48739d8d --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.12/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.12/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/python/main/3.12/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..0f7803eaf --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.12/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.6/Dockerfile b/linux/ecosystem/epicmorg/python/main/3.6/Dockerfile index 08eb973e6..b5f7f182f 100644 --- a/linux/ecosystem/epicmorg/python/main/3.6/Dockerfile +++ b/linux/ecosystem/epicmorg/python/main/3.6/Dockerfile @@ -183,6 +183,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs \ # xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## diff --git a/linux/ecosystem/epicmorg/python/main/3.6/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/python/main/3.6/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..c48739d8d --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.6/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.6/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/python/main/3.6/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..0f7803eaf --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.6/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.7/Dockerfile b/linux/ecosystem/epicmorg/python/main/3.7/Dockerfile index 4b2e4dcf8..7ff80877b 100644 --- a/linux/ecosystem/epicmorg/python/main/3.7/Dockerfile +++ b/linux/ecosystem/epicmorg/python/main/3.7/Dockerfile @@ -183,6 +183,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs \ # xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## diff --git a/linux/ecosystem/epicmorg/python/main/3.7/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/python/main/3.7/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..c48739d8d --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.7/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.7/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/python/main/3.7/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..0f7803eaf --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.7/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.8/Dockerfile b/linux/ecosystem/epicmorg/python/main/3.8/Dockerfile index 1dabd72fe..cc20c4020 100644 --- a/linux/ecosystem/epicmorg/python/main/3.8/Dockerfile +++ b/linux/ecosystem/epicmorg/python/main/3.8/Dockerfile @@ -183,6 +183,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs \ # xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## diff --git a/linux/ecosystem/epicmorg/python/main/3.8/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/python/main/3.8/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..c48739d8d --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.8/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.8/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/python/main/3.8/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..0f7803eaf --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.8/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.9/Dockerfile b/linux/ecosystem/epicmorg/python/main/3.9/Dockerfile index 0543b7199..7b196ba60 100644 --- a/linux/ecosystem/epicmorg/python/main/3.9/Dockerfile +++ b/linux/ecosystem/epicmorg/python/main/3.9/Dockerfile @@ -183,6 +183,19 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio # xfsprogs \ # xfsdump +################################################################## +# git fresh binary +################################################################## +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-mainline.list && \ + rm -rfv /etc/apt/sources.list.d/launchpad_git-stable.list +COPY etc/apt/sources.list.d/launchpad_git-mainline.list /etc/apt/sources.list.d/launchpad_git-mainline.list +COPY etc/apt/sources.list.d/launchpad_git-stable.list /etc/apt/sources.list.d/launchpad_git-stable.list +RUN apt-get update && \ + apt-get install -y --allow-unauthenticated \ + git && \ + git --version + ################################################################## # git-lfs official binary ################################################################## diff --git a/linux/ecosystem/epicmorg/python/main/3.9/etc/apt/sources.list.d/launchpad_git-mainline.list b/linux/ecosystem/epicmorg/python/main/3.9/etc/apt/sources.list.d/launchpad_git-mainline.list new file mode 100644 index 000000000..c48739d8d --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.9/etc/apt/sources.list.d/launchpad_git-mainline.list @@ -0,0 +1,3 @@ +# mainline +deb https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/candidate/ubuntu focal main diff --git a/linux/ecosystem/epicmorg/python/main/3.9/etc/apt/sources.list.d/launchpad_git-stable.list b/linux/ecosystem/epicmorg/python/main/3.9/etc/apt/sources.list.d/launchpad_git-stable.list new file mode 100644 index 000000000..0f7803eaf --- /dev/null +++ b/linux/ecosystem/epicmorg/python/main/3.9/etc/apt/sources.list.d/launchpad_git-stable.list @@ -0,0 +1,3 @@ +# stable +deb https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main +deb-src https://ppa.launchpadcontent.net/git-core/ppa/ubuntu focal main diff --git a/linux/ecosystem/monero/monerod/Dockerfile b/linux/ecosystem/monero/monerod/Dockerfile index aa2872fd3..af4a0b084 100644 --- a/linux/ecosystem/monero/monerod/Dockerfile +++ b/linux/ecosystem/monero/monerod/Dockerfile @@ -8,7 +8,7 @@ ARG DEBIAN_FRONTEND=noninteractive ENV MONERO_DIR=/monero ENV MONERO_BIN=${MONERO_DIR}/bin ENV MONERO_DATA=${MONERO_DIR}/data -ENV MONERO_VERSION=0.18.1.0 +ENV MONERO_VERSION=0.18.1.2 ENV MONERO_DOWNLOAD_URL=https://downloads.getmonero.org/cli/monero-linux-x64-v${MONERO_VERSION}.tar.bz2 ENV PATH="${PATH}:${MONERO_BIN}" diff --git a/linux/ecosystem/monero/p2pool/Dockerfile b/linux/ecosystem/monero/p2pool/Dockerfile index d2d1a323c..6f0da803c 100644 --- a/linux/ecosystem/monero/p2pool/Dockerfile +++ b/linux/ecosystem/monero/p2pool/Dockerfile @@ -7,7 +7,7 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## ENV P2POOL_DIR=/p2pool -ENV P2POOL_VERSION=2.3 +ENV P2POOL_VERSION=2.7 ENV P2POOL_DOWNLOAD_URL=https://github.com/SChernykh/p2pool/releases/download/v${P2POOL_VERSION}/p2pool-v${P2POOL_VERSION}-linux-x64.tar.gz ##################################################################