diff --git a/CHANGELOG.md b/CHANGELOG.md index 988f9bb1f..580754657 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,32 +1,34 @@ # Changelog ## 2024 * `dec` - * migrated `qbittorrent` images to new baseline - * fixed `perforce` iamges and migrated to new baseline - * updated `Atlassian Images`: - * Migrated to new baseline all `Jira` iamges - * Updated to new versions of `Jira` + * fixed `perforce` images + * new baseline: + * `qbittorrent`, `perforce`, `Atlassian Jira`, `Atlassian Bitbucket` + * updated `Atlassian Images`: + * fixed old and added new versions of `Jira` + * fixed old and added new versions of `Bitbucket` + * `sep`, `oct`, `nov` - * fixed some bugs in `Makefile` - * fixed `Dockerfile` bugs - * added `Nextcloud` version `30` in `tag`. + * fixed some bugs in `Makefile` + * fixed `Dockerfile` bugs + * added `Nextcloud` version `30` in `tag`. * `aug` - * `sentry` and `redash` was set to `experimental` status bacause `ci` is not stable yet. - * reworked `teamcity:server` image. - * reworked `vscode` image. - * updated `monerod` and `p2pool` images to latest versions. - * updated `nodejs` and `jdk` images to latest versions. - * added extended `nodejs` and `jdk` base images support. - * added `dotnet` base images support. - * added `13-trixie` and `sid` - `Debian` base images support. - * fixed `Makefile`+ gha - * added support of `zabbix` version `7.0` + gha - * dropped `Astra CE\SE` due potencial license issues. Sorry. - * dropped `kaniko` local script instead of `pip` verion. - * added `Support Document for Docker Image Concepts in Project` document. - * backported new `CVE-fixed` versions of `atlassian` images. - * `WIP`: reworking by new concept of base images and creating new `nginx 1.27.0` with static build. + * `sentry` and `redash` was set to `experimental` status bacause `ci` is not stable yet. + * reworked `teamcity:server` image. + * reworked `vscode` image. + * updated `monerod` and `p2pool` images to latest versions. + * updated `nodejs` and `jdk` images to latest versions. + * added extended `nodejs` and `jdk` base images support. + * added `dotnet` base images support. + * added `13-trixie` and `sid` - `Debian` base images support. + * fixed `Makefile`+ gha + * added support of `zabbix` version `7.0` + gha + * dropped `Astra CE\SE` due potencial license issues. Sorry. + * dropped `kaniko` local script instead of `pip` verion. + * added `Support Document for Docker Image Concepts in Project` document. + * backported new `CVE-fixed` versions of `atlassian` images. + * `WIP`: reworking by new concept of base images and creating new `nginx 1.27.0` with static build. * `july` * Start migration from `Odrey's` repos due to author's rot. * [@oerdnj](https://github.com/oerdnj) go to hell, [xenophobe](https://github.com/oerdnj/deb.sury.org/issues/2155)! :fu: diff --git a/Makefile b/Makefile index 1057a385e..ae7fcd88d 100644 --- a/Makefile +++ b/Makefile @@ -1201,7 +1201,6 @@ ecosystem-perforce-proxy-images: cd `pwd`/linuxecosystem/perforce/p4p/r23.2 && pwd && make build && make deploy cd `pwd`/linuxecosystem/perforce/p4p/r24.2 && pwd && make build && make deploy - ecosystem-bitbucket-1-images: cd `pwd`/linux/ecosystem/atlassian/bitbucket/1/1.0.3 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/bitbucket/1/1.1.2 && pwd && make build && make deploy @@ -1209,7 +1208,6 @@ ecosystem-bitbucket-1-images: cd `pwd`/linux/ecosystem/atlassian/bitbucket/1/1.2.4 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/bitbucket/1/1.3.1 && pwd && make build && make deploy - ecosystem-bitbucket-2-images: cd `pwd`/linux/ecosystem/atlassian/bitbucket/2/2.0.3 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/bitbucket/2/2.1.2 && pwd && make build && make deploy @@ -1364,6 +1362,492 @@ ecosystem-bitbucket-4-images: cd `pwd`/linux/ecosystem/atlassian/bitbucket/4/4.14.11 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/bitbucket/4/4.14.12 && pwd && make build && make deploy +ecosystem-bitbucket-5-images: + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.0.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.0.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.0.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.0.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.0.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.0.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.0.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.0.10 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.1.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.1.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.1.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.1.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.1.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.1.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.1.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.1.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.1.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.2.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.2.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.2.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.2.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.2.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.2.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.2.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.2.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.2.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.3.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.3.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.3.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.3.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.3.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.3.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.3.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.3.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.4.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.4.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.4.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.4.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.4.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.4.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.4.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.4.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.4.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.5.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.5.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.5.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.5.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.5.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.5.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.5.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.5.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.5.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.5.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.6.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.6.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.6.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.6.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.6.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.6.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.7.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.7.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.7.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.7.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.7.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.8.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.8.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.8.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.8.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.8.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.9.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.9.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.9.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.10.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.10.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.10.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.10.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.10.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.11.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.11.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.11.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.11.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.12.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.12.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.12.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.12.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.12.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.13.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.13.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.13.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.13.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.13.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.13.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.14.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.14.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.14.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.14.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.14.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.15.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.15.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.15.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.15.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.10 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/5/5.16.11 && pwd && make build && make deploy + +ecosystem-bitbucket-6-images: + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.10 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.0.11 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.1.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.1.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.1.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.1.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.1.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.1.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.1.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.1.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.1.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.1.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.2.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.2.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.2.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.2.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.2.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.2.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.2.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.2.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.3.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.3.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.3.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.3.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.3.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.3.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.3.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.4.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.4.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.4.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.4.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.4.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.5.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.5.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.5.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.6.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.6.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.6.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.6.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.6.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.7.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.7.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.7.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.7.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.7.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.7.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.8.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.8.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.8.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.8.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.8.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.9.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.9.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.9.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.9.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.10 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.11 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.12 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.13 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.14 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.15 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.16 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/6/6.10.17 && pwd && make build && make deploy + +ecosystem-bitbucket-7-images: + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.0.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.0.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.0.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.0.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.0.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.0.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.1.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.1.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.1.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.1.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.1.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.2.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.2.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.2.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.2.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.2.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.2.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.2.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.3.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.3.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.3.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.4.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.4.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.4.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.5.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.5.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.5.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.10 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.11 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.12 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.13 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.14 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.15 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.16 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.17 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.19 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.20 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.21 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.22 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.6.23 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.7.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.7.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.8.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.8.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.9.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.9.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.10.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.10.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.11.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.11.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.12.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.12.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.13.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.13.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.14.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.14.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.14.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.15.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.15.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.15.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.15.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.16.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.16.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.16.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.16.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.10 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.11 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.12 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.13 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.14 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.15 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.16 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.17 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.18 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.19 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.20 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.17.21 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.18.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.18.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.18.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.18.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.18.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.19.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.19.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.19.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.19.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.20.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.20.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.20.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.20.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.10 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.11 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.12 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.13 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.14 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.15 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.16 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.17 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.18 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.19 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.20 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.21 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.22 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/7/7.21.23 && pwd && make build && make deploy + +ecosystem-bitbucket-8-images: + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.0.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.0.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.0.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.0.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.0.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.0.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.1.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.1.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.1.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.1.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.1.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.1.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.2.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.2.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.2.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.2.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.2.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.3.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.3.1 && 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.3.4 && 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.4.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.4.4 && 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.5.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.5.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.5.4 && 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.6.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.6.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.6.4 && 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/bitbucket/8/8.7.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.7.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.7.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.7.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.7.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.8.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.8.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.8.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.8.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.8.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.8.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.8.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.8.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.10 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.11 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.12 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.13 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.14 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.15 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.16 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.17 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.18 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.19 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.20 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.21 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.9.22 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.10.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.10.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.10.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.10.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.10.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.10.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.10.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.11.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.11.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.11.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.11.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.11.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.11.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.11.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.12.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.12.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.12.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.12.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.12.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.12.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.12.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.13.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.13.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.13.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.13.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.13.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.13.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.13.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.14.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.14.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.14.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.14.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.14.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.14.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.14.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.15.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.15.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.15.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.15.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.15.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.15.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.16.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.16.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.16.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.16.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.16.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.17.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.17.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.17.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.18.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.18.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.3 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.4 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.5 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.6 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.7 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.8 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.9 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.10 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.11 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/8/8.19.12 && pwd && make build && make deploy + +ecosystem-bitbucket-9-images: + cd `pwd`/linux/ecosystem/atlassian/bitbucket/9/9.0.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/9/9.0.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/9/9.1.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/9/9.1.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/9/9.2.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/9/9.2.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/9/9.3.0 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/9/9.3.1 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/9/9.3.2 && pwd && make build && make deploy + cd `pwd`/linux/ecosystem/atlassian/bitbucket/9/9.4.0 && pwd && make build && make deploy + ecosystem-jira-4-images: cd `pwd`/linux/ecosystem/atlassian/jira/4/4.1.1 && pwd && make build && make deploy cd `pwd`/linux/ecosystem/atlassian/jira/4/4.1.2 && pwd && make build && make deploy @@ -1852,7 +2336,7 @@ bundle-jira: make ecosystem-jira-7-images make ecosystem-jira-8-images make ecosystem-jira-9-images - make ecosystem-jira-10images + make ecosystem-jira-10-images bundle-atlassian-latest: @echo "==============================================" @@ -1866,11 +2350,11 @@ bundle-atlassian-latest: 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 - bundle-atlassian: @echo "=======================================" @echo "===== Building Atlassian images =====" @echo "=======================================" + make bundle-bitbucket make bundle-jira bundle-web: diff --git a/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk7.yml b/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk7.yml deleted file mode 100644 index 95164dba8..000000000 --- a/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk7.yml +++ /dev/null @@ -1,16 +0,0 @@ -#version: '3' -services: - app: - image: "epicmorg/bitbucket:${RELEASE}" - build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} - app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" - build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk8-11-17.yml b/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk8-11-17.yml deleted file mode 100644 index 9e86049b0..000000000 --- a/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk8-11-17.yml +++ /dev/null @@ -1,32 +0,0 @@ -#version: '3' -services: - app: - image: "epicmorg/bitbucket:${RELEASE}" - build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} - app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" - build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} - app-jdk11: - image: "epicmorg/bitbucket:${RELEASE}-jdk11" - build: - context: . - dockerfile: Dockerfile.jdk11 - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} - app-jdk17: - image: "epicmorg/bitbucket:${RELEASE}-jdk17" - build: - context: . - dockerfile: Dockerfile.jdk17 - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk8-11.yml b/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk8-11.yml deleted file mode 100644 index 646838244..000000000 --- a/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk8-11.yml +++ /dev/null @@ -1,24 +0,0 @@ -#version: '3' -services: - app: - image: "epicmorg/bitbucket:${RELEASE}" - build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} - app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" - build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} - app-jdk11: - image: "epicmorg/bitbucket:${RELEASE}-jdk11" - build: - context: . - dockerfile: Dockerfile.jdk11 - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk8.yml b/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk8.yml deleted file mode 100644 index dde47f9ea..000000000 --- a/bin/ansible/roles/atlassian.bitbucket/files/docker-compose.jdk8.yml +++ /dev/null @@ -1,16 +0,0 @@ -#version: '3' -services: - app: - image: "epicmorg/bitbucket:${RELEASE}" - build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} - app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" - build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file diff --git a/bin/ansible/roles/atlassian.bitbucket/files/requirements.txt b/bin/ansible/roles/atlassian.bitbucket/files/requirements.txt deleted file mode 100644 index 9ed771861..000000000 --- a/bin/ansible/roles/atlassian.bitbucket/files/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -PyYAML -python-dotenv diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.1.jdk7.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.1.jdk7.yml index ef70340fd..f40b1bfe3 100644 --- a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.1.jdk7.yml +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.1.jdk7.yml @@ -17,21 +17,21 @@ - name: Copy .env with link from template to each version directory template: - src: "template.stash.1.env.j2" + src: "env/template.stash.1-3.env.j2" dest: "{{ target_directory_bitbucket_1 }}/{{ item }}/.env" force: true with_items: "{{ bitbucket_versions }}" - name: Copy docker-compose.yml from template to each version directory - copy: - src: "docker-compose.jdk7.yml" + template: + src: "docker-compose/template.docker-compose.jdk7.yml.j2" dest: "{{ target_directory_bitbucket_1 }}/{{ item }}/docker-compose.yml" force: true with_items: "{{ bitbucket_versions }}" - name: Copy Dockerfile from template to each version directory - copy: - src: "Dockerfile.legacy.jdk7" + template: + src: "dockerfile/template.Dockerfile.legacy.jdk7.j2" dest: "{{ target_directory_bitbucket_1 }}/{{ item }}/Dockerfile" force: true with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.2.jdk7.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.2.jdk7.yml index 18cd69b50..9a09a2bc3 100644 --- a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.2.jdk7.yml +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.2.jdk7.yml @@ -17,21 +17,21 @@ - name: Copy .env with link from template to each version directory template: - src: "template.stash.2.env.j2" + src: "env/template.stash.1-3.env.j2" dest: "{{ target_directory_bitbucket_2 }}/{{ item }}/.env" force: true with_items: "{{ bitbucket_versions }}" - name: Copy docker-compose.yml from template to each version directory - copy: - src: "docker-compose.jdk7.yml" + template: + src: "docker-compose/template.docker-compose.jdk7.yml.j2" dest: "{{ target_directory_bitbucket_2 }}/{{ item }}/docker-compose.yml" force: true with_items: "{{ bitbucket_versions }}" - name: Copy Dockerfile from template to each version directory - copy: - src: "Dockerfile.legacy.jdk7" + template: + src: "dockerfile/template.Dockerfile.legacy.jdk7.j2" dest: "{{ target_directory_bitbucket_2 }}/{{ item }}/Dockerfile" force: true with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.3.jdk8.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.3.jdk8.yml index c17972612..6b3e54fc3 100644 --- a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.3.jdk8.yml +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.3.jdk8.yml @@ -17,21 +17,21 @@ - name: Copy .env with link from template to each version directory template: - src: "template.stash.3.env.j2" + src: "env/template.stash.1-3.env.j2" dest: "{{ target_directory_bitbucket_3 }}/{{ item }}/.env" force: true with_items: "{{ bitbucket_versions }}" - name: Copy docker-compose.yml from template to each version directory - copy: - src: "docker-compose.jdk8.yml" + template: + src: "docker-compose/template.docker-compose.jdk8.yml.j2" dest: "{{ target_directory_bitbucket_3 }}/{{ item }}/docker-compose.yml" force: true with_items: "{{ bitbucket_versions }}" - name: Copy Dockerfile from template to each version directory - copy: - src: "Dockerfile.legacy.jdk8" + template: + src: "dockerfile/template.Dockerfile.legacy.jdk8.j2" dest: "{{ target_directory_bitbucket_3 }}/{{ item }}/Dockerfile" force: true with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.4.jdk8.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.4.jdk8.yml index 41f47fce5..a224250a7 100644 --- a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.4.jdk8.yml +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.4.jdk8.yml @@ -17,21 +17,21 @@ - name: Copy .env with link from template to each version directory template: - src: "template.bitbucket.4.env.j2" + src: "env/template.bitbucket.4-9.env.j2" dest: "{{ target_directory_bitbucket_4 }}/{{ item }}/.env" force: true with_items: "{{ bitbucket_versions }}" - name: Copy docker-compose.yml from template to each version directory - copy: - src: "docker-compose.jdk8.yml" + template: + src: "docker-compose/template.docker-compose.jdk8.yml.j2" dest: "{{ target_directory_bitbucket_4 }}/{{ item }}/docker-compose.yml" force: true with_items: "{{ bitbucket_versions }}" - name: Copy Dockerfile from template to each version directory - copy: - src: "Dockerfile.legacy.jdk8" + template: + src: "dockerfile/template.Dockerfile.jdk8.j2" dest: "{{ target_directory_bitbucket_4 }}/{{ item }}/Dockerfile" force: true with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.5.jdk8.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.5.jdk8.yml new file mode 100644 index 000000000..9c406e249 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.5.jdk8.yml @@ -0,0 +1,52 @@ +- name: Read versions from file + slurp: + src: "roles/common/files/versions/bitbucket/5.jdk8.txt" + register: version_output + +- name: Set version variable + set_fact: + bitbucket_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" + +- name: Create directories for Bitbucket versions + file: + path: "{{ target_directory_bitbucket_5 }}/{{ item }}" + state: directory + mode: '0755' + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy .env with link from template to each version directory + template: + src: "env/template.bitbucket.4-9.env.j2" + dest: "{{ target_directory_bitbucket_5 }}/{{ item }}/.env" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy docker-compose.yml from template to each version directory + template: + src: "docker-compose/template.docker-compose.jdk8.yml.j2" + dest: "{{ target_directory_bitbucket_5 }}/{{ item }}/docker-compose.yml" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk8.j2" + dest: "{{ target_directory_bitbucket_5 }}/{{ item }}/Dockerfile" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy entrypoint.sh from 'files' directory to each version directory + copy: + src: "entrypoint.sh" + dest: "{{ target_directory_bitbucket_5 }}/{{ item }}/entrypoint.sh" + mode: "0777" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Makefile from 'files' directory to each version directory + copy: + src: "Makefile" + dest: "{{ target_directory_bitbucket_5 }}/{{ item }}/Makefile" + force: true + with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.6.jdk8-11.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.6.jdk8-11.yml new file mode 100644 index 000000000..9902d38f1 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.6.jdk8-11.yml @@ -0,0 +1,59 @@ +- name: Read versions from file + slurp: + src: "roles/common/files/versions/bitbucket/6.jdk8-11.txt" + register: version_output + +- name: Set version variable + set_fact: + bitbucket_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" + +- name: Create directories for Bitbucket versions + file: + path: "{{ target_directory_bitbucket_6 }}/{{ item }}" + state: directory + mode: '0755' + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy .env with link from template to each version directory + template: + src: "env/template.bitbucket.4-9.env.j2" + dest: "{{ target_directory_bitbucket_6 }}/{{ item }}/.env" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy docker-compose.yml from template to each version directory + template: + src: "docker-compose/template.docker-compose.jdk8-11.yml.j2" + dest: "{{ target_directory_bitbucket_6 }}/{{ item }}/docker-compose.yml" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk8.j2" + dest: "{{ target_directory_bitbucket_6 }}/{{ item }}/Dockerfile" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile.jdk11 from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk11.j2" + dest: "{{ target_directory_bitbucket_6 }}/{{ item }}/Dockerfile.jdk11" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy entrypoint.sh from 'files' directory to each version directory + copy: + src: "entrypoint.sh" + dest: "{{ target_directory_bitbucket_6 }}/{{ item }}/entrypoint.sh" + mode: "0777" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Makefile from 'files' directory to each version directory + copy: + src: "Makefile" + dest: "{{ target_directory_bitbucket_6 }}/{{ item }}/Makefile" + force: true + with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.7.jdk8-11.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.7.jdk8-11.yml new file mode 100644 index 000000000..6536825a0 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.7.jdk8-11.yml @@ -0,0 +1,59 @@ +- name: Read versions from file + slurp: + src: "roles/common/files/versions/bitbucket/7.jdk8-11.txt" + register: version_output + +- name: Set version variable + set_fact: + bitbucket_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" + +- name: Create directories for Bitbucket versions + file: + path: "{{ target_directory_bitbucket_7 }}/{{ item }}" + state: directory + mode: '0755' + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy .env with link from template to each version directory + template: + src: "env/template.bitbucket.4-9.env.j2" + dest: "{{ target_directory_bitbucket_7 }}/{{ item }}/.env" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy docker-compose.yml from template to each version directory + template: + src: "docker-compose/template.docker-compose.jdk8-11.yml.j2" + dest: "{{ target_directory_bitbucket_7 }}/{{ item }}/docker-compose.yml" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk8.j2" + dest: "{{ target_directory_bitbucket_7 }}/{{ item }}/Dockerfile" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile.jdk11 from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk11.j2" + dest: "{{ target_directory_bitbucket_7 }}/{{ item }}/Dockerfile.jdk11" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy entrypoint.sh from 'files' directory to each version directory + copy: + src: "entrypoint.sh" + dest: "{{ target_directory_bitbucket_7 }}/{{ item }}/entrypoint.sh" + mode: "0777" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Makefile from 'files' directory to each version directory + copy: + src: "Makefile" + dest: "{{ target_directory_bitbucket_7 }}/{{ item }}/Makefile" + force: true + with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.8.jdk17.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.8.jdk17.yml new file mode 100644 index 000000000..9149f8d33 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.8.jdk17.yml @@ -0,0 +1,52 @@ +- name: Read versions from file + slurp: + src: "roles/common/files/versions/bitbucket/8.jdk17.txt" + register: version_output + +- name: Set version variable + set_fact: + bitbucket_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" + +- name: Create directories for Bitbucket versions + file: + path: "{{ target_directory_bitbucket_8 }}/{{ item }}" + state: directory + mode: '0755' + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy .env with link from template to each version directory + template: + src: "env/template.bitbucket.4-9.env.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/.env" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy docker-compose.yml from template to each version directory + template: + src: "docker-compose/template.docker-compose.jdk17.yml.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/docker-compose.yml" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile.jdk17 from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk17.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Dockerfile" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy entrypoint.sh from 'files' directory to each version directory + copy: + src: "entrypoint.sh" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/entrypoint.sh" + mode: "0777" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Makefile from 'files' directory to each version directory + copy: + src: "Makefile" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Makefile" + force: true + with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.8.jdk8-11-17.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.8.jdk8-11-17.yml new file mode 100644 index 000000000..6aae10cff --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.8.jdk8-11-17.yml @@ -0,0 +1,66 @@ +- name: Read versions from file + slurp: + src: "roles/common/files/versions/bitbucket/8.jdk8-11-17.txt" + register: version_output + +- name: Set version variable + set_fact: + bitbucket_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" + +- name: Create directories for Bitbucket versions + file: + path: "{{ target_directory_bitbucket_8 }}/{{ item }}" + state: directory + mode: '0755' + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy .env with link from template to each version directory + template: + src: "env/template.bitbucket.4-9.env.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/.env" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy docker-compose.yml from template to each version directory + template: + src: "docker-compose/template.docker-compose.jdk8-11-17.yml.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/docker-compose.yml" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk8.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Dockerfile" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile.jdk11 from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk11.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Dockerfile.jdk11" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile.jdk17 from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk17.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Dockerfile.jdk17" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy entrypoint.sh from 'files' directory to each version directory + copy: + src: "entrypoint.sh" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/entrypoint.sh" + mode: "0777" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Makefile from 'files' directory to each version directory + copy: + src: "Makefile" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Makefile" + force: true + with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.8.jdk8-11.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.8.jdk8-11.yml new file mode 100644 index 000000000..32fcb26df --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.8.jdk8-11.yml @@ -0,0 +1,59 @@ +- name: Read versions from file + slurp: + src: "roles/common/files/versions/bitbucket/8.jdk8-11.txt" + register: version_output + +- name: Set version variable + set_fact: + bitbucket_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" + +- name: Create directories for Bitbucket versions + file: + path: "{{ target_directory_bitbucket_8 }}/{{ item }}" + state: directory + mode: '0755' + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy .env with link from template to each version directory + template: + src: "env/template.bitbucket.4-9.env.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/.env" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy docker-compose.yml from template to each version directory + template: + src: "docker-compose/template.docker-compose.jdk8-11.yml.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/docker-compose.yml" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk8.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Dockerfile" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile.jdk11 from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk11.j2" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Dockerfile.jdk11" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy entrypoint.sh from 'files' directory to each version directory + copy: + src: "entrypoint.sh" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/entrypoint.sh" + mode: "0777" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Makefile from 'files' directory to each version directory + copy: + src: "Makefile" + dest: "{{ target_directory_bitbucket_8 }}/{{ item }}/Makefile" + force: true + with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.9.jdk17-21.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.9.jdk17-21.yml new file mode 100644 index 000000000..2ad31bdb4 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.9.jdk17-21.yml @@ -0,0 +1,59 @@ +- name: Read versions from file + slurp: + src: "roles/common/files/versions/bitbucket/9.jdk17-21.txt" + register: version_output + +- name: Set version variable + set_fact: + bitbucket_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" + +- name: Create directories for Bitbucket versions + file: + path: "{{ target_directory_bitbucket_9 }}/{{ item }}" + state: directory + mode: '0755' + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy .env with link from template to each version directory + template: + src: "env/template.bitbucket.4-9.env.j2" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/.env" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy docker-compose.yml from template to each version directory + template: + src: "docker-compose/template.docker-compose.jdk17-21.yml.j2" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/docker-compose.yml" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk17.j2" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/Dockerfile" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile.jdk21 from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk21.j2" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/Dockerfile.jdk21" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy entrypoint.sh from 'files' directory to each version directory + copy: + src: "entrypoint.sh" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/entrypoint.sh" + mode: "0777" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Makefile from 'files' directory to each version directory + copy: + src: "Makefile" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/Makefile" + force: true + with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.9.jdk17.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.9.jdk17.yml new file mode 100644 index 000000000..9105d8e2c --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.bitbucket.9.jdk17.yml @@ -0,0 +1,52 @@ +- name: Read versions from file + slurp: + src: "roles/common/files/versions/bitbucket/9.jdk17.txt" + register: version_output + +- name: Set version variable + set_fact: + bitbucket_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" + +- name: Create directories for Bitbucket versions + file: + path: "{{ target_directory_bitbucket_9 }}/{{ item }}" + state: directory + mode: '0755' + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy .env with link from template to each version directory + template: + src: "env/template.bitbucket.4-9.env.j2" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/.env" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy docker-compose.yml from template to each version directory + template: + src: "docker-compose/template.docker-compose.jdk17.yml.j2" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/docker-compose.yml" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Dockerfile.jdk17 from template to each version directory + template: + src: "dockerfile/template.Dockerfile.jdk17.j2" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/Dockerfile" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy entrypoint.sh from 'files' directory to each version directory + copy: + src: "entrypoint.sh" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/entrypoint.sh" + mode: "0777" + force: true + with_items: "{{ bitbucket_versions }}" + +- name: Copy Makefile from 'files' directory to each version directory + copy: + src: "Makefile" + dest: "{{ target_directory_bitbucket_9 }}/{{ item }}/Makefile" + force: true + with_items: "{{ bitbucket_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.jira.8.jdk8-11.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.jira.8.jdk8-11.yml deleted file mode 100644 index f067c7fc6..000000000 --- a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.jira.8.jdk8-11.yml +++ /dev/null @@ -1,58 +0,0 @@ -- name: Read versions from file - slurp: - src: "roles/common/files/versions/jira/8.jdk8-11.txt" - register: version_output - -- name: Set version variable - set_fact: - jira_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" - -- name: Create directories for Jira versions - file: - path: "{{ target_directory_jira_8 }}/{{ item }}" - state: directory - mode: '0755' - force: true - with_items: "{{ jira_versions }}" - -- name: Copy .env with link from template to each version directory - template: - src: "template.env.j2" - dest: "{{ target_directory_jira_8 }}/{{ item }}/.env" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy docker-compose.yml from template to each version directory - copy: - src: "docker-compose.yml" - dest: "{{ target_directory_jira_8 }}/{{ item }}/docker-compose.yml" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy Dockerfile from template to each version directory - copy: - src: "Dockerfile.jdk8" - dest: "{{ target_directory_jira_8 }}/{{ item }}/Dockerfile" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy Dockerfile.jdk11 from 'files' directory to each version directory - copy: - src: "Dockerfile.jdk11" - dest: "{{ target_directory_jira_8 }}/{{ item }}/Dockerfile.jdk11" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy entrypoint.sh from 'files' directory to each version directory - copy: - src: "entrypoint.sh" - dest: "{{ target_directory_jira_8 }}/{{ item }}/entrypoint.sh" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy Makefile from 'files' directory to each version directory - copy: - src: "Makefile" - dest: "{{ target_directory_jira_8 }}/{{ item }}/Makefile" - force: true - with_items: "{{ jira_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.jira.8.jdk8.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.jira.8.jdk8.yml deleted file mode 100644 index 6d1206576..000000000 --- a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.jira.8.jdk8.yml +++ /dev/null @@ -1,51 +0,0 @@ -- name: Read versions from file - slurp: - src: "roles/common/files/versions/jira/8.jdk8.txt" - register: version_output - -- name: Set version variable - set_fact: - jira_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" - -- name: Create directories for Jira versions - file: - path: "{{ target_directory_jira_8 }}/{{ item }}" - state: directory - mode: '0755' - force: true - with_items: "{{ jira_versions }}" - -- name: Copy .env with link from template to each version directory - template: - src: "template.env.j2" - dest: "{{ target_directory_jira_8 }}/{{ item }}/.env" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy docker-compose.yml from template to each version directory - copy: - src: "docker-compose.yml" - dest: "{{ target_directory_jira_8 }}/{{ item }}/docker-compose.yml" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy Dockerfile from template to each version directory - copy: - src: "Dockerfile.jdk8" - dest: "{{ target_directory_jira_8 }}/{{ item }}/Dockerfile" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy entrypoint.sh from 'files' directory to each version directory - copy: - src: "entrypoint.sh" - dest: "{{ target_directory_jira_8 }}/{{ item }}/entrypoint.sh" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy Makefile from 'files' directory to each version directory - copy: - src: "Makefile" - dest: "{{ target_directory_jira_8 }}/{{ item }}/Makefile" - force: true - with_items: "{{ jira_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.jira.9.jdk8-11-17.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.jira.9.jdk8-11-17.yml deleted file mode 100644 index 76f87c633..000000000 --- a/bin/ansible/roles/atlassian.bitbucket/tasks/atlassian.jira.9.jdk8-11-17.yml +++ /dev/null @@ -1,65 +0,0 @@ -- name: Read versions from file - slurp: - src: "roles/common/files/versions/jira/9.jdk8-11-17.txt" - register: version_output - -- name: Set version variable - set_fact: - jira_versions: "{{ version_output['content'] | b64decode | trim | split('\n') }}" - -- name: Create directories for Jira versions - file: - path: "{{ target_directory_jira_9 }}/{{ item }}" - state: directory - mode: '0755' - force: true - with_items: "{{ jira_versions }}" - -- name: Copy .env with link from template to each version directory - template: - src: "template.env.j2" - dest: "{{ target_directory_jira_9 }}/{{ item }}/.env" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy docker-compose.yml from template to each version directory - copy: - src: "docker-compose.jdk8-11-17.yml" - dest: "{{ target_directory_jira_9 }}/{{ item }}/docker-compose.yml" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy Dockerfile from template to each version directory - copy: - src: "Dockerfile.jdk8" - dest: "{{ target_directory_jira_9 }}/{{ item }}/Dockerfile" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy Dockerfile.jdk11 from 'files' directory to each version directory - copy: - src: "Dockerfile.jdk11" - dest: "{{ target_directory_jira_9 }}/{{ item }}/Dockerfile.jdk11" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy Dockerfile.jdk17 from 'files' directory to each version directory - copy: - src: "Dockerfile.jdk17" - dest: "{{ target_directory_jira_9 }}/{{ item }}/Dockerfile.jdk17" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy entrypoint.sh from 'files' directory to each version directory - copy: - src: "entrypoint.sh" - dest: "{{ target_directory_jira_9 }}/{{ item }}/entrypoint.sh" - force: true - with_items: "{{ jira_versions }}" - -- name: Copy Makefile from 'files' directory to each version directory - copy: - src: "Makefile" - dest: "{{ target_directory_jira_9 }}/{{ item }}/Makefile" - force: true - with_items: "{{ jira_versions }}" diff --git a/bin/ansible/roles/atlassian.bitbucket/tasks/main.yml b/bin/ansible/roles/atlassian.bitbucket/tasks/main.yml index 9e1235fd9..de5be1f20 100644 --- a/bin/ansible/roles/atlassian.bitbucket/tasks/main.yml +++ b/bin/ansible/roles/atlassian.bitbucket/tasks/main.yml @@ -1,11 +1,35 @@ -#- name: "Generate images for Stash (Bitbucket) 1 (jdk7)" -# import_tasks: atlassian.bitbucket.1.jdk7.yml +- name: "Generate images for Stash (Bitbucket) 1 (jdk7)" + import_tasks: atlassian.bitbucket.1.jdk7.yml -#- name: "Generate images for Stash (Bitbucket) 2 (jdk7)" -# import_tasks: atlassian.bitbucket.2.jdk7.yml +- name: "Generate images for Stash (Bitbucket) 2 (jdk7)" + import_tasks: atlassian.bitbucket.2.jdk7.yml -#- name: "Generate images for Stash (Bitbucket) 3 (jdk8)" -# import_tasks: atlassian.bitbucket.3.jdk8.yml +- name: "Generate images for Stash (Bitbucket) 3 (jdk8)" + import_tasks: atlassian.bitbucket.3.jdk8.yml - name: "Generate images for Bitbucket 4 (jdk8)" import_tasks: atlassian.bitbucket.4.jdk8.yml + +- name: "Generate images for Bitbucket 5 (jdk8)" + import_tasks: atlassian.bitbucket.5.jdk8.yml + +- name: "Generate images for Bitbucket 6 (jdk8 + jdk11)" + import_tasks: atlassian.bitbucket.6.jdk8-11.yml + +- name: "Generate images for Bitbucket 7 (jdk8 + jdk11)" + import_tasks: atlassian.bitbucket.7.jdk8-11.yml + +- name: "Generate images for Bitbucket 8 (jdk8 + jdk11)" + import_tasks: atlassian.bitbucket.8.jdk8-11.yml + +- name: "Generate images for Bitbucket 8 (jdk8 + jdk11 + jdk17)" + import_tasks: atlassian.bitbucket.8.jdk8-11-17.yml + +- name: "Generate images for Bitbucket 8 (jdk17)" + import_tasks: atlassian.bitbucket.8.jdk17.yml + +- name: "Generate images for Bitbucket 9 (jdk17)" + import_tasks: atlassian.bitbucket.9.jdk17.yml + +- name: "Generate images for Bitbucket 9 (jdk17 + jdk21)" + import_tasks: atlassian.bitbucket.9.jdk17-21.yml diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk17-21.yml.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk17-21.yml.j2 new file mode 100644 index 000000000..e24713c30 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk17-21.yml.j2 @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:{{ item }}" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:{{ item }}-jdk17" + build: + context: . + app-jdk21: + image: "epicmorg/bitbucket:{{ item }}-jdk21" + build: + context: . + dockerfile: Dockerfile.jdk21 diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk17.yml.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk17.yml.j2 new file mode 100644 index 000000000..16adbc79a --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk17.yml.j2 @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:{{ item }}" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:{{ item }}-jdk17" + build: + context: . diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk7.yml.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk7.yml.j2 new file mode 100644 index 000000000..5f32b5672 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk7.yml.j2 @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:{{ item }}" + build: + context: . + app-jdk7: + image: "epicmorg/bitbucket:{{ item }}-jdk7" + build: + context: . diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk8-11-17.yml.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk8-11-17.yml.j2 new file mode 100644 index 000000000..28b24e47d --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk8-11-17.yml.j2 @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:{{ item }}" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:{{ item }}-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:{{ item }}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:{{ item }}-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk8-11.yml.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk8-11.yml.j2 new file mode 100644 index 000000000..f68849053 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk8-11.yml.j2 @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:{{ item }}" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:{{ item }}-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:{{ item }}-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk8.yml.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk8.yml.j2 new file mode 100644 index 000000000..6ee54bd84 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/templates/docker-compose/template.docker-compose.jdk8.yml.j2 @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:{{ item }}" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:{{ item }}-jdk8" + build: + context: . \ No newline at end of file diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk11.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk11.j2 new file mode 100644 index 000000000..116b43088 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk11.j2 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE={{ item }} +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk17.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk17.j2 new file mode 100644 index 000000000..cfcfaa0fb --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk17.j2 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE={{ item }} +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk21.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk21.j2 new file mode 100644 index 000000000..1220a78d7 --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk21.j2 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk21 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE={{ item }} +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk8.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk8.j2 new file mode 100644 index 000000000..c6018030e --- /dev/null +++ b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.jdk8.j2 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE={{ item }} +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.legacy.jdk7 b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.legacy.jdk7.j2 similarity index 80% rename from bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.legacy.jdk7 rename to bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.legacy.jdk7.j2 index 6e4d5787f..d43b8b550 100644 --- a/bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.legacy.jdk7 +++ b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.legacy.jdk7.j2 @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE={{ item }} +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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-get clean -y && \ apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.legacy.jdk8 b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.legacy.jdk8.j2 similarity index 80% rename from bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.legacy.jdk8 rename to bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.legacy.jdk8.j2 index 93c0d51fc..925e2e494 100644 --- a/bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.legacy.jdk8 +++ b/bin/ansible/roles/atlassian.bitbucket/templates/dockerfile/template.Dockerfile.legacy.jdk8.j2 @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE={{ item }} +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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-get clean -y && \ apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/template.bitbucket.4.env.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/env/template.bitbucket.4-9.env.j2 similarity index 100% rename from bin/ansible/roles/atlassian.bitbucket/templates/template.bitbucket.4.env.j2 rename to bin/ansible/roles/atlassian.bitbucket/templates/env/template.bitbucket.4-9.env.j2 diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/template.stash.1.env.j2 b/bin/ansible/roles/atlassian.bitbucket/templates/env/template.stash.1-3.env.j2 similarity index 100% rename from bin/ansible/roles/atlassian.bitbucket/templates/template.stash.1.env.j2 rename to bin/ansible/roles/atlassian.bitbucket/templates/env/template.stash.1-3.env.j2 diff --git a/bin/ansible/roles/atlassian.bitbucket/vars/main.yml b/bin/ansible/roles/atlassian.bitbucket/vars/main.yml index 757374685..16758d8a1 100644 --- a/bin/ansible/roles/atlassian.bitbucket/vars/main.yml +++ b/bin/ansible/roles/atlassian.bitbucket/vars/main.yml @@ -7,3 +7,4 @@ target_directory_bitbucket_5: "/opt/tmp/bitbucket/5" target_directory_bitbucket_6: "/opt/tmp/bitbucket/6" target_directory_bitbucket_7: "/opt/tmp/bitbucket/7" target_directory_bitbucket_8: "/opt/tmp/bitbucket/8" +target_directory_bitbucket_9: "/opt/tmp/bitbucket/9" diff --git a/bin/ansible/roles/atlassian.jira/tasks/atlassian.jira.4.jdk6.yml b/bin/ansible/roles/atlassian.jira/tasks/atlassian.jira.4.jdk6.yml index 319f4d2bb..d694c19da 100644 --- a/bin/ansible/roles/atlassian.jira/tasks/atlassian.jira.4.jdk6.yml +++ b/bin/ansible/roles/atlassian.jira/tasks/atlassian.jira.4.jdk6.yml @@ -42,7 +42,7 @@ # copy: # src: "entrypoint.sh" # dest: "{{ target_directory_jira_4 }}/{{ item }}/entrypoint.sh" - mode: "0777" +# mode: "0777" # force: true # with_items: "{{ jira_versions }}" # diff --git a/bin/ansible/roles/common/files/versions/bitbucket/5.jdk8.txt b/bin/ansible/roles/common/files/versions/bitbucket/5.jdk8.txt new file mode 100644 index 000000000..87ccd1319 --- /dev/null +++ b/bin/ansible/roles/common/files/versions/bitbucket/5.jdk8.txt @@ -0,0 +1,113 @@ +5.0.2 +5.0.4 +5.0.5 +5.0.6 +5.0.7 +5.0.8 +5.0.9 +5.0.10 +5.1.1 +5.1.2 +5.1.3 +5.1.4 +5.1.5 +5.1.6 +5.1.7 +5.1.8 +5.1.9 +5.2.0 +5.2.1 +5.2.2 +5.2.3 +5.2.4 +5.2.5 +5.2.6 +5.2.7 +5.2.8 +5.3.0 +5.3.1 +5.3.2 +5.3.3 +5.3.4 +5.3.5 +5.3.6 +5.3.7 +5.4.0 +5.4.1 +5.4.2 +5.4.3 +5.4.4 +5.4.6 +5.4.7 +5.4.8 +5.4.9 +5.5.0 +5.5.1 +5.5.2 +5.5.3 +5.5.4 +5.5.5 +5.5.6 +5.5.7 +5.5.8 +5.5.9 +5.6.1 +5.6.2 +5.6.3 +5.6.4 +5.6.5 +5.6.6 +5.7.0 +5.7.1 +5.7.2 +5.7.3 +5.7.4 +5.8.0 +5.8.1 +5.8.2 +5.8.3 +5.8.4 +5.9.0 +5.9.1 +5.9.2 +5.10.0 +5.10.1 +5.10.2 +5.10.3 +5.10.4 +5.11.1 +5.11.2 +5.11.3 +5.11.4 +5.12.0 +5.12.1 +5.12.2 +5.12.3 +5.12.4 +5.13.0 +5.13.1 +5.13.3 +5.13.4 +5.13.5 +5.13.6 +5.14.0 +5.14.1 +5.14.2 +5.14.3 +5.14.4 +5.15.0 +5.15.1 +5.15.2 +5.15.3 +5.16.0 +5.16.1 +5.16.2 +5.16.3 +5.16.4 +5.16.5 +5.16.6 +5.16.7 +5.16.8 +5.16.9 +5.16.10 +5.16.11 \ No newline at end of file diff --git a/bin/ansible/roles/common/files/versions/bitbucket/6.jdk8-11.txt b/bin/ansible/roles/common/files/versions/bitbucket/6.jdk8-11.txt new file mode 100644 index 000000000..f8a08dd43 --- /dev/null +++ b/bin/ansible/roles/common/files/versions/bitbucket/6.jdk8-11.txt @@ -0,0 +1,81 @@ +6.0.0 +6.0.1 +6.0.2 +6.0.3 +6.0.4 +6.0.5 +6.0.6 +6.0.7 +6.0.9 +6.0.10 +6.0.11 +6.1.0 +6.1.1 +6.1.2 +6.1.3 +6.1.4 +6.1.5 +6.1.6 +6.1.7 +6.1.8 +6.1.9 +6.2.0 +6.2.1 +6.2.2 +6.2.3 +6.2.4 +6.2.5 +6.2.6 +6.2.7 +6.3.0 +6.3.1 +6.3.2 +6.3.3 +6.3.4 +6.3.5 +6.3.6 +6.4.0 +6.4.1 +6.4.2 +6.4.3 +6.4.4 +6.5.1 +6.5.2 +6.5.3 +6.6.0 +6.6.1 +6.6.2 +6.6.3 +6.6.4 +6.7.0 +6.7.1 +6.7.2 +6.7.3 +6.7.4 +6.7.5 +6.8.0 +6.8.1 +6.8.2 +6.8.3 +6.8.4 +6.9.0 +6.9.1 +6.9.2 +6.9.3 +6.10.0 +6.10.1 +6.10.2 +6.10.3 +6.10.4 +6.10.5 +6.10.7 +6.10.8 +6.10.9 +6.10.10 +6.10.11 +6.10.12 +6.10.13 +6.10.14 +6.10.15 +6.10.16 +6.10.17 \ No newline at end of file diff --git a/bin/ansible/roles/common/files/versions/bitbucket/7.jdk8-11.txt b/bin/ansible/roles/common/files/versions/bitbucket/7.jdk8-11.txt new file mode 100644 index 000000000..d16573230 --- /dev/null +++ b/bin/ansible/roles/common/files/versions/bitbucket/7.jdk8-11.txt @@ -0,0 +1,134 @@ +7.0.0 +7.0.1 +7.0.2 +7.0.3 +7.0.4 +7.0.5 +7.1.0 +7.1.1 +7.1.2 +7.1.3 +7.1.4 +7.2.0 +7.2.1 +7.2.2 +7.2.3 +7.2.4 +7.2.5 +7.2.6 +7.3.0 +7.3.1 +7.3.2 +7.4.0 +7.4.1 +7.4.2 +7.5.0 +7.5.1 +7.5.2 +7.6.0 +7.6.1 +7.6.2 +7.6.3 +7.6.4 +7.6.5 +7.6.6 +7.6.7 +7.6.8 +7.6.9 +7.6.10 +7.6.11 +7.6.12 +7.6.13 +7.6.14 +7.6.15 +7.6.16 +7.6.17 +7.6.19 +7.6.20 +7.6.21 +7.6.22 +7.6.23 +7.7.0 +7.7.1 +7.8.0 +7.8.1 +7.9.0 +7.9.1 +7.10.0 +7.10.1 +7.11.1 +7.11.2 +7.12.0 +7.12.1 +7.13.0 +7.13.1 +7.14.0 +7.14.1 +7.14.2 +7.15.0 +7.15.1 +7.15.2 +7.15.3 +7.16.0 +7.16.1 +7.16.2 +7.16.3 +7.17.0 +7.17.1 +7.17.2 +7.17.3 +7.17.4 +7.17.5 +7.17.6 +7.17.7 +7.17.8 +7.17.9 +7.17.10 +7.17.11 +7.17.12 +7.17.13 +7.17.14 +7.17.15 +7.17.16 +7.17.17 +7.17.18 +7.17.19 +7.17.20 +7.17.21 +7.18.0 +7.18.1 +7.18.2 +7.18.3 +7.18.4 +7.19.2 +7.19.3 +7.19.4 +7.19.5 +7.20.0 +7.20.1 +7.20.2 +7.20.3 +7.21.0 +7.21.1 +7.21.2 +7.21.3 +7.21.4 +7.21.5 +7.21.6 +7.21.7 +7.21.8 +7.21.9 +7.21.10 +7.21.11 +7.21.12 +7.21.13 +7.21.14 +7.21.15 +7.21.16 +7.21.17 +7.21.18 +7.21.19 +7.21.20 +7.21.21 +7.21.22 +7.21.23 \ No newline at end of file diff --git a/bin/ansible/roles/common/files/versions/bitbucket/8.jdk17.txt b/bin/ansible/roles/common/files/versions/bitbucket/8.jdk17.txt new file mode 100644 index 000000000..d103df0fd --- /dev/null +++ b/bin/ansible/roles/common/files/versions/bitbucket/8.jdk17.txt @@ -0,0 +1,18 @@ +8.17.0 +8.17.1 +8.17.2 +8.18.0 +8.18.1 +8.19.0 +8.19.1 +8.19.2 +8.19.3 +8.19.4 +8.19.5 +8.19.6 +8.19.7 +8.19.8 +8.19.9 +8.19.10 +8.19.11 +8.19.12 \ No newline at end of file diff --git a/bin/ansible/roles/common/files/versions/bitbucket/8.jdk8-11-17.txt b/bin/ansible/roles/common/files/versions/bitbucket/8.jdk8-11-17.txt new file mode 100644 index 000000000..604e5e06a --- /dev/null +++ b/bin/ansible/roles/common/files/versions/bitbucket/8.jdk8-11-17.txt @@ -0,0 +1,77 @@ +8.8.0 +8.8.1 +8.8.2 +8.8.3 +8.8.4 +8.8.5 +8.8.6 +8.8.7 +8.9.0 +8.9.1 +8.9.2 +8.9.3 +8.9.4 +8.9.5 +8.9.6 +8.9.7 +8.9.8 +8.9.9 +8.9.10 +8.9.11 +8.9.12 +8.9.13 +8.9.14 +8.9.15 +8.9.16 +8.9.17 +8.9.18 +8.9.19 +8.9.20 +8.9.21 +8.9.22 +8.10.0 +8.10.1 +8.10.2 +8.10.3 +8.10.4 +8.10.5 +8.10.6 +8.11.0 +8.11.1 +8.11.2 +8.11.3 +8.11.4 +8.11.5 +8.11.6 +8.12.0 +8.12.1 +8.12.2 +8.12.3 +8.12.4 +8.12.5 +8.12.6 +8.13.0 +8.13.1 +8.13.2 +8.13.3 +8.13.4 +8.13.5 +8.13.6 +8.14.0 +8.14.1 +8.14.2 +8.14.3 +8.14.4 +8.14.5 +8.14.6 +8.15.0 +8.15.1 +8.15.2 +8.15.3 +8.15.4 +8.15.5 +8.16.0 +8.16.1 +8.16.2 +8.16.3 +8.16.4 \ No newline at end of file diff --git a/bin/ansible/roles/common/files/versions/bitbucket/8.jdk8-11.txt b/bin/ansible/roles/common/files/versions/bitbucket/8.jdk8-11.txt new file mode 100644 index 000000000..e95ed16be --- /dev/null +++ b/bin/ansible/roles/common/files/versions/bitbucket/8.jdk8-11.txt @@ -0,0 +1,43 @@ +8.0.0 +8.0.1 +8.0.2 +8.0.3 +8.0.4 +8.0.5 +8.1.0 +8.1.1 +8.1.2 +8.1.3 +8.1.4 +8.1.5 +8.2.0 +8.2.1 +8.2.2 +8.2.3 +8.2.4 +8.3.0 +8.3.1 +8.3.2 +8.3.3 +8.3.4 +8.4.0 +8.4.1 +8.4.2 +8.4.3 +8.4.4 +8.5.0 +8.5.1 +8.5.2 +8.5.3 +8.5.4 +8.6.0 +8.6.1 +8.6.2 +8.6.3 +8.6.4 +8.7.0 +8.7.1 +8.7.2 +8.7.3 +8.7.4 +8.7.5 \ No newline at end of file diff --git a/bin/ansible/roles/common/files/versions/bitbucket/9.jdk17-21.txt b/bin/ansible/roles/common/files/versions/bitbucket/9.jdk17-21.txt new file mode 100644 index 000000000..cacbf1b92 --- /dev/null +++ b/bin/ansible/roles/common/files/versions/bitbucket/9.jdk17-21.txt @@ -0,0 +1,4 @@ +9.3.0 +9.3.1 +9.3.2 +9.4.0 \ No newline at end of file diff --git a/bin/ansible/roles/common/files/versions/bitbucket/9.jdk17.txt b/bin/ansible/roles/common/files/versions/bitbucket/9.jdk17.txt new file mode 100644 index 000000000..fd7c6818a --- /dev/null +++ b/bin/ansible/roles/common/files/versions/bitbucket/9.jdk17.txt @@ -0,0 +1,6 @@ +9.0.0 +9.0.1 +9.1.0 +9.1.1 +9.2.0 +9.2.1 \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.0.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/1/1.0.3/Dockerfile index 884d077dd..0a5557466 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.0.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/1/1.0.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=1.0.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.0.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/1/1.0.3/docker-compose.yml index 95164dba8..1acad1b3d 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.0.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/1/1.0.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:1.0.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:1.0.3-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.1.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/1/1.1.2/Dockerfile index 884d077dd..a7a55f45a 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.1.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/1/1.1.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=1.1.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.1.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/1/1.1.2/docker-compose.yml index 95164dba8..8961f0f2b 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.1.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/1/1.1.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:1.1.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:1.1.2-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.2.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/1/1.2.1/Dockerfile index 884d077dd..b8c50cc09 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.2.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/1/1.2.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=1.2.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.2.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/1/1.2.1/docker-compose.yml index 95164dba8..c3546dfe3 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.2.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/1/1.2.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:1.2.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:1.2.1-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.2.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/1/1.2.4/Dockerfile index 884d077dd..37a8f52d7 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.2.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/1/1.2.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=1.2.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.2.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/1/1.2.4/docker-compose.yml index 95164dba8..9fa20f4ac 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.2.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/1/1.2.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:1.2.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:1.2.4-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.3.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/1/1.3.1/Dockerfile index 884d077dd..3f6c3d080 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.3.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/1/1.3.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=1.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/1/1.3.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/1/1.3.1/docker-compose.yml index 95164dba8..448bdef29 100644 --- a/linux/ecosystem/atlassian/bitbucket/1/1.3.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/1/1.3.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:1.3.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:1.3.1-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.0.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.0.3/Dockerfile index 884d077dd..6f8bbec0d 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.0.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.0.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.0.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.0.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.0.3/docker-compose.yml index 95164dba8..35871aa4e 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.0.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.0.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.0.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.0.3-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.1.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.1.2/Dockerfile index 884d077dd..3f5070471 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.1.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.1.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.1.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.1.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.1.2/docker-compose.yml index 95164dba8..bf31a622a 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.1.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.1.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.1.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.1.2-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.10.0/Dockerfile index 884d077dd..90e295d65 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.10.0/docker-compose.yml index 95164dba8..8c9840a3c 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.10.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.10.0-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.10.1/Dockerfile index 884d077dd..fc0f5cc35 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.10.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.10.1/docker-compose.yml index 95164dba8..ddada99f4 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.10.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.10.1-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.10.2/Dockerfile index 884d077dd..8e22b5804 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.10.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.10.2/docker-compose.yml index 95164dba8..7b3f7ab3f 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.10.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.10.2-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.10.3/Dockerfile index 884d077dd..41a401ae2 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.10.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.10.3/docker-compose.yml index 95164dba8..da419d2c7 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.10.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.10.3-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.10.4/Dockerfile index 884d077dd..b7461dd63 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.10.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.10.4/docker-compose.yml index 95164dba8..fb3892a44 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.10.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.10.4-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.10.5/Dockerfile index 884d077dd..7e4ac869d 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.10.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.10.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.10.5/docker-compose.yml index 95164dba8..ea3d8c893 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.10.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.10.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.10.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.10.5-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.11.3/Dockerfile index 884d077dd..6e9f76a2e 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.11.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.11.3/docker-compose.yml index 95164dba8..b2f1f2adc 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.11.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.11.3-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.11.4/Dockerfile index 884d077dd..521ebc27d 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.11.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.11.4/docker-compose.yml index 95164dba8..7193e8db0 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.11.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.11.4-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.11.5/Dockerfile index 884d077dd..82d13797b 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.11.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.11.5/docker-compose.yml index 95164dba8..721b8e029 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.11.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.11.5-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.11.6/Dockerfile index 884d077dd..2298fa955 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.6/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.11.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.11.6/docker-compose.yml index 95164dba8..ea5bf9176 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.6/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.6/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.11.6" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.11.6-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.11.7/Dockerfile index 884d077dd..dbe665cfb 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.7/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.7/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.11.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.11.7/docker-compose.yml index 95164dba8..5eb0d484d 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.7/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.7/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.11.7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.11.7-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.11.8/Dockerfile index 884d077dd..ceb1255f5 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.8/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.8/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.11.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.11.8/docker-compose.yml index 95164dba8..01315e84a 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.8/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.8/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.11.8" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.11.8-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.11.9/Dockerfile index 884d077dd..d09c90a70 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.9/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.9/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.11.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.11.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.11.9/docker-compose.yml index 95164dba8..09410a93d 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.11.9/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.11.9/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.11.9" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.11.9-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.12.0/Dockerfile index 884d077dd..e3eaf9fb3 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.12.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.12.0/docker-compose.yml index 95164dba8..d40f4ea21 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.12.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.12.0-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.12.1/Dockerfile index 884d077dd..959414cd7 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.12.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.12.1/docker-compose.yml index 95164dba8..ec8a97175 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.12.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.12.1-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.12.2/Dockerfile index 884d077dd..7017a4724 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.12.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.12.2/docker-compose.yml index 95164dba8..cadfe9d21 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.12.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.12.2-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.12.3/Dockerfile index 884d077dd..cd745fc4f 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.12.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.12.3/docker-compose.yml index 95164dba8..66c8470fc 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.12.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.12.3-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.12.4/Dockerfile index 884d077dd..000480d0a 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.12.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.12.4/docker-compose.yml index 95164dba8..ffb48836c 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.12.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.12.4-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.12.5/Dockerfile index 884d077dd..284d87a3e 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.12.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.12.5/docker-compose.yml index 95164dba8..e19b58126 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.12.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.12.5-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.12.6/Dockerfile index 884d077dd..9ab873834 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.6/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.12.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.12.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.12.6/docker-compose.yml index 95164dba8..0d9230c72 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.12.6/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.12.6/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.12.6" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.12.6-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.2.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.2.0/Dockerfile index 884d077dd..44818cfaa 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.2.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.2.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.2.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.2.0/docker-compose.yml index 95164dba8..8075d6bcf 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.2.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.2.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.2.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.2.0-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.3.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.3.1/Dockerfile index 884d077dd..4ab83ffd9 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.3.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.3.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.3.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.3.1/docker-compose.yml index 95164dba8..1bf2427ab 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.3.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.3.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.3.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.3.1-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.4.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.4.2/Dockerfile index 884d077dd..eb6107d29 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.4.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.4.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.4.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.4.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.4.2/docker-compose.yml index 95164dba8..107f7a2e3 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.4.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.4.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.4.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.4.2-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.5.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.5.4/Dockerfile index 884d077dd..d7957aa7e 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.5.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.5.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.5.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.5.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.5.4/docker-compose.yml index 95164dba8..b511262fe 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.5.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.5.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.5.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.5.4-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.6.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.6.5/Dockerfile index 884d077dd..a24049b02 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.6.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.6.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.6.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.6.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.6.5/docker-compose.yml index 95164dba8..1e37e4160 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.6.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.6.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.6.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.6.5-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.7.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.7.6/Dockerfile index 884d077dd..242b1ac78 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.7.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.7.6/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.7.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.7.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.7.6/docker-compose.yml index 95164dba8..5f8df8dc7 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.7.6/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.7.6/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.7.6" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.7.6-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.8.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.8.4/Dockerfile index 884d077dd..d9d48e72c 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.8.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.8.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.8.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.8.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.8.4/docker-compose.yml index 95164dba8..4db541143 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.8.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.8.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.8.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.8.4-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.8.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.8.5/Dockerfile index 884d077dd..a4fd2b740 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.8.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.8.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.8.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.8.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.8.5/docker-compose.yml index 95164dba8..cf533300f 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.8.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.8.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.8.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.8.5-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.9.1/Dockerfile index 884d077dd..59bd7a3d1 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.9.1/docker-compose.yml index 95164dba8..781db34bd 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.9.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.9.1-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.9.2/Dockerfile index 884d077dd..d230c2ede 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.9.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.9.2/docker-compose.yml index 95164dba8..cb423fdd7 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.9.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.9.2-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.9.3/Dockerfile index 884d077dd..7d41e3864 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.9.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.9.3/docker-compose.yml index 95164dba8..2f6d5b395 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.9.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.9.3-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.9.4/Dockerfile index 884d077dd..92bc8a87e 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.9.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.9.4/docker-compose.yml index 95164dba8..56aae4352 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.9.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.9.4-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/2/2.9.5/Dockerfile index 884d077dd..cb7cdb514 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=2.9.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/2/2.9.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/2/2.9.5/docker-compose.yml index 95164dba8..39be5a8de 100644 --- a/linux/ecosystem/atlassian/bitbucket/2/2.9.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/2/2.9.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:2.9.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk7: - image: "epicmorg/bitbucket:${RELEASE}-jdk7" + image: "epicmorg/bitbucket:2.9.5-jdk7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.0.1/Dockerfile index f1a022d6a..62aba6dcd 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.0.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.0.1/docker-compose.yml index dde47f9ea..11b594d73 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.0.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.0.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.0.4/Dockerfile index f1a022d6a..1d3d51e75 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.0.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.0.4/docker-compose.yml index dde47f9ea..ecbbee8e8 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.0.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.0.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.0.5/Dockerfile index f1a022d6a..bdfc09e79 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.0.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.0.5/docker-compose.yml index dde47f9ea..becc8587a 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.0.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.0.5-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.0.6/Dockerfile index f1a022d6a..b391cc583 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.6/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.0.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.0.6/docker-compose.yml index dde47f9ea..09a405c6f 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.6/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.6/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.0.6" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.0.6-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.0.7/Dockerfile index f1a022d6a..24f6dd565 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.7/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.7/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.0.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.0.7/docker-compose.yml index dde47f9ea..f2f5a1122 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.7/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.7/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.0.7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.0.7-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.0.8/Dockerfile index f1a022d6a..2969a63ae 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.8/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.8/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.0.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.0.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.0.8/docker-compose.yml index dde47f9ea..3b7bd34f4 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.0.8/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.0.8/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.0.8" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.0.8-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.1.0/Dockerfile index f1a022d6a..dc61fa93d 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.1.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.1.0/docker-compose.yml index dde47f9ea..45859ebbd 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.1.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.1.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.1.1/Dockerfile index f1a022d6a..d6396dc04 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.1.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.1.1/docker-compose.yml index dde47f9ea..ac4a72c47 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.1.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.1.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.1.3/Dockerfile index f1a022d6a..6760c932f 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.1.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.1.3/docker-compose.yml index dde47f9ea..5a24792ee 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.1.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.1.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.1.4/Dockerfile index f1a022d6a..803c8d7b9 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.1.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.1.4/docker-compose.yml index dde47f9ea..70621d6f6 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.1.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.1.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.1.5/Dockerfile index f1a022d6a..0fa67056f 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.1.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.1.5/docker-compose.yml index dde47f9ea..395564f89 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.1.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.1.5-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.1.7/Dockerfile index f1a022d6a..8ae4bcee7 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.7/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.7/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.1.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.1.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.1.7/docker-compose.yml index dde47f9ea..6f703066b 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.1.7/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.1.7/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.1.7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.1.7-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.10.0/Dockerfile index f1a022d6a..ec04d80bc 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.10.0/docker-compose.yml index dde47f9ea..5f8ec00c9 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.10.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.10.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.10.2/Dockerfile index f1a022d6a..bacb6c265 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.10.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.10.2/docker-compose.yml index dde47f9ea..e6b529517 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.10.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.10.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.10.3/Dockerfile index f1a022d6a..f18edb644 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.10.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.10.3/docker-compose.yml index dde47f9ea..eb4924c1f 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.10.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.10.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.10.4/Dockerfile index f1a022d6a..d1fae11ca 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.10.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.10.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.10.4/docker-compose.yml index dde47f9ea..0d5373d97 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.10.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.10.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.10.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.10.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.11.0/Dockerfile index f1a022d6a..da6b0a071 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.11.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.11.0/docker-compose.yml index dde47f9ea..2f20fb51f 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.11.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.11.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.11.1/Dockerfile index f1a022d6a..ff13e31b1 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.11.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.11.1/docker-compose.yml index dde47f9ea..053f6e515 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.11.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.11.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.11.2/Dockerfile index f1a022d6a..5b7845015 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.11.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.11.2/docker-compose.yml index dde47f9ea..ea307df02 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.11.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.11.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.11.3/Dockerfile index f1a022d6a..adaf479e0 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.11.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.11.3/docker-compose.yml index dde47f9ea..40b48e107 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.11.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.11.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.11.4/Dockerfile index f1a022d6a..e2e87d1de 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.11.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.11.4/docker-compose.yml index dde47f9ea..1bf0eb5d0 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.11.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.11.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.11.6/Dockerfile index f1a022d6a..f829eaa62 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.6/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.11.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.11.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.11.6/docker-compose.yml index dde47f9ea..3a2bb321d 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.11.6/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.11.6/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.11.6" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.11.6-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.2.0/Dockerfile index f1a022d6a..c82c7b82e 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.2.0/docker-compose.yml index dde47f9ea..3ecad7bbf 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.2.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.2.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.2.2/Dockerfile index f1a022d6a..e4f88de8c 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.2.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.2.2/docker-compose.yml index dde47f9ea..03edbc59e 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.2.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.2.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.2.4/Dockerfile index f1a022d6a..8cedfd704 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.2.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.2.4/docker-compose.yml index dde47f9ea..51c43d109 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.2.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.2.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.2.5/Dockerfile index f1a022d6a..76147f770 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.2.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.2.5/docker-compose.yml index dde47f9ea..ebd3f87ac 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.2.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.2.5-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.2.7/Dockerfile index f1a022d6a..413066b75 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.7/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.7/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.2.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.2.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.2.7/docker-compose.yml index dde47f9ea..e08431cc7 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.2.7/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.2.7/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.2.7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.2.7-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.3.0/Dockerfile index f1a022d6a..e4a2f6e2e 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.3.0/docker-compose.yml index dde47f9ea..34c8eb4e8 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.3.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.3.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.3.1/Dockerfile index f1a022d6a..b82c7ed73 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.3.1/docker-compose.yml index dde47f9ea..b40259c99 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.3.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.3.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.3.2/Dockerfile index f1a022d6a..8e7153d74 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.3.2/docker-compose.yml index dde47f9ea..c9823c8c1 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.3.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.3.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.3.3/Dockerfile index f1a022d6a..1e090e3f7 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.3.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.3.3/docker-compose.yml index dde47f9ea..b25da599e 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.3.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.3.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.3.5/Dockerfile index f1a022d6a..f3607a90e 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.3.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.3.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.3.5/docker-compose.yml index dde47f9ea..a8bd85178 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.3.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.3.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.3.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.3.5-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.4.0/Dockerfile index f1a022d6a..fea88c9f5 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.4.0/docker-compose.yml index dde47f9ea..d4c56ef0a 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.4.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.4.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.4.1/Dockerfile index f1a022d6a..bb50144a5 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.4.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.4.1/docker-compose.yml index dde47f9ea..a14845a21 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.4.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.4.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.4.3/Dockerfile index f1a022d6a..24e314d4f 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.4.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.4.3/docker-compose.yml index dde47f9ea..2d1572fe4 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.4.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.4.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.4.5/Dockerfile index f1a022d6a..3163ce1cd 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.4.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.4.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.4.5/docker-compose.yml index dde47f9ea..2a89eceb8 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.4.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.4.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.4.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.4.5-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.5.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.5.0/Dockerfile index f1a022d6a..945531991 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.5.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.5.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.5.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.5.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.5.0/docker-compose.yml index dde47f9ea..28d02dcdf 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.5.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.5.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.5.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.5.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.5.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.5.1/Dockerfile index f1a022d6a..4406e8d27 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.5.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.5.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.5.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.5.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.5.1/docker-compose.yml index dde47f9ea..ab4e6e94a 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.5.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.5.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.5.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.5.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.6.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.6.0/Dockerfile index f1a022d6a..a8e9fa2bd 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.6.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.6.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.6.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.6.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.6.0/docker-compose.yml index dde47f9ea..fa32902ce 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.6.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.6.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.6.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.6.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.6.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.6.1/Dockerfile index f1a022d6a..7f529ef3f 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.6.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.6.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.6.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.6.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.6.1/docker-compose.yml index dde47f9ea..352e06336 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.6.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.6.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.6.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.6.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.7.0/Dockerfile index f1a022d6a..b81ad640a 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.7.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.7.0/docker-compose.yml index dde47f9ea..bc6649c78 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.7.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.7.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.7.1/Dockerfile index f1a022d6a..9ba4c0539 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.7.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.7.1/docker-compose.yml index dde47f9ea..e18ec26db 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.7.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.7.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.7.2/Dockerfile index f1a022d6a..dcd4db38c 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.7.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.7.2/docker-compose.yml index dde47f9ea..9f3078b66 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.7.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.7.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.7.3/Dockerfile index f1a022d6a..2826d0233 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.7.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.7.3/docker-compose.yml index dde47f9ea..2c552e74a 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.7.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.7.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.7.4/Dockerfile index f1a022d6a..6dcb1b132 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.7.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.7.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.7.4/docker-compose.yml index dde47f9ea..85acdf687 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.7.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.7.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.7.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.7.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.8.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.8.0/Dockerfile index f1a022d6a..c76e7a416 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.8.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.8.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.8.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.8.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.8.0/docker-compose.yml index dde47f9ea..42a46bd0e 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.8.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.8.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.8.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.8.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.8.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.8.1/Dockerfile index f1a022d6a..abc221fd9 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.8.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.8.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.8.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.8.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.8.1/docker-compose.yml index dde47f9ea..9980b04dc 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.8.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.8.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.8.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.8.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.9.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.9.1/Dockerfile index f1a022d6a..3f9828248 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.9.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.9.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.9.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.9.1/docker-compose.yml index dde47f9ea..bdd2a85d8 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.9.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.9.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.9.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.9.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.9.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/3/3.9.2/Dockerfile index f1a022d6a..7c0ef3562 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.9.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/3/3.9.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=3.9.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz ################################################################## # Setup @@ -30,15 +30,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-stash-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/3/3.9.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/3/3.9.2/docker-compose.yml index dde47f9ea..d0d96d157 100644 --- a/linux/ecosystem/atlassian/bitbucket/3/3.9.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/3/3.9.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:3.9.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:3.9.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.0.1/Dockerfile index f1a022d6a..765c08923 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.0.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.0.1/docker-compose.yml index dde47f9ea..eccce07aa 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.0.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.0.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.0.2/Dockerfile index f1a022d6a..a39fafc26 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.0.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.0.2/docker-compose.yml index dde47f9ea..32678897a 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.0.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.0.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.0.3/Dockerfile index f1a022d6a..681025849 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.0.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.0.3/docker-compose.yml index dde47f9ea..0656abb99 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.0.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.0.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.0.4/Dockerfile index f1a022d6a..b7904850a 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.0.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.0.4/docker-compose.yml index dde47f9ea..e4f78e4ea 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.0.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.0.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.0.6/Dockerfile index f1a022d6a..d677c383d 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.6/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.0.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.0.6/docker-compose.yml index dde47f9ea..c4c6a75a4 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.6/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.6/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.0.6" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.0.6-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.0.7/Dockerfile index f1a022d6a..2bf480161 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.7/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.7/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.0.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.0.7/docker-compose.yml index dde47f9ea..851019727 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.7/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.7/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.0.7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.0.7-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.0.8/Dockerfile index f1a022d6a..c55176259 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.8/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.8/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.0.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.0.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.0.8/docker-compose.yml index dde47f9ea..659a08000 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.0.8/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.0.8/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.0.8" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.0.8-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.1.0/Dockerfile index f1a022d6a..52434a84d 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.1.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.1.0/docker-compose.yml index dde47f9ea..c91d04404 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.1.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.1.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.1.3/Dockerfile index f1a022d6a..3092efab1 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.1.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.1.3/docker-compose.yml index dde47f9ea..b69530308 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.1.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.1.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.1.4/Dockerfile index f1a022d6a..8a26b14d7 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.1.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.1.4/docker-compose.yml index dde47f9ea..68d5ed38d 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.1.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.1.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.1.6/Dockerfile index f1a022d6a..f6f8eba51 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.6/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.1.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.1.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.1.6/docker-compose.yml index dde47f9ea..dbd928bbf 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.1.6/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.1.6/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.1.6" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.1.6-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.10.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.10.0/Dockerfile index f1a022d6a..12c858c44 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.10.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.10.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.10.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.10.0/docker-compose.yml index dde47f9ea..31432046e 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.10.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.10.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.10.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.10.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.10.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.10.1/Dockerfile index f1a022d6a..3134209e6 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.10.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.10.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.10.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.10.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.10.1/docker-compose.yml index dde47f9ea..503a53caa 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.10.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.10.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.10.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.10.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.10.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.10.2/Dockerfile index f1a022d6a..83e101fd0 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.10.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.10.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.10.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.10.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.10.2/docker-compose.yml index dde47f9ea..5c9f4aa4a 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.10.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.10.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.10.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.10.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.11.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.11.1/Dockerfile index f1a022d6a..fc020c24e 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.11.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.11.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.11.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.11.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.11.1/docker-compose.yml index dde47f9ea..0dfaa9eae 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.11.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.11.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.11.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.11.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.11.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.11.2/Dockerfile index f1a022d6a..4787fa1db 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.11.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.11.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.11.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.11.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.11.2/docker-compose.yml index dde47f9ea..7ac41942f 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.11.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.11.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.11.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.11.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.12.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.12.0/Dockerfile index f1a022d6a..e9cbf9014 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.12.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.12.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.12.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.12.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.12.0/docker-compose.yml index dde47f9ea..3d83f8645 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.12.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.12.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.12.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.12.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.12.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.12.1/Dockerfile index f1a022d6a..5af9889f9 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.12.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.12.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.12.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.12.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.12.1/docker-compose.yml index dde47f9ea..751160dd1 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.12.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.12.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.12.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.12.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.13.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.13.0/Dockerfile index f1a022d6a..71a5371d0 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.13.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.13.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.13.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.13.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.13.0/docker-compose.yml index dde47f9ea..c3a7a4eba 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.13.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.13.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.13.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.13.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.13.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.13.1/Dockerfile index f1a022d6a..faaea2b4b 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.13.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.13.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.13.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.13.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.13.1/docker-compose.yml index dde47f9ea..9e8983a77 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.13.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.13.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.13.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.13.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.0/Dockerfile index f1a022d6a..7be7107a6 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.0/docker-compose.yml index dde47f9ea..f3f6fc36c 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.1/Dockerfile index f1a022d6a..bf4baf76a 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.1/docker-compose.yml index dde47f9ea..ec1c57e46 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.10/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.10/Dockerfile index f1a022d6a..c0f10dd75 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.10/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.10/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.10/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.10/docker-compose.yml index dde47f9ea..15bc9acab 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.10/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.10/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.10" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.10-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.11/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.11/Dockerfile index f1a022d6a..e5dfe2669 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.11/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.11/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.11/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.11/docker-compose.yml index dde47f9ea..fd1d1f3db 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.11/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.11/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.11" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.11-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.12/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.12/Dockerfile index f1a022d6a..7afa24238 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.12/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.12/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.12/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.12/docker-compose.yml index dde47f9ea..2ee5a3d90 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.12/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.12/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.12" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.12-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.2/Dockerfile index f1a022d6a..88aea54dd 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.2/docker-compose.yml index dde47f9ea..a22fade17 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.3/Dockerfile index f1a022d6a..06b81068b 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.3/docker-compose.yml index dde47f9ea..33dd6d83c 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.4/Dockerfile index f1a022d6a..5b06e9e85 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.4/docker-compose.yml index dde47f9ea..3f988ec4b 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.5/Dockerfile index f1a022d6a..ef0fa95d4 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.5/docker-compose.yml index dde47f9ea..9956d9900 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.5-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.6/Dockerfile index f1a022d6a..4a80f3b1a 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.6/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.6/docker-compose.yml index dde47f9ea..af2f27731 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.6/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.6/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.6" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.6-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.7/Dockerfile index f1a022d6a..403938eb4 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.7/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.7/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.7/docker-compose.yml index dde47f9ea..5f1a5431a 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.7/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.7/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.7" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.7-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.8/Dockerfile index f1a022d6a..7955ebf80 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.8/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.8/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.8/docker-compose.yml index dde47f9ea..b1b1544b8 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.8/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.8/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.8" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.8-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.14.9/Dockerfile index f1a022d6a..b01ffb206 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.9/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.9/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.14.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.14.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.14.9/docker-compose.yml index dde47f9ea..7c6f67a78 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.14.9/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.14.9/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.14.9" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.14.9-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.2.0/Dockerfile index f1a022d6a..bcdefc0f1 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.2.0/docker-compose.yml index dde47f9ea..099db284d 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.2.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.2.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.2.1/Dockerfile index f1a022d6a..a4dfe1c48 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.2.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.2.1/docker-compose.yml index dde47f9ea..37938be8f 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.2.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.2.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.2.2/Dockerfile index f1a022d6a..eeab075cd 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.2.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.2.2/docker-compose.yml index dde47f9ea..c0f754afe 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.2.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.2.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.2.3/Dockerfile index f1a022d6a..b711a190e 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.2.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.2.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.2.3/docker-compose.yml index dde47f9ea..f54b2b77c 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.2.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.2.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.2.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.2.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.3.0/Dockerfile index f1a022d6a..8774ab3d9 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.3.0/docker-compose.yml index dde47f9ea..5ff38b3ef 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.3.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.3.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.3.1/Dockerfile index f1a022d6a..454827f9d 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.3.1/docker-compose.yml index dde47f9ea..c0b0b1156 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.3.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.3.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.3.2/Dockerfile index f1a022d6a..0266e7a31 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.3.2/docker-compose.yml index dde47f9ea..8f5acd7a7 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.3.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.3.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.3.3/Dockerfile index f1a022d6a..0feaf9fa8 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.3.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.3.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.3.3/docker-compose.yml index dde47f9ea..54064f600 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.3.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.3.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.3.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.3.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.4.0/Dockerfile index f1a022d6a..c87a6a169 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.4.0/docker-compose.yml index dde47f9ea..ae5cbf8fb 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.4.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.4.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.4.1/Dockerfile index f1a022d6a..e8200428b 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.4.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.4.1/docker-compose.yml index dde47f9ea..61b12108e 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.4.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.4.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.4.2/Dockerfile index f1a022d6a..96c673768 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.4.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.4.2/docker-compose.yml index dde47f9ea..e3918580c 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.4.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.4.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.4.4/Dockerfile index f1a022d6a..fc8f5008d 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.4.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.4.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.4.4/docker-compose.yml index dde47f9ea..f4217309f 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.4.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.4.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.4.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.4.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.5.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.5.1/Dockerfile index f1a022d6a..bdf5e14cc 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.5.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.5.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.5.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.5.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.5.1/docker-compose.yml index dde47f9ea..03232b4ee 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.5.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.5.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.5.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.5.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.5.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.5.2/Dockerfile index f1a022d6a..236a34763 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.5.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.5.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.5.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.5.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.5.2/docker-compose.yml index dde47f9ea..8e42d6003 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.5.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.5.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.5.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.5.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.5.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.5.3/Dockerfile index f1a022d6a..4eebb64e1 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.5.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.5.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.5.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.5.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.5.3/docker-compose.yml index dde47f9ea..f9b36c710 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.5.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.5.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.5.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.5.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.6.0/Dockerfile index f1a022d6a..e5633d21b 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.6.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.6.0/docker-compose.yml index dde47f9ea..138bb6cb1 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.6.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.6.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.6.1/Dockerfile index f1a022d6a..aeee0434c 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.6.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.6.1/docker-compose.yml index dde47f9ea..9a248cf3c 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.6.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.6.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.6.2/Dockerfile index f1a022d6a..f80b4e8a6 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.6.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.6.2/docker-compose.yml index dde47f9ea..f4931d2d6 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.6.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.6.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.6.3/Dockerfile index f1a022d6a..b993597d4 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.6.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.6.3/docker-compose.yml index dde47f9ea..1efd4778c 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.6.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.6.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.6.4/Dockerfile index f1a022d6a..4bf4563c2 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.6.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.6.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.6.4/docker-compose.yml index dde47f9ea..3005dc3de 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.6.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.6.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.6.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.6.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.7.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.7.1/Dockerfile index f1a022d6a..ddd672bcd 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.7.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.7.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.7.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.7.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.7.1/docker-compose.yml index dde47f9ea..0ceeb53cd 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.7.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.7.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.7.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.7.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.7.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.7.2/Dockerfile index f1a022d6a..9a9aebd8a 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.7.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.7.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.7.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.7.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.7.2/docker-compose.yml index dde47f9ea..a3f7b7d59 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.7.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.7.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.7.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.7.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.8.0/Dockerfile index f1a022d6a..ef9a493f4 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.8.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.8.0/docker-compose.yml index dde47f9ea..809bbd257 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.8.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.8.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.8.1/Dockerfile index f1a022d6a..7edda0761 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.8.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.8.1/docker-compose.yml index dde47f9ea..5e4851425 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.8.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.8.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.8.2/Dockerfile index f1a022d6a..c97a8692d 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.2/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.8.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.8.2/docker-compose.yml index dde47f9ea..159106199 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.2/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.8.2" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.8.2-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.8.3/Dockerfile index f1a022d6a..7a123b829 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.3/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.8.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.8.3/docker-compose.yml index dde47f9ea..3abb1ec3b 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.3/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.8.3" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.8.3-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.8.4/Dockerfile index f1a022d6a..551095fd6 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.4/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.8.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.8.4/docker-compose.yml index dde47f9ea..6cb14ebf6 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.4/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.8.4" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.8.4-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.8.5/Dockerfile index f1a022d6a..6076067d8 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.5/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.8.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.8.5/docker-compose.yml index dde47f9ea..86dc60f0c 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.5/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.8.5" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.8.5-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.8.6/Dockerfile index f1a022d6a..f1dc29ed7 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.6/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.8.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.8.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.8.6/docker-compose.yml index dde47f9ea..dac3944a5 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.8.6/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.8.6/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.8.6" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.8.6-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.9.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.9.0/Dockerfile index f1a022d6a..4cd52a346 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.9.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.9.0/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.9.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.9.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.9.0/docker-compose.yml index dde47f9ea..eacee17e9 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.9.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.9.0/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.9.0" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.9.0-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.9.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/4/4.9.1/Dockerfile index f1a022d6a..cb430a875 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.9.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/4/4.9.1/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=4.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -18,7 +18,6 @@ ENV RUN_GROUP daemon # https://confluence.atlassian.com/display/BitbucketServer/Bitbucket+Server+home+directory ENV BITBUCKET_HOME /var/atlassian/application-data/bitbucket ENV BITBUCKET_INSTALL_DIR /opt/atlassian/bitbucket -ENV STASH_HOME=${BITBUCKET_HOME} VOLUME ["${BITBUCKET_HOME}"] WORKDIR $BITBUCKET_HOME @@ -30,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/4/4.9.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/4/4.9.1/docker-compose.yml index dde47f9ea..d6bda4e55 100644 --- a/linux/ecosystem/atlassian/bitbucket/4/4.9.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/4/4.9.1/docker-compose.yml @@ -1,16 +1,10 @@ #version: '3' services: app: - image: "epicmorg/bitbucket:${RELEASE}" + image: "epicmorg/bitbucket:4.9.1" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk8: - image: "epicmorg/bitbucket:${RELEASE}-jdk8" + image: "epicmorg/bitbucket:4.9.1-jdk8" build: - context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} \ No newline at end of file + context: . \ No newline at end of file diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/template.stash.2.env.j2 b/linux/ecosystem/atlassian/bitbucket/5/5.0.10/.env similarity index 51% rename from bin/ansible/roles/atlassian.bitbucket/templates/template.stash.2.env.j2 rename to linux/ecosystem/atlassian/bitbucket/5/5.0.10/.env index 29bd4caa3..3e84a22e7 100644 --- a/bin/ansible/roles/atlassian.bitbucket/templates/template.stash.2.env.j2 +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.10/.env @@ -1,2 +1,2 @@ -RELEASE={{ item }} -DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz +RELEASE=5.0.10 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.jdk8 b/linux/ecosystem/atlassian/bitbucket/5/5.0.10/Dockerfile similarity index 80% rename from bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.jdk8 rename to linux/ecosystem/atlassian/bitbucket/5/5.0.10/Dockerfile index f677f4ec5..1357606aa 100644 --- a/bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.jdk8 +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.10/Dockerfile @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=5.0.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -29,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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-get clean -y && \ apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.10/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.0.10/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.10/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.0.10/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.0.10/docker-compose.yml new file mode 100644 index 000000000..b4b1dd7f6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.10/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.0.10" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.0.10-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.0.10/entrypoint.sh similarity index 100% rename from linux/ecosystem/atlassian/bitbucket/6/6.5.0/entrypoint.sh rename to linux/ecosystem/atlassian/bitbucket/5/5.0.10/entrypoint.sh diff --git a/bin/ansible/roles/atlassian.bitbucket/templates/template.stash.3.env.j2 b/linux/ecosystem/atlassian/bitbucket/5/5.0.2/.env similarity index 51% rename from bin/ansible/roles/atlassian.bitbucket/templates/template.stash.3.env.j2 rename to linux/ecosystem/atlassian/bitbucket/5/5.0.2/.env index 29bd4caa3..43f6816d7 100644 --- a/bin/ansible/roles/atlassian.bitbucket/templates/template.stash.3.env.j2 +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.2/.env @@ -1,2 +1,2 @@ -RELEASE={{ item }} -DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-stash-${RELEASE}.tar.gz +RELEASE=5.0.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.0.2/Dockerfile new file mode 100644 index 000000000..dd2b9aa3f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.0.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.0.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.0.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.0.2/docker-compose.yml new file mode 100644 index 000000000..1bf7e13ba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.0.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.0.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.0.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.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/5/5.0.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.0.4/.env new file mode 100644 index 000000000..c3bb0c557 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.0.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.0.4/Dockerfile new file mode 100644 index 000000000..d86066aa2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.0.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.0.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.0.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.0.4/docker-compose.yml new file mode 100644 index 000000000..c4bc42952 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.0.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.0.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.0.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.4/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/5/5.0.5/.env b/linux/ecosystem/atlassian/bitbucket/5/5.0.5/.env new file mode 100644 index 000000000..d43e51773 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.5/.env @@ -0,0 +1,2 @@ +RELEASE=5.0.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.0.5/Dockerfile new file mode 100644 index 000000000..d6dc6d424 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.0.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.5/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.0.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.0.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.0.5/docker-compose.yml new file mode 100644 index 000000000..f398071ef --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.5/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.0.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.0.5-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.0.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.5/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/5/5.0.6/.env b/linux/ecosystem/atlassian/bitbucket/5/5.0.6/.env new file mode 100644 index 000000000..76350aa73 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.6/.env @@ -0,0 +1,2 @@ +RELEASE=5.0.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.0.6/Dockerfile new file mode 100644 index 000000000..544074de7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.0.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.6/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.0.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.0.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.0.6/docker-compose.yml new file mode 100644 index 000000000..f013370d9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.6/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.0.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.0.6-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.0.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.6/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/5/5.0.7/.env b/linux/ecosystem/atlassian/bitbucket/5/5.0.7/.env new file mode 100644 index 000000000..480424f46 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.7/.env @@ -0,0 +1,2 @@ +RELEASE=5.0.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.0.7/Dockerfile new file mode 100644 index 000000000..6f3f46018 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.0.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.7/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.0.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.0.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.0.7/docker-compose.yml new file mode 100644 index 000000000..8f695bd7f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.7/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.0.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.0.7-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.0.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.7/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/5/5.0.8/.env b/linux/ecosystem/atlassian/bitbucket/5/5.0.8/.env new file mode 100644 index 000000000..19aaceee6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.8/.env @@ -0,0 +1,2 @@ +RELEASE=5.0.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.0.8/Dockerfile new file mode 100644 index 000000000..1d9564025 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.0.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.8/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.0.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.0.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.0.8/docker-compose.yml new file mode 100644 index 000000000..d4e7ff5ba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.8/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.0.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.0.8-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.0.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.8/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/5/5.0.9/.env b/linux/ecosystem/atlassian/bitbucket/5/5.0.9/.env new file mode 100644 index 000000000..a7d43e362 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.9/.env @@ -0,0 +1,2 @@ +RELEASE=5.0.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.0.9/Dockerfile new file mode 100644 index 000000000..8cc97a9f4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.0.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.9/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.0.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.0.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.0.9/docker-compose.yml new file mode 100644 index 000000000..021ff05cc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.9/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.0.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.0.9-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.0.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.0.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.0.9/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/5/5.1.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.1.1/.env new file mode 100644 index 000000000..5f5e5cd2d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.1.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.1.1/Dockerfile new file mode 100644 index 000000000..2eba8a25a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.1.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.1.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.1.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.1.1/docker-compose.yml new file mode 100644 index 000000000..0bdb02744 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.1.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.1.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.1.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.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/5/5.1.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.1.2/.env new file mode 100644 index 000000000..83be28f76 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.1.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.1.2/Dockerfile new file mode 100644 index 000000000..17886c9e7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.1.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.1.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.1.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.1.2/docker-compose.yml new file mode 100644 index 000000000..c2134312e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.1.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.1.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.1.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.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/5/5.1.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.1.3/.env new file mode 100644 index 000000000..7f373a63c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.1.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.1.3/Dockerfile new file mode 100644 index 000000000..cdf58d834 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.1.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.1.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.1.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.1.3/docker-compose.yml new file mode 100644 index 000000000..d88318d54 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.1.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.1.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.1.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.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/5/5.1.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.1.4/.env new file mode 100644 index 000000000..333d786e1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.1.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.1.4/Dockerfile new file mode 100644 index 000000000..e85811a28 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.1.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.1.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.1.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.1.4/docker-compose.yml new file mode 100644 index 000000000..a979ce754 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.1.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.1.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.1.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.4/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/5/5.1.5/.env b/linux/ecosystem/atlassian/bitbucket/5/5.1.5/.env new file mode 100644 index 000000000..ceb2299e4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.5/.env @@ -0,0 +1,2 @@ +RELEASE=5.1.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.1.5/Dockerfile new file mode 100644 index 000000000..d45b32ba9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.1.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.5/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.1.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.1.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.1.5/docker-compose.yml new file mode 100644 index 000000000..59e0824db --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.5/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.1.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.1.5-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.1.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.5/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/5/5.1.6/.env b/linux/ecosystem/atlassian/bitbucket/5/5.1.6/.env new file mode 100644 index 000000000..02de80387 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.6/.env @@ -0,0 +1,2 @@ +RELEASE=5.1.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.1.6/Dockerfile new file mode 100644 index 000000000..1340ca090 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.1.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.6/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.1.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.1.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.1.6/docker-compose.yml new file mode 100644 index 000000000..ea9f293f6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.6/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.1.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.1.6-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.1.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.6/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/5/5.1.7/.env b/linux/ecosystem/atlassian/bitbucket/5/5.1.7/.env new file mode 100644 index 000000000..8379c3b81 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.7/.env @@ -0,0 +1,2 @@ +RELEASE=5.1.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.1.7/Dockerfile new file mode 100644 index 000000000..e2b0d761e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.1.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.7/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.1.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.1.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.1.7/docker-compose.yml new file mode 100644 index 000000000..610b215da --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.7/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.1.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.1.7-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.1.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.7/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/5/5.1.8/.env b/linux/ecosystem/atlassian/bitbucket/5/5.1.8/.env new file mode 100644 index 000000000..9261cc87b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.8/.env @@ -0,0 +1,2 @@ +RELEASE=5.1.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.1.8/Dockerfile new file mode 100644 index 000000000..d9087ba3e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.1.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.8/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.1.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.1.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.1.8/docker-compose.yml new file mode 100644 index 000000000..e0a7d7a7b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.8/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.1.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.1.8-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.1.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.8/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/5/5.1.9/.env b/linux/ecosystem/atlassian/bitbucket/5/5.1.9/.env new file mode 100644 index 000000000..ab31a166c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.9/.env @@ -0,0 +1,2 @@ +RELEASE=5.1.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.1.9/Dockerfile new file mode 100644 index 000000000..3246a1e5e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.1.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.9/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.1.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.1.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.1.9/docker-compose.yml new file mode 100644 index 000000000..47ba5659c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.9/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.1.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.1.9-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.1.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.1.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.1.9/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/5/5.10.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.10.0/.env new file mode 100644 index 000000000..0e6158500 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.10.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.10.0/Dockerfile new file mode 100644 index 000000000..4d93b4dc1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.10.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.10.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.10.0/docker-compose.yml new file mode 100644 index 000000000..f69e89e27 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.10.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.10.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.10.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.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/5/5.10.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.10.1/.env new file mode 100644 index 000000000..5ddd5d8d1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.10.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.10.1/Dockerfile new file mode 100644 index 000000000..0adf4f2f6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.10.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.10.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.10.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.10.1/docker-compose.yml new file mode 100644 index 000000000..1f038b300 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.10.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.10.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.10.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.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/5/5.10.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.10.2/.env new file mode 100644 index 000000000..8a8ee5eca --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.10.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.10.2/Dockerfile new file mode 100644 index 000000000..5d382887a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.10.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.10.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.10.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.10.2/docker-compose.yml new file mode 100644 index 000000000..88029c6ff --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.10.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.10.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.10.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.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/5/5.10.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.10.3/.env new file mode 100644 index 000000000..eb1e1de4e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.10.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.10.3/Dockerfile new file mode 100644 index 000000000..10a5afb48 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.10.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.10.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.10.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.10.3/docker-compose.yml new file mode 100644 index 000000000..7931a5a14 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.10.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.10.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.10.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.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/5/5.10.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.10.4/.env new file mode 100644 index 000000000..289b5b717 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.10.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.10.4/Dockerfile new file mode 100644 index 000000000..aa554c215 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.10.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.10.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.10.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.10.4/docker-compose.yml new file mode 100644 index 000000000..5e8e1614b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.10.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.10.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.10.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.10.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.10.4/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/5/5.11.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.11.1/.env new file mode 100644 index 000000000..db3cf3d66 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.11.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.11.1/Dockerfile new file mode 100644 index 000000000..a0b2f6f1c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.11.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.11.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.11.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.11.1/docker-compose.yml new file mode 100644 index 000000000..2081a505a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.11.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.11.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.11.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.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/5/5.11.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.11.2/.env new file mode 100644 index 000000000..4281c86b6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.11.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.11.2/Dockerfile new file mode 100644 index 000000000..0fde583d0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.11.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.11.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.11.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.11.2/docker-compose.yml new file mode 100644 index 000000000..8beb8066c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.11.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.11.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.11.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.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/5/5.11.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.11.3/.env new file mode 100644 index 000000000..e86fb583d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.11.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.11.3/Dockerfile new file mode 100644 index 000000000..ea9cf5dd1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.11.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.11.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.11.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.11.3/docker-compose.yml new file mode 100644 index 000000000..751487dd1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.11.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.11.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.11.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.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/5/5.11.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.11.4/.env new file mode 100644 index 000000000..a59994e67 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.11.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.11.4/Dockerfile new file mode 100644 index 000000000..a60ee776d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.11.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.11.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.11.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.11.4/docker-compose.yml new file mode 100644 index 000000000..91b181f59 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.11.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.11.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.11.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.11.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.11.4/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/5/5.12.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.12.0/.env new file mode 100644 index 000000000..691a04742 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.12.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.12.0/Dockerfile new file mode 100644 index 000000000..04d225380 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.12.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.12.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.12.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.12.0/docker-compose.yml new file mode 100644 index 000000000..101c4f827 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.12.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.12.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.12.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.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/5/5.12.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.12.1/.env new file mode 100644 index 000000000..d314cde82 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.12.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.12.1/Dockerfile new file mode 100644 index 000000000..ee506fb65 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.12.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.12.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.12.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.12.1/docker-compose.yml new file mode 100644 index 000000000..bdba45aec --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.12.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.12.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.12.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.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/5/5.12.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.12.2/.env new file mode 100644 index 000000000..5c9e707c6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.12.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.12.2/Dockerfile new file mode 100644 index 000000000..78b654a97 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.12.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.12.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.12.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.12.2/docker-compose.yml new file mode 100644 index 000000000..2b2498285 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.12.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.12.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.12.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.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/5/5.12.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.12.3/.env new file mode 100644 index 000000000..32b11c706 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.12.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.12.3/Dockerfile new file mode 100644 index 000000000..180890f65 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.12.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.12.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.12.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.12.3/docker-compose.yml new file mode 100644 index 000000000..a063b31e9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.12.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.12.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.12.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.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/5/5.12.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.12.4/.env new file mode 100644 index 000000000..1e8d716d5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.12.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.12.4/Dockerfile new file mode 100644 index 000000000..a63206ff6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.12.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.12.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.12.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.12.4/docker-compose.yml new file mode 100644 index 000000000..81df05422 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.12.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.12.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.12.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.12.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.12.4/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/5/5.13.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.13.0/.env new file mode 100644 index 000000000..2a84ce565 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.13.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.13.0/Dockerfile new file mode 100644 index 000000000..60545aa5d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.13.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.13.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.13.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.13.0/docker-compose.yml new file mode 100644 index 000000000..05acacdb0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.13.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.13.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.13.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.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/5/5.13.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.13.1/.env new file mode 100644 index 000000000..fc5141cd8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.13.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.13.1/Dockerfile new file mode 100644 index 000000000..5b3fdc5ac --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.13.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.13.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.13.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.13.1/docker-compose.yml new file mode 100644 index 000000000..d4191c85a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.13.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.13.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.13.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.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/5/5.13.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.13.3/.env new file mode 100644 index 000000000..2131c69f2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.13.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.13.3/Dockerfile new file mode 100644 index 000000000..14f5d2f85 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.13.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.13.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.13.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.13.3/docker-compose.yml new file mode 100644 index 000000000..455937b37 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.13.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.13.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.13.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.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/5/5.13.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.13.4/.env new file mode 100644 index 000000000..0e1dc70bf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.13.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.13.4/Dockerfile new file mode 100644 index 000000000..4c7e5b2bd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.13.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.13.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.13.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.13.4/docker-compose.yml new file mode 100644 index 000000000..5be237571 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.13.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.13.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.13.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.4/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/5/5.13.5/.env b/linux/ecosystem/atlassian/bitbucket/5/5.13.5/.env new file mode 100644 index 000000000..304d82526 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.5/.env @@ -0,0 +1,2 @@ +RELEASE=5.13.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.13.5/Dockerfile new file mode 100644 index 000000000..939ac4d73 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.13.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.5/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.13.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.13.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.13.5/docker-compose.yml new file mode 100644 index 000000000..633424455 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.5/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.13.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.13.5-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.13.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.5/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/5/5.13.6/.env b/linux/ecosystem/atlassian/bitbucket/5/5.13.6/.env new file mode 100644 index 000000000..14727af4f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.6/.env @@ -0,0 +1,2 @@ +RELEASE=5.13.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.13.6/Dockerfile new file mode 100644 index 000000000..d2998aae7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.13.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.6/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.13.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.13.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.13.6/docker-compose.yml new file mode 100644 index 000000000..60b75cdb6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.6/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.13.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.13.6-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.13.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.13.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.13.6/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/5/5.14.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.14.0/.env new file mode 100644 index 000000000..eeb7925f5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.14.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.14.0/Dockerfile new file mode 100644 index 000000000..9b643de30 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.14.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.14.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.14.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.14.0/docker-compose.yml new file mode 100644 index 000000000..50073de26 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.14.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.14.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.14.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.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/5/5.14.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.14.1/.env new file mode 100644 index 000000000..32eb62e87 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.14.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.14.1/Dockerfile new file mode 100644 index 000000000..44a07c26d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.14.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.14.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.14.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.14.1/docker-compose.yml new file mode 100644 index 000000000..dd8927f08 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.14.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.14.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.14.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.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/5/5.14.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.14.2/.env new file mode 100644 index 000000000..751364a09 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.14.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.14.2/Dockerfile new file mode 100644 index 000000000..f5f2126fb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.14.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.14.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.14.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.14.2/docker-compose.yml new file mode 100644 index 000000000..16d4b185e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.14.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.14.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.14.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.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/5/5.14.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.14.3/.env new file mode 100644 index 000000000..b8a0c51e1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.14.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.14.3/Dockerfile new file mode 100644 index 000000000..afef31165 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.14.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.14.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.14.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.14.3/docker-compose.yml new file mode 100644 index 000000000..8475ba924 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.14.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.14.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.14.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.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/5/5.14.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.14.4/.env new file mode 100644 index 000000000..d9236d15f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.14.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.14.4/Dockerfile new file mode 100644 index 000000000..89315b2da --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.14.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.14.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.14.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.14.4/docker-compose.yml new file mode 100644 index 000000000..49a4cc39b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.14.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.14.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.14.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.14.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.14.4/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/5/5.15.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.15.0/.env new file mode 100644 index 000000000..5e1bdd29a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.15.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.15.0/Dockerfile new file mode 100644 index 000000000..dd8833451 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.15.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.15.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.15.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.15.0/docker-compose.yml new file mode 100644 index 000000000..d3c42b865 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.15.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.15.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.15.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.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/5/5.15.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.15.1/.env new file mode 100644 index 000000000..4dbcf5230 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.15.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.15.1/Dockerfile new file mode 100644 index 000000000..8e943b1a4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.15.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.15.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.15.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.15.1/docker-compose.yml new file mode 100644 index 000000000..0dbb92b97 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.15.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.15.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.15.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.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/5/5.15.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.15.2/.env new file mode 100644 index 000000000..d4f77bc81 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.15.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.15.2/Dockerfile new file mode 100644 index 000000000..e4d4d79b9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.15.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.15.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.15.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.15.2/docker-compose.yml new file mode 100644 index 000000000..5f910b94b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.15.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.15.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.15.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.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/5/5.15.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.15.3/.env new file mode 100644 index 000000000..c1c0065f3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.15.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.15.3/Dockerfile new file mode 100644 index 000000000..4d9cf6eaf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.15.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.15.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.15.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.15.3/docker-compose.yml new file mode 100644 index 000000000..02515c0de --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.15.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.15.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.15.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.15.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.15.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/5/5.16.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.0/.env new file mode 100644 index 000000000..5e455a5f5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.0/Dockerfile new file mode 100644 index 000000000..8ac29aba0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.0/docker-compose.yml new file mode 100644 index 000000000..f933a1d72 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.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/5/5.16.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.1/.env new file mode 100644 index 000000000..a5bf7512b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.1/Dockerfile new file mode 100644 index 000000000..79f6e6495 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.1/docker-compose.yml new file mode 100644 index 000000000..032955264 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.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/5/5.16.10/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.10/.env new file mode 100644 index 000000000..20e647117 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.10/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.10 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.10/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.10/Dockerfile new file mode 100644 index 000000000..a50d95ca5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.10/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.10/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.10/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.10/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.10/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.10/docker-compose.yml new file mode 100644 index 000000000..dc9989af9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.10/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.10" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.10-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.10/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.10/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.10/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/5/5.16.11/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.11/.env new file mode 100644 index 000000000..a941bc30f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.11/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.11 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.11/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.11/Dockerfile new file mode 100644 index 000000000..75e689a40 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.11/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.11/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.11/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.11/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.11/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.11/docker-compose.yml new file mode 100644 index 000000000..89f71a699 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.11/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.11" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.11-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.11/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.11/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.11/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/5/5.16.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.2/.env new file mode 100644 index 000000000..ad7ce60d3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.2/Dockerfile new file mode 100644 index 000000000..2134c914b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.2/docker-compose.yml new file mode 100644 index 000000000..24f5f1f82 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.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/5/5.16.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.3/.env new file mode 100644 index 000000000..870340dae --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.3/Dockerfile new file mode 100644 index 000000000..ad896ec35 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.3/docker-compose.yml new file mode 100644 index 000000000..b140d4adc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.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/5/5.16.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.4/.env new file mode 100644 index 000000000..5bc49eb80 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.4/Dockerfile new file mode 100644 index 000000000..dd416b1ee --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.4/docker-compose.yml new file mode 100644 index 000000000..5ac6abe2e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.4/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/5/5.16.5/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.5/.env new file mode 100644 index 000000000..7b1a45eea --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.5/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.5/Dockerfile new file mode 100644 index 000000000..6745c010e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.5/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.5/docker-compose.yml new file mode 100644 index 000000000..537c57a8f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.5/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.5-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.5/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/5/5.16.6/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.6/.env new file mode 100644 index 000000000..3679a41f2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.6/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.6/Dockerfile new file mode 100644 index 000000000..c1f345594 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.6/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.6/docker-compose.yml new file mode 100644 index 000000000..a680c1af2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.6/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.6-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.6/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/5/5.16.7/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.7/.env new file mode 100644 index 000000000..7b8e1c737 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.7/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.7/Dockerfile new file mode 100644 index 000000000..166b0472d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.7/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.7/docker-compose.yml new file mode 100644 index 000000000..75ae3b0fc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.7/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.7-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.7/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/5/5.16.8/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.8/.env new file mode 100644 index 000000000..b5abebc90 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.8/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.8/Dockerfile new file mode 100644 index 000000000..4092da76c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.8/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.8/docker-compose.yml new file mode 100644 index 000000000..a01cb93b1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.8/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.8-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.8/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/5/5.16.9/.env b/linux/ecosystem/atlassian/bitbucket/5/5.16.9/.env new file mode 100644 index 000000000..4451207a5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.9/.env @@ -0,0 +1,2 @@ +RELEASE=5.16.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.16.9/Dockerfile new file mode 100644 index 000000000..398406da9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.16.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.9/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.16.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.16.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.16.9/docker-compose.yml new file mode 100644 index 000000000..64717f82d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.9/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.16.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.16.9-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.16.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.16.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.16.9/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/5/5.2.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.2.0/.env new file mode 100644 index 000000000..cdb6534cd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.2.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.2.0/Dockerfile new file mode 100644 index 000000000..1d2dd7561 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.2.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.2.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.2.0/docker-compose.yml new file mode 100644 index 000000000..e02170a53 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.2.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.2.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.2.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.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/5/5.2.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.2.1/.env new file mode 100644 index 000000000..2a98a625c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.2.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.2.1/Dockerfile new file mode 100644 index 000000000..77a64d20b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.2.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.2.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.2.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.2.1/docker-compose.yml new file mode 100644 index 000000000..b65292638 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.2.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.2.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.2.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.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/5/5.2.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.2.2/.env new file mode 100644 index 000000000..922e24da4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.2.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.2.2/Dockerfile new file mode 100644 index 000000000..8bf5c82d4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.2.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.2.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.2.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.2.2/docker-compose.yml new file mode 100644 index 000000000..6109c1f43 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.2.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.2.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.2.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.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/5/5.2.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.2.3/.env new file mode 100644 index 000000000..9885fd393 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.2.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.2.3/Dockerfile new file mode 100644 index 000000000..e1c15f6c0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.2.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.2.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.2.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.2.3/docker-compose.yml new file mode 100644 index 000000000..4346f0146 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.2.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.2.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.2.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.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/5/5.2.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.2.4/.env new file mode 100644 index 000000000..7bdd645e7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.2.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.2.4/Dockerfile new file mode 100644 index 000000000..935cde41c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.2.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.2.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.2.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.2.4/docker-compose.yml new file mode 100644 index 000000000..ae58daf00 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.2.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.2.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.2.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.4/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/5/5.2.5/.env b/linux/ecosystem/atlassian/bitbucket/5/5.2.5/.env new file mode 100644 index 000000000..5862ca9ad --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.5/.env @@ -0,0 +1,2 @@ +RELEASE=5.2.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.2.5/Dockerfile new file mode 100644 index 000000000..99b41f29b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.2.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.5/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.2.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.2.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.2.5/docker-compose.yml new file mode 100644 index 000000000..8137a59f9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.5/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.2.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.2.5-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.2.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.5/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/5/5.2.6/.env b/linux/ecosystem/atlassian/bitbucket/5/5.2.6/.env new file mode 100644 index 000000000..afb0f0a90 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.6/.env @@ -0,0 +1,2 @@ +RELEASE=5.2.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.2.6/Dockerfile new file mode 100644 index 000000000..0bc7c0922 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.2.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.6/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.2.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.2.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.2.6/docker-compose.yml new file mode 100644 index 000000000..90ee78076 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.6/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.2.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.2.6-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.2.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.6/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/5/5.2.7/.env b/linux/ecosystem/atlassian/bitbucket/5/5.2.7/.env new file mode 100644 index 000000000..df227e0f4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.7/.env @@ -0,0 +1,2 @@ +RELEASE=5.2.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.2.7/Dockerfile new file mode 100644 index 000000000..7297a9a5c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.2.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.7/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.2.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.2.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.2.7/docker-compose.yml new file mode 100644 index 000000000..47eedd1f5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.7/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.2.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.2.7-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.2.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.7/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/5/5.2.8/.env b/linux/ecosystem/atlassian/bitbucket/5/5.2.8/.env new file mode 100644 index 000000000..6b272ea62 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.8/.env @@ -0,0 +1,2 @@ +RELEASE=5.2.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.2.8/Dockerfile new file mode 100644 index 000000000..18b17d1db --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.2.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.8/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.2.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.2.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.2.8/docker-compose.yml new file mode 100644 index 000000000..7d2c93fea --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.8/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.2.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.2.8-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.2.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.2.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.2.8/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/5/5.3.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.3.0/.env new file mode 100644 index 000000000..44993a70d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.3.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.3.0/Dockerfile new file mode 100644 index 000000000..aa83cedfc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.3.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.3.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.3.0/docker-compose.yml new file mode 100644 index 000000000..a49f99b8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.3.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.3.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.3.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.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/5/5.3.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.3.1/.env new file mode 100644 index 000000000..273752070 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.3.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.3.1/Dockerfile new file mode 100644 index 000000000..2860b09d4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.3.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.3.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.3.1/docker-compose.yml new file mode 100644 index 000000000..11b0dc758 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.3.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.3.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.3.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.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/5/5.3.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.3.2/.env new file mode 100644 index 000000000..09395b203 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.3.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.3.2/Dockerfile new file mode 100644 index 000000000..1bc9531a7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.3.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.3.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.3.2/docker-compose.yml new file mode 100644 index 000000000..7995f79cb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.3.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.3.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.3.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.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/5/5.3.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.3.3/.env new file mode 100644 index 000000000..2705f547f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.3.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.3.3/Dockerfile new file mode 100644 index 000000000..d43cddc35 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.3.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.3.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.3.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.3.3/docker-compose.yml new file mode 100644 index 000000000..5ba014459 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.3.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.3.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.3.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.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/5/5.3.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.3.4/.env new file mode 100644 index 000000000..0da914e6f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.3.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.3.4/Dockerfile new file mode 100644 index 000000000..15b5fc219 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.3.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.3.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.3.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.3.4/docker-compose.yml new file mode 100644 index 000000000..348475d00 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.3.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.3.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.3.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.4/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/5/5.3.5/.env b/linux/ecosystem/atlassian/bitbucket/5/5.3.5/.env new file mode 100644 index 000000000..0780c4b62 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.5/.env @@ -0,0 +1,2 @@ +RELEASE=5.3.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.3.5/Dockerfile new file mode 100644 index 000000000..f8241279f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.3.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.5/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.3.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.3.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.3.5/docker-compose.yml new file mode 100644 index 000000000..4a00951ee --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.5/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.3.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.3.5-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.3.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.5/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/5/5.3.6/.env b/linux/ecosystem/atlassian/bitbucket/5/5.3.6/.env new file mode 100644 index 000000000..f566ea593 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.6/.env @@ -0,0 +1,2 @@ +RELEASE=5.3.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.3.6/Dockerfile new file mode 100644 index 000000000..87d6296b9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.3.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.6/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.3.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.3.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.3.6/docker-compose.yml new file mode 100644 index 000000000..cfdc703ef --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.6/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.3.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.3.6-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.3.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.6/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/5/5.3.7/.env b/linux/ecosystem/atlassian/bitbucket/5/5.3.7/.env new file mode 100644 index 000000000..5a0d42cba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.7/.env @@ -0,0 +1,2 @@ +RELEASE=5.3.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.3.7/Dockerfile new file mode 100644 index 000000000..135bb5588 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.3.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.7/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.3.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.3.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.3.7/docker-compose.yml new file mode 100644 index 000000000..f90092557 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.7/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.3.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.3.7-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.3.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.3.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.3.7/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/5/5.4.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.4.0/.env new file mode 100644 index 000000000..9e8735607 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.4.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.4.0/Dockerfile new file mode 100644 index 000000000..6cb88c562 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.4.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.4.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.4.0/docker-compose.yml new file mode 100644 index 000000000..35ff0fe22 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.4.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.4.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.4.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.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/5/5.4.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.4.1/.env new file mode 100644 index 000000000..8b99ba590 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.4.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.4.1/Dockerfile new file mode 100644 index 000000000..12a502509 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.4.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.4.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.4.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.4.1/docker-compose.yml new file mode 100644 index 000000000..da5ef0945 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.4.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.4.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.4.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.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/5/5.4.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.4.2/.env new file mode 100644 index 000000000..9f3a8ff67 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.4.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.4.2/Dockerfile new file mode 100644 index 000000000..a46ac70f0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.4.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.4.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.4.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.4.2/docker-compose.yml new file mode 100644 index 000000000..f2b6f9dab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.4.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.4.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.4.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.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/5/5.4.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.4.3/.env new file mode 100644 index 000000000..5a67008c6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.4.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.4.3/Dockerfile new file mode 100644 index 000000000..dc533463d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.4.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.4.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.4.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.4.3/docker-compose.yml new file mode 100644 index 000000000..c0a1ed642 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.4.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.4.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.4.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.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/5/5.4.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.4.4/.env new file mode 100644 index 000000000..afbd11eb5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.4.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.4.4/Dockerfile new file mode 100644 index 000000000..f131db096 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.4.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.4.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.4.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.4.4/docker-compose.yml new file mode 100644 index 000000000..6218cfde7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.4.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.4.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.4.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.4/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/5/5.4.6/.env b/linux/ecosystem/atlassian/bitbucket/5/5.4.6/.env new file mode 100644 index 000000000..05548fcb8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.6/.env @@ -0,0 +1,2 @@ +RELEASE=5.4.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.4.6/Dockerfile new file mode 100644 index 000000000..102148952 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.4.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.6/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.4.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.4.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.4.6/docker-compose.yml new file mode 100644 index 000000000..f68f8286f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.6/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.4.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.4.6-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.4.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.6/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/5/5.4.7/.env b/linux/ecosystem/atlassian/bitbucket/5/5.4.7/.env new file mode 100644 index 000000000..b292d68df --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.7/.env @@ -0,0 +1,2 @@ +RELEASE=5.4.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.4.7/Dockerfile new file mode 100644 index 000000000..d6268b353 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.4.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.7/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.4.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.4.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.4.7/docker-compose.yml new file mode 100644 index 000000000..d0ec03dd4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.7/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.4.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.4.7-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.4.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.7/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/5/5.4.8/.env b/linux/ecosystem/atlassian/bitbucket/5/5.4.8/.env new file mode 100644 index 000000000..066a965b0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.8/.env @@ -0,0 +1,2 @@ +RELEASE=5.4.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.4.8/Dockerfile new file mode 100644 index 000000000..0227ca6f5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.4.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.8/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.4.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.4.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.4.8/docker-compose.yml new file mode 100644 index 000000000..dfb5f5462 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.8/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.4.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.4.8-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.4.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.8/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/5/5.4.9/.env b/linux/ecosystem/atlassian/bitbucket/5/5.4.9/.env new file mode 100644 index 000000000..e4690cb62 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.9/.env @@ -0,0 +1,2 @@ +RELEASE=5.4.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.4.9/Dockerfile new file mode 100644 index 000000000..43f1e9789 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.4.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.9/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.4.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.4.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.4.9/docker-compose.yml new file mode 100644 index 000000000..98035b2b9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.9/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.4.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.4.9-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.4.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.4.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.4.9/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/5/5.5.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.5.0/.env new file mode 100644 index 000000000..7fc40b99b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.5.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.5.0/Dockerfile new file mode 100644 index 000000000..40def4f0e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.5.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.5.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.5.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.5.0/docker-compose.yml new file mode 100644 index 000000000..621455245 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.5.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.5.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.5.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.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/5/5.5.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.5.1/.env new file mode 100644 index 000000000..ef41b1d7a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.5.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.5.1/Dockerfile new file mode 100644 index 000000000..bcd536059 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.5.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.5.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.5.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.5.1/docker-compose.yml new file mode 100644 index 000000000..8a1e37626 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.5.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.5.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.5.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.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/5/5.5.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.5.2/.env new file mode 100644 index 000000000..dfc19e9ff --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.5.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.5.2/Dockerfile new file mode 100644 index 000000000..fb8f691a1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.5.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.5.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.5.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.5.2/docker-compose.yml new file mode 100644 index 000000000..0030828f9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.5.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.5.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.5.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.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/5/5.5.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.5.3/.env new file mode 100644 index 000000000..e73f7c664 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.5.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.5.3/Dockerfile new file mode 100644 index 000000000..34c2a65d4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.5.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.5.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.5.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.5.3/docker-compose.yml new file mode 100644 index 000000000..b087938cf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.5.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.5.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.5.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.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/5/5.5.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.5.4/.env new file mode 100644 index 000000000..d5df5c1be --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.5.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.5.4/Dockerfile new file mode 100644 index 000000000..748dc3299 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.5.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.5.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.5.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.5.4/docker-compose.yml new file mode 100644 index 000000000..e6f90b6ec --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.5.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.5.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.5.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.4/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/5/5.5.5/.env b/linux/ecosystem/atlassian/bitbucket/5/5.5.5/.env new file mode 100644 index 000000000..da9595ac0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.5/.env @@ -0,0 +1,2 @@ +RELEASE=5.5.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.5.5/Dockerfile new file mode 100644 index 000000000..3786f7283 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.5.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.5/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.5.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.5.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.5.5/docker-compose.yml new file mode 100644 index 000000000..5c860778e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.5/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.5.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.5.5-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.5.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.5/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/5/5.5.6/.env b/linux/ecosystem/atlassian/bitbucket/5/5.5.6/.env new file mode 100644 index 000000000..6c8f7eb9a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.6/.env @@ -0,0 +1,2 @@ +RELEASE=5.5.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.5.6/Dockerfile new file mode 100644 index 000000000..aada889bb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.5.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.6/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.5.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.5.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.5.6/docker-compose.yml new file mode 100644 index 000000000..a9896d233 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.6/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.5.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.5.6-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.5.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.6/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/5/5.5.7/.env b/linux/ecosystem/atlassian/bitbucket/5/5.5.7/.env new file mode 100644 index 000000000..2103b1ea3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.7/.env @@ -0,0 +1,2 @@ +RELEASE=5.5.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.5.7/Dockerfile new file mode 100644 index 000000000..39926939a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.5.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.7/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.5.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.5.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.5.7/docker-compose.yml new file mode 100644 index 000000000..6945ab233 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.7/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.5.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.5.7-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.5.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.7/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/5/5.5.8/.env b/linux/ecosystem/atlassian/bitbucket/5/5.5.8/.env new file mode 100644 index 000000000..c7e0888ce --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.8/.env @@ -0,0 +1,2 @@ +RELEASE=5.5.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.5.8/Dockerfile new file mode 100644 index 000000000..e84ae1bff --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.5.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.8/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.5.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.5.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.5.8/docker-compose.yml new file mode 100644 index 000000000..f0e2d9926 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.8/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.5.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.5.8-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.5.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.8/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/5/5.5.9/.env b/linux/ecosystem/atlassian/bitbucket/5/5.5.9/.env new file mode 100644 index 000000000..613e63506 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.9/.env @@ -0,0 +1,2 @@ +RELEASE=5.5.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.5.9/Dockerfile new file mode 100644 index 000000000..4d10053d7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.5.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.9/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.5.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.5.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.5.9/docker-compose.yml new file mode 100644 index 000000000..b0d914fb9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.9/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.5.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.5.9-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.5.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.5.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.5.9/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/5/5.6.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.6.1/.env new file mode 100644 index 000000000..8454d57ec --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.6.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.6.1/Dockerfile new file mode 100644 index 000000000..cca1bcf76 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.6.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.6.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.6.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.6.1/docker-compose.yml new file mode 100644 index 000000000..b8d6d44d3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.6.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.6.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.6.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.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/5/5.6.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.6.2/.env new file mode 100644 index 000000000..692171a01 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.6.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.6.2/Dockerfile new file mode 100644 index 000000000..d8c999d6e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.6.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.6.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.6.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.6.2/docker-compose.yml new file mode 100644 index 000000000..0b3a11b55 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.6.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.6.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.6.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.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/5/5.6.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.6.3/.env new file mode 100644 index 000000000..8840a42a6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.6.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.6.3/Dockerfile new file mode 100644 index 000000000..9f977a220 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.6.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.6.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.6.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.6.3/docker-compose.yml new file mode 100644 index 000000000..6b311b2bd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.6.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.6.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.6.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.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/5/5.6.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.6.4/.env new file mode 100644 index 000000000..6614a225b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.6.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.6.4/Dockerfile new file mode 100644 index 000000000..4f68c72ff --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.6.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.6.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.6.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.6.4/docker-compose.yml new file mode 100644 index 000000000..3669f9c5e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.6.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.6.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.6.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.4/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/5/5.6.5/.env b/linux/ecosystem/atlassian/bitbucket/5/5.6.5/.env new file mode 100644 index 000000000..6a2141123 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.5/.env @@ -0,0 +1,2 @@ +RELEASE=5.6.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.6.5/Dockerfile new file mode 100644 index 000000000..860578d5e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.6.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.5/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.6.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.6.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.6.5/docker-compose.yml new file mode 100644 index 000000000..e68c7601d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.5/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.6.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.6.5-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.6.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.5/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/5/5.6.6/.env b/linux/ecosystem/atlassian/bitbucket/5/5.6.6/.env new file mode 100644 index 000000000..1a9460773 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.6/.env @@ -0,0 +1,2 @@ +RELEASE=5.6.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.6.6/Dockerfile new file mode 100644 index 000000000..662680416 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.6.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.6/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.6.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.6.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.6.6/docker-compose.yml new file mode 100644 index 000000000..92785d80a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.6/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.6.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.6.6-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.6.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.6.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.6.6/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/5/5.7.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.7.0/.env new file mode 100644 index 000000000..c171c4206 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.7.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.7.0/Dockerfile new file mode 100644 index 000000000..19bbbf5a2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.7.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.7.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.7.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.7.0/docker-compose.yml new file mode 100644 index 000000000..e3c7e7bbb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.7.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.7.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.7.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.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/bitbucket/5/5.7.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.7.1/.env new file mode 100644 index 000000000..34d8e98dc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.7.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.7.1/Dockerfile new file mode 100644 index 000000000..5b4071b21 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.7.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.7.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.7.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.7.1/docker-compose.yml new file mode 100644 index 000000000..08d866c29 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.7.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.7.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.7.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.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/5/5.7.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.7.2/.env new file mode 100644 index 000000000..0751cec18 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.7.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.7.2/Dockerfile new file mode 100644 index 000000000..d407d5cb7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.7.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.7.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.7.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.7.2/docker-compose.yml new file mode 100644 index 000000000..eef0417d2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.7.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.7.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.7.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.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/5/5.7.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.7.3/.env new file mode 100644 index 000000000..ddd320917 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.7.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.7.3/Dockerfile new file mode 100644 index 000000000..d171b6b37 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.7.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.7.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.7.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.7.3/docker-compose.yml new file mode 100644 index 000000000..ebe29a258 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.7.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.7.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.7.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.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/5/5.7.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.7.4/.env new file mode 100644 index 000000000..1c242fd58 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.7.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.7.4/Dockerfile new file mode 100644 index 000000000..730f8841e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.7.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.7.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.7.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.7.4/docker-compose.yml new file mode 100644 index 000000000..407853c64 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.7.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.7.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.7.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.7.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.7.4/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/5/5.8.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.8.0/.env new file mode 100644 index 000000000..5ea8740c8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.8.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.8.0/Dockerfile new file mode 100644 index 000000000..3ae3dc24a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.8.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.8.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.8.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.8.0/docker-compose.yml new file mode 100644 index 000000000..4efeedc83 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.8.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.8.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.8.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.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/5/5.8.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.8.1/.env new file mode 100644 index 000000000..7f7f4c555 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.8.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.8.1/Dockerfile new file mode 100644 index 000000000..4c31cbd2b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.8.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.8.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.8.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.8.1/docker-compose.yml new file mode 100644 index 000000000..9979a0085 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.8.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.8.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.8.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.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/5/5.8.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.8.2/.env new file mode 100644 index 000000000..ca2814938 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.8.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.8.2/Dockerfile new file mode 100644 index 000000000..180309800 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.8.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.8.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.8.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.8.2/docker-compose.yml new file mode 100644 index 000000000..627c7c404 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.8.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.8.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.8.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.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/5/5.8.3/.env b/linux/ecosystem/atlassian/bitbucket/5/5.8.3/.env new file mode 100644 index 000000000..4acaa36b5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.3/.env @@ -0,0 +1,2 @@ +RELEASE=5.8.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.8.3/Dockerfile new file mode 100644 index 000000000..9ef651f19 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.8.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.3/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.8.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.8.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.8.3/docker-compose.yml new file mode 100644 index 000000000..55e5b5173 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.8.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.8.3-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.8.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.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/5/5.8.4/.env b/linux/ecosystem/atlassian/bitbucket/5/5.8.4/.env new file mode 100644 index 000000000..22434d0e9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.4/.env @@ -0,0 +1,2 @@ +RELEASE=5.8.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.8.4/Dockerfile new file mode 100644 index 000000000..0def34353 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.8.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.4/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.8.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.8.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.8.4/docker-compose.yml new file mode 100644 index 000000000..87095753f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.8.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.8.4-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.8.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.8.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.8.4/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/5/5.9.0/.env b/linux/ecosystem/atlassian/bitbucket/5/5.9.0/.env new file mode 100644 index 000000000..693292b7e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.0/.env @@ -0,0 +1,2 @@ +RELEASE=5.9.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.9.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.9.0/Dockerfile new file mode 100644 index 000000000..6a6ff3cac --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.9.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.9.0/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.9.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.9.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.9.0/docker-compose.yml new file mode 100644 index 000000000..e8cc9140e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.9.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.9.0-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.9.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.9.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.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/5/5.9.1/.env b/linux/ecosystem/atlassian/bitbucket/5/5.9.1/.env new file mode 100644 index 000000000..50243567d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.1/.env @@ -0,0 +1,2 @@ +RELEASE=5.9.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.9.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.9.1/Dockerfile new file mode 100644 index 000000000..d2a10d33f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.9.1/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.9.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.9.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.9.1/docker-compose.yml new file mode 100644 index 000000000..503cf0a4f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.9.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.9.1-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.9.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.9.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.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/5/5.9.2/.env b/linux/ecosystem/atlassian/bitbucket/5/5.9.2/.env new file mode 100644 index 000000000..ef17a5997 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.2/.env @@ -0,0 +1,2 @@ +RELEASE=5.9.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.9.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/5/5.9.2/Dockerfile new file mode 100644 index 000000000..0cac586ac --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=5.9.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.9.2/Makefile b/linux/ecosystem/atlassian/bitbucket/5/5.9.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/5/5.9.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/5/5.9.2/docker-compose.yml new file mode 100644 index 000000000..020287f48 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:5.9.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:5.9.2-jdk8" + build: + context: . \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/5/5.9.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/5/5.9.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/5/5.9.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/6/6.0.0/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/.env new file mode 100644 index 000000000..a51f64ab7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Dockerfile index fef969cb5..014c2d115 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Dockerfile.jdk11 index 3be90f3b5..45c35846a 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Makefile index be9158a83..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.0 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/docker-compose.yml new file mode 100644 index 000000000..7443639cb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/.env new file mode 100644 index 000000000..d220a370b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Dockerfile index 92e93e134..977fab352 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Dockerfile.jdk11 index f348d2902..be1ca3907 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Makefile index 22fb605d9..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.1 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/docker-compose.yml new file mode 100644 index 000000000..73e241c72 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.10/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/.env new file mode 100644 index 000000000..c791eba82 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.10 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Dockerfile index 2c95332f9..53df64da7 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.10 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Dockerfile.jdk11 index 67d0aa20b..f6395fe50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.10 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Makefile index c88d5aae1..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.10 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.10/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.10/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.10/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/docker-compose.yml new file mode 100644 index 000000000..17f671660 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.10/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.10" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.10-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.10-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.11/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/.env new file mode 100644 index 000000000..a733e2661 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.11 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Dockerfile index b43565029..b872e8e80 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.11 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Dockerfile.jdk11 index eb4e0b4a4..22ae402ab 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.11 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Makefile index bf4d23baf..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.11 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.11/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.11/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.11/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/docker-compose.yml new file mode 100644 index 000000000..39671948f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.11/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.11" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.11-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.11-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/.env new file mode 100644 index 000000000..af3c2174b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Dockerfile index 73327c3c2..6b39f1d52 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Dockerfile.jdk11 index 093b3bb45..ffb1c83ca 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Makefile index d075dbfb7..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.2 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/docker-compose.yml new file mode 100644 index 000000000..b470283b4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/.env new file mode 100644 index 000000000..429167298 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Dockerfile index c76235e59..0fd58cc05 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Dockerfile.jdk11 index 21dfc36db..8f2185046 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Makefile index ac7f26c2a..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.3 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.3/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.3/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/docker-compose.yml new file mode 100644 index 000000000..d6495ba64 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.4/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/.env new file mode 100644 index 000000000..85cd9caac --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Dockerfile index fb8e911f3..641e18929 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Dockerfile.jdk11 index cf67aff1c..7a9d72739 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Makefile index 160c185a1..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.4 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.4/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.4/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/docker-compose.yml new file mode 100644 index 000000000..55d18b492 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.5/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/.env new file mode 100644 index 000000000..b2387f1ea --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Dockerfile index 0dfbfb80a..fd5826148 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.5 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Dockerfile.jdk11 index 98061bcad..16387e72b 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.5 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Makefile index 052ebd835..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.5 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.5/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.5/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/docker-compose.yml new file mode 100644 index 000000000..43a794ff7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.6/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/.env new file mode 100644 index 000000000..9a6111fd4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Dockerfile index 0cac08402..72da6d377 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.6 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Dockerfile.jdk11 index cec526362..26ef23fb3 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.6 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Makefile index b9480fdfb..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.6 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.6/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.6/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/docker-compose.yml new file mode 100644 index 000000000..4696453dc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.6/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.7/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/.env new file mode 100644 index 000000000..624c04c4d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Dockerfile index 465829308..fbfbb057b 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.7 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Dockerfile.jdk11 index 64a37002d..5be983938 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.7 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Makefile index f090d535f..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.7 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.7/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.7/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/docker-compose.yml new file mode 100644 index 000000000..406fe9a07 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.7/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.7-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.7-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.9/.env b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/.env new file mode 100644 index 000000000..634a9c5b7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/.env @@ -0,0 +1,2 @@ +RELEASE=6.0.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Dockerfile index fa004e295..89cbb8515 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.9 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Dockerfile.jdk11 index 95a124a00..a3259b179 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.0.9 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.0.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Makefile index 0d12fedd1..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.0.9 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.0.9/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.0.9/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.0.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/docker-compose.yml new file mode 100644 index 000000000..cd769f098 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.0.9/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.0.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.0.9-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.0.9-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.0/.env b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/.env new file mode 100644 index 000000000..b8e22adab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/.env @@ -0,0 +1,2 @@ +RELEASE=6.1.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Dockerfile index 2448e3d97..f78dcfe46 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Dockerfile.jdk11 index ede191aba..338ac4bb1 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Makefile index 8b4a0b2e6..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.1.0 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.1.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.1.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/docker-compose.yml new file mode 100644 index 000000000..b103fc39f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.1.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.1.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.1.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/.env new file mode 100644 index 000000000..71a1e3dd4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.1.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Dockerfile index b9efd9f10..f6976b443 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Dockerfile.jdk11 index 0a7f7b4f8..0e694ee6d 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Makefile index c23cff52c..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.1.1 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.1.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.1.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/docker-compose.yml new file mode 100644 index 000000000..a08a2b95e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.1.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.1.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.1.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/.env new file mode 100644 index 000000000..d3ca38e9d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.1.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Dockerfile index b1c497516..4ebd918e1 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Dockerfile.jdk11 index c8f674c41..fe3b2f144 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Makefile index eab88f151..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.1.2 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.1.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.1.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/docker-compose.yml new file mode 100644 index 000000000..92dfe8900 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.1.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.1.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.1.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/.env new file mode 100644 index 000000000..e51f8bd5a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.1.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Dockerfile index 1dc8a38ca..d03934fa2 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Dockerfile.jdk11 index 978d5ce56..c1a8e12b1 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Makefile index e19e01b55..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.1.3 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.1.3/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.3/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.1.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/docker-compose.yml new file mode 100644 index 000000000..6ab933f3b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.1.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.1.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.1.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.4/.env b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/.env new file mode 100644 index 000000000..a068a99cd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/.env @@ -0,0 +1,2 @@ +RELEASE=6.1.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Dockerfile index f25c2a488..9e805e96b 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Dockerfile.jdk11 index e0f4f78a1..4aa7d53b5 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Makefile index 1c3aad0c4..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.1.4 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.1.4/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.4/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.1.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/docker-compose.yml new file mode 100644 index 000000000..1dab486ea --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.1.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.1.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.1.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.5/.env b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/.env new file mode 100644 index 000000000..4650ac8c3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/.env @@ -0,0 +1,2 @@ +RELEASE=6.1.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Dockerfile index f4fe0528f..09ba0d88b 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.5 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Dockerfile.jdk11 index 62d817594..36f34fb6f 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.5 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Makefile index 9413cfb4d..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.1.5 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.1.5/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.5/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.1.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/docker-compose.yml new file mode 100644 index 000000000..5d5a9aa6d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.1.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.1.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.1.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.6/.env b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/.env new file mode 100644 index 000000000..d34c4096e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/.env @@ -0,0 +1,2 @@ +RELEASE=6.1.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Dockerfile index 55df686b9..f3fda4fee 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.6 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Dockerfile.jdk11 index 6b2a9f195..4fcb5ce32 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.6 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Makefile index 5fb1f5d36..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.1.6 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.1.6/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.6/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.1.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/docker-compose.yml new file mode 100644 index 000000000..8ab170000 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.6/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.1.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.1.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.1.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.7/.env b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/.env new file mode 100644 index 000000000..deac0ae96 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/.env @@ -0,0 +1,2 @@ +RELEASE=6.1.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Dockerfile index 2f986b487..ce5508bd0 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.7 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Dockerfile.jdk11 index 89c44874b..7debf0013 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.7 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Makefile index 07a18d04b..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.1.7 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.1.7/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.7/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.1.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/docker-compose.yml new file mode 100644 index 000000000..e01aa8a3a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.7/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.1.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.1.7-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.1.7-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.8/.env b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/.env new file mode 100644 index 000000000..1971a31ba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/.env @@ -0,0 +1,2 @@ +RELEASE=6.1.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Dockerfile index b17068fc6..0c85c9a8e 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.8 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Dockerfile.jdk11 index 91725c9c6..8c61f3315 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.8 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Makefile index c6459ca25..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.1.8 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.1.8/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.8/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.1.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/docker-compose.yml new file mode 100644 index 000000000..bb240a644 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.8/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.1.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.1.8-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.1.8-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.9/.env b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/.env new file mode 100644 index 000000000..a845eeda1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/.env @@ -0,0 +1,2 @@ +RELEASE=6.1.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Dockerfile index 2c5c954fe..49c071ef2 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.9 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Dockerfile.jdk11 index e77bd1671..a98c1188f 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.1.9 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.1.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Makefile index 4a4deaf08..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.1.9 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.1.9/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.1.9/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.1.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/docker-compose.yml new file mode 100644 index 000000000..edeb49045 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.1.9/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.1.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.1.9-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.1.9-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.0/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/.env new file mode 100644 index 000000000..a396ad2ef --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Dockerfile index c28f0f630..1ae8511df 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.10.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Dockerfile.jdk11 index 08ef7e820..8bb6bcd98 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.10.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Makefile index 4d2d6aed8..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/Makefile @@ -1,5 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.10.0 . - docker push epicmorg/bitbucket:6.10.0 +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.10.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/docker-compose.yml new file mode 100644 index 000000000..ec8536073 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/.env new file mode 100644 index 000000000..3f2d71851 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Dockerfile index 8b1991076..911b97693 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.10.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.10.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Dockerfile.jdk11 index 7bd27d4aa..a5f08a30a 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.10.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.10.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Makefile index 8375c0895..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/Makefile @@ -1,5 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.10.1 . - docker push epicmorg/bitbucket:6.10.1 +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.10.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/docker-compose.yml new file mode 100644 index 000000000..3ee5990b7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.10/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/.env new file mode 100644 index 000000000..b8cb7e480 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.10 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.10/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/Dockerfile new file mode 100644 index 000000000..90518806a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/Dockerfile.jdk11 similarity index 80% rename from bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.jdk11 rename to linux/ecosystem/atlassian/bitbucket/6/6.10.10/Dockerfile.jdk11 index b2ce5fd3f..74c402a58 100644 --- a/bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/Dockerfile.jdk11 @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=6.10.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -29,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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-get clean -y && \ apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.10/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.10/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/docker-compose.yml new file mode 100644 index 000000000..97d2aa8a6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.10" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.10-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.10-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.10/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.10/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/6/6.10.11/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/.env new file mode 100644 index 000000000..8b1f78c4b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.11 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.11/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/Dockerfile new file mode 100644 index 000000000..82f6a8894 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.11/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/Dockerfile.jdk11 new file mode 100644 index 000000000..b88368f44 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.11/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.11/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/docker-compose.yml new file mode 100644 index 000000000..0d94ba171 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.11" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.11-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.11-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.11/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.11/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/6/6.10.12/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/.env new file mode 100644 index 000000000..9ac945553 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.12 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.12/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/Dockerfile new file mode 100644 index 000000000..0ec647478 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.12/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/Dockerfile.jdk11 new file mode 100644 index 000000000..2b28b9246 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.12/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.12/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/docker-compose.yml new file mode 100644 index 000000000..ec7149000 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.12" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.12-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.12-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.12/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.12/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/6/6.10.13/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/.env new file mode 100644 index 000000000..66d920738 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.13 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.13/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/Dockerfile new file mode 100644 index 000000000..2fa1a880b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.13/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/Dockerfile.jdk11 new file mode 100644 index 000000000..d417d53f1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.13/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.13/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/docker-compose.yml new file mode 100644 index 000000000..e4cd5ae85 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.13" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.13-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.13-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.13/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.13/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/6/6.10.14/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/.env new file mode 100644 index 000000000..ba960e756 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.14 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.14/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/Dockerfile new file mode 100644 index 000000000..fe2639e70 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.14/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/Dockerfile.jdk11 new file mode 100644 index 000000000..880caf56d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.14/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.14/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/docker-compose.yml new file mode 100644 index 000000000..607be33d7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.14" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.14-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.14-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.14/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.14/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/6/6.10.15/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/.env new file mode 100644 index 000000000..ee550b568 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.15 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.15/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/Dockerfile new file mode 100644 index 000000000..0512a04b9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.15/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/Dockerfile.jdk11 new file mode 100644 index 000000000..ccd7503a9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.15/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.15/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/docker-compose.yml new file mode 100644 index 000000000..2105b1281 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.15" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.15-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.15-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.15/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.15/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/6/6.10.16/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/.env new file mode 100644 index 000000000..d2119034e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.16 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.16/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/Dockerfile new file mode 100644 index 000000000..6621f188c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.16/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/Dockerfile.jdk11 new file mode 100644 index 000000000..5f3b03941 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.16/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.16/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/docker-compose.yml new file mode 100644 index 000000000..6d818189e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.16" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.16-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.16-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.16/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.16/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/6/6.10.17/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/.env new file mode 100644 index 000000000..be6c67fc3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.17 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.17/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/Dockerfile new file mode 100644 index 000000000..209928acc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.17/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/Dockerfile.jdk11 new file mode 100644 index 000000000..2e0ff51c9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.17/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.17/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/docker-compose.yml new file mode 100644 index 000000000..69841dbab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.17" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.17-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.17-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.17/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.17/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/6/6.10.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/.env new file mode 100644 index 000000000..b4e798536 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Dockerfile index 198478b06..1fe4b14f1 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.10.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.10.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Dockerfile.jdk11 index 8ca6ee5d4..52dbbef47 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.10.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.10.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Makefile index deb13d727..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/Makefile @@ -1,5 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.10.2 . - docker push epicmorg/bitbucket:6.10.2 +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.10.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.10.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/docker-compose.yml new file mode 100644 index 000000000..eb711cd09 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/.env new file mode 100644 index 000000000..923fa224d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/Dockerfile new file mode 100644 index 000000000..20b7c3a26 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/Dockerfile.jdk11 new file mode 100644 index 000000000..abb35c072 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/docker-compose.yml new file mode 100644 index 000000000..a59f4756a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.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/6/6.10.4/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/.env new file mode 100644 index 000000000..4ae04aa63 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/Dockerfile new file mode 100644 index 000000000..336249e38 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/Dockerfile.jdk11 new file mode 100644 index 000000000..a75e8a004 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.4/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/docker-compose.yml new file mode 100644 index 000000000..3d6d12347 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.4/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/6/6.10.5/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/.env new file mode 100644 index 000000000..a4e69f331 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/Dockerfile new file mode 100644 index 000000000..2eaa4adda --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/Dockerfile.jdk11 new file mode 100644 index 000000000..af80ab395 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.5/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/docker-compose.yml new file mode 100644 index 000000000..d75ba0bce --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.5/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/6/6.10.7/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/.env new file mode 100644 index 000000000..27dc2d5ed --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/Dockerfile new file mode 100644 index 000000000..6c7a87bb7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.7/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/Dockerfile.jdk11 new file mode 100644 index 000000000..4c4728b35 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.7/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/docker-compose.yml new file mode 100644 index 000000000..5d478f921 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.7-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.7-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.7/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/6/6.10.8/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/.env new file mode 100644 index 000000000..eb211d360 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/Dockerfile new file mode 100644 index 000000000..9cc6b0464 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.8/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/Dockerfile.jdk11 new file mode 100644 index 000000000..3e6bbf7c5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.8/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/docker-compose.yml new file mode 100644 index 000000000..9712623c0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.8-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.8-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.8/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/6/6.10.9/.env b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/.env new file mode 100644 index 000000000..266eac00c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/.env @@ -0,0 +1,2 @@ +RELEASE=6.10.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/Dockerfile new file mode 100644 index 000000000..cfb4098f3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.9/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/Dockerfile.jdk11 new file mode 100644 index 000000000..95d8a3b4a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.10.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.9/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.10.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/docker-compose.yml new file mode 100644 index 000000000..ea5e1907d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.10.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.10.9-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.10.9-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.10.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.10.9/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/6/6.2.0/.env b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/.env new file mode 100644 index 000000000..ad6fc4f74 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/.env @@ -0,0 +1,2 @@ +RELEASE=6.2.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Dockerfile index 32c76f5cb..964ddb2a1 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Dockerfile.jdk11 index 9e9ce4ab0..8f03e9416 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Makefile index fe7b9fa80..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.2.0 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.2.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.2.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/docker-compose.yml new file mode 100644 index 000000000..b9cb73b30 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.2.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.2.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.2.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/.env new file mode 100644 index 000000000..754444ca5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.2.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Dockerfile index 2d59b2db5..ebd6895e1 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Dockerfile.jdk11 index e0b2e922f..ade20ab2e 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Makefile index d3458a561..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.2.1 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.2.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.2.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/docker-compose.yml new file mode 100644 index 000000000..3ee2084ae --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.2.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.2.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.2.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/.env new file mode 100644 index 000000000..c3f8dc087 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.2.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Dockerfile index 404046508..a9da72906 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Dockerfile.jdk11 index 824ba322c..29d089740 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Makefile index 1878acb51..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.2.2 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.2.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.2.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/docker-compose.yml new file mode 100644 index 000000000..1833b9787 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.2.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.2.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.2.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/.env new file mode 100644 index 000000000..d865af8fb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.2.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Dockerfile index f99d42a7d..783d289a4 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Dockerfile.jdk11 index 7e4a0a7ce..f3b34407b 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Makefile index 0ef3190fe..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.2.3 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.2.3/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.3/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.2.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/docker-compose.yml new file mode 100644 index 000000000..e53209510 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.2.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.2.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.2.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.4/.env b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/.env new file mode 100644 index 000000000..b5fd5430f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/.env @@ -0,0 +1,2 @@ +RELEASE=6.2.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Dockerfile index f4f069cf4..13ee4f163 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Dockerfile.jdk11 index 6d09950ce..e5c29d7e2 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Makefile index d8519fde7..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.2.4 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.2.4/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.4/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.2.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/docker-compose.yml new file mode 100644 index 000000000..3a60e47a7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.2.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.2.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.2.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.5/.env b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/.env new file mode 100644 index 000000000..6d0b1e87d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/.env @@ -0,0 +1,2 @@ +RELEASE=6.2.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Dockerfile index 8a1b0911b..73db51716 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.5 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Dockerfile.jdk11 index 5491a6bca..559129cfe 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.5 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Makefile index da55fdd3e..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.2.5 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.2.5/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.5/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.2.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/docker-compose.yml new file mode 100644 index 000000000..0f6da8ca1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.2.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.2.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.2.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.6/.env b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/.env new file mode 100644 index 000000000..7ca10d556 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/.env @@ -0,0 +1,2 @@ +RELEASE=6.2.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Dockerfile index c7be76b5f..9f4d7e5cd 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.6 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Dockerfile.jdk11 index bd2b3ee4e..036c878c4 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.6 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Makefile index 142f93ebc..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.2.6 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.2.6/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.6/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.2.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/docker-compose.yml new file mode 100644 index 000000000..601999594 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.6/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.2.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.2.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.2.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.7/.env b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/.env new file mode 100644 index 000000000..514a5779a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/.env @@ -0,0 +1,2 @@ +RELEASE=6.2.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Dockerfile index b08361e18..5ee5d910c 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.7 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Dockerfile.jdk11 index c263588d7..cc8561944 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.2.7 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.2.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Makefile index e41dedb75..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.2.7 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.2.7/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.2.7/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.2.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/docker-compose.yml new file mode 100644 index 000000000..158dc9762 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.2.7/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.2.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.2.7-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.2.7-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.0/.env b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/.env new file mode 100644 index 000000000..e8ea24bc2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/.env @@ -0,0 +1,2 @@ +RELEASE=6.3.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Dockerfile index a786c41cc..322b32b95 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Dockerfile.jdk11 index 627617984..abc537105 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Makefile index e17e1aeed..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.3.0 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.3.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.3.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/docker-compose.yml new file mode 100644 index 000000000..4c1b473c9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.3.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.3.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.3.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/.env new file mode 100644 index 000000000..e6ae009ea --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.3.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Dockerfile index cb641580c..64291a068 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Dockerfile.jdk11 index 9f090a996..bfa71fb1c 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Makefile index 67a7a1cb8..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.3.1 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.3.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.3.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/docker-compose.yml new file mode 100644 index 000000000..d525cfda7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.3.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.3.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.3.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/.env new file mode 100644 index 000000000..d5efbecbd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.3.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Dockerfile index f907655d5..f40a3a00f 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Dockerfile.jdk11 index 018f444fe..d1f2fe627 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Makefile index ed74d5bd8..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.3.2 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.3.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.3.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/docker-compose.yml new file mode 100644 index 000000000..2b96753f4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.3.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.3.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.3.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/.env new file mode 100644 index 000000000..d4564e6d3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.3.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Dockerfile index 2fbdee12b..710fc2480 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Dockerfile.jdk11 index 7269764c7..91fab7558 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Makefile index 8261e0497..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.3.3 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.3.3/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.3/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.3.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/docker-compose.yml new file mode 100644 index 000000000..ca0ec56d5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.3.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.3.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.3.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.4/.env b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/.env new file mode 100644 index 000000000..1b868d2c8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/.env @@ -0,0 +1,2 @@ +RELEASE=6.3.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Dockerfile index 09af347e5..5497859bb 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Dockerfile.jdk11 index 2c2719d5b..226ee77f3 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Makefile index e4bc1e927..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.3.4 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.3.4/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.4/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.3.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/docker-compose.yml new file mode 100644 index 000000000..42a32e385 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.3.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.3.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.3.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.5/.env b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/.env new file mode 100644 index 000000000..0ee66e0e1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/.env @@ -0,0 +1,2 @@ +RELEASE=6.3.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Dockerfile index e9abca9a3..520e5c9d5 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.5 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Dockerfile.jdk11 index 45cb8253c..b84730553 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.5 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Makefile index e2a991ebd..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.3.5 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.3.5/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.5/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.3.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/docker-compose.yml new file mode 100644 index 000000000..bef122e16 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.3.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.3.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.3.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.6/.env b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/.env new file mode 100644 index 000000000..0210567c3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/.env @@ -0,0 +1,2 @@ +RELEASE=6.3.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Dockerfile index 3698d9737..c9f68cf8b 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.6 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Dockerfile.jdk11 index 41c121ec5..d29996013 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.3.6 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.3.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Makefile index d1f963390..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.3.6 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.3.6/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.3.6/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.3.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/docker-compose.yml new file mode 100644 index 000000000..d934355a7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.3.6/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.3.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.3.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.3.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.0/.env b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/.env new file mode 100644 index 000000000..4501b635c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/.env @@ -0,0 +1,2 @@ +RELEASE=6.4.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Dockerfile index 7336f1c45..1ad7d0a09 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.4.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Dockerfile.jdk11 index 9bce006dd..38718bba5 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.4.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Makefile index 31c0b093e..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.4.0 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.4.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.4.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/docker-compose.yml new file mode 100644 index 000000000..6a96d89a6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.4.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.4.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.4.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/.env new file mode 100644 index 000000000..7caa0a997 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.4.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Dockerfile index 99e08d8e7..dabe3c28c 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.4.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.4.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Dockerfile.jdk11 index 9ed81cc53..e89b9af4a 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.4.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.4.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Makefile index caf3ce22e..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.4.1 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.4.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.4.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/docker-compose.yml new file mode 100644 index 000000000..0a6d0f4f3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.4.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.4.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.4.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/.env new file mode 100644 index 000000000..d9e176894 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.4.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Dockerfile index 5e9c1222d..fa822de09 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.4.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.4.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Dockerfile.jdk11 index a2193b81f..60ca9c02c 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.4.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.4.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Makefile index 41cc6d9a4..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.4.2 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.4.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.4.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/docker-compose.yml new file mode 100644 index 000000000..d3247c58a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.4.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.4.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.4.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/.env new file mode 100644 index 000000000..3b2b92182 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.4.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Dockerfile index 396e4604e..47aca5a49 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.4.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.4.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Dockerfile.jdk11 index 91e74218b..37fadd626 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.4.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.4.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Makefile index 6db1dc0d6..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.4.3 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.4.3/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.3/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.4.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/docker-compose.yml new file mode 100644 index 000000000..ec7d7e73e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.4.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.4.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.4.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.4/.env b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/.env new file mode 100644 index 000000000..855ecc846 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/.env @@ -0,0 +1,2 @@ +RELEASE=6.4.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Dockerfile index 10c9d0d7d..656c30469 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.4.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.4.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Dockerfile.jdk11 index f00768911..1fcc5bff6 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.4.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.4.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Makefile index 2478677d3..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.4.4 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.4.4/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.4.4/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.4.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/docker-compose.yml new file mode 100644 index 000000000..d6644d04c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.4.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.4.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.4.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.4.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.5.0/Dockerfile deleted file mode 100644 index b625a70a8..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.0/Dockerfile +++ /dev/null @@ -1,44 +0,0 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" -ARG DEBIAN_FRONTEND=noninteractive - -################################################################## -# ARGuments -################################################################## -ARG BITBUCKET_VERSION=6.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 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.5.0/Dockerfile.jdk11 deleted file mode 100644 index 6cee34de7..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.0/Dockerfile.jdk11 +++ /dev/null @@ -1,44 +0,0 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" -ARG DEBIAN_FRONTEND=noninteractive - -################################################################## -# ARGuments -################################################################## -ARG BITBUCKET_VERSION=6.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 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.5.0/Makefile deleted file mode 100644 index 60463c7ce..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.0/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -all: bitbucket - -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.5.0 . diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.5.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.5.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/.env new file mode 100644 index 000000000..1a5d80395 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.5.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Dockerfile index 81c1a4124..3da4a3bba 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.5.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.5.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Dockerfile.jdk11 index 46adc6322..c59308b91 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.5.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.5.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Makefile index d67786c7a..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.5.1 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.5.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.5.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/docker-compose.yml new file mode 100644 index 000000000..903b9dedf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.5.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.5.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.5.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/.env new file mode 100644 index 000000000..58b1e89cc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.5.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Dockerfile index 4785f3345..a0a5e8ec6 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.5.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.5.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Dockerfile.jdk11 index be17fbc8a..478711c5a 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.5.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.5.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Makefile index 2a2305d3d..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.5.2 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.5.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.5.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/docker-compose.yml new file mode 100644 index 000000000..628a3c4b6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.5.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.5.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.5.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/.env new file mode 100644 index 000000000..eefc278a1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.5.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Dockerfile index 0f51877c8..7d2ab7b4b 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.5.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.5.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Dockerfile.jdk11 index 5636ed1cc..222176f0f 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.5.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.5.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Makefile index 7834a6acd..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.5.3 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.5.3/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.5.3/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.5.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/docker-compose.yml new file mode 100644 index 000000000..4523d5801 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.5.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.5.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.5.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.5.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.0/.env b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/.env new file mode 100644 index 000000000..6168777a4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/.env @@ -0,0 +1,2 @@ +RELEASE=6.6.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Dockerfile index c45ffa959..771f36544 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.6.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.6.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Dockerfile.jdk11 index 30c4cb845..ed3ed83c3 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.6.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.6.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Makefile index 56b44bb38..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.6.0 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.6.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.6.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/docker-compose.yml new file mode 100644 index 000000000..52073e8ba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.6.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.6.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.6.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/.env new file mode 100644 index 000000000..4717782f8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.6.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Dockerfile index 2e25c0fb5..354713440 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.6.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.6.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Dockerfile.jdk11 index adfceaa34..33973f01c 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.6.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.6.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Makefile index c4c4e86ba..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.6.1 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.6.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.6.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/docker-compose.yml new file mode 100644 index 000000000..b0e7e0366 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.6.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.6.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.6.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/.env new file mode 100644 index 000000000..a8e897495 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.6.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Dockerfile index 651ee100d..a408c55a3 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.6.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.6.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Dockerfile.jdk11 index a11b4d965..54f6ef3c0 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.6.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.6.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Makefile index 80b8967dc..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.6.2 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.6.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.6.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/docker-compose.yml new file mode 100644 index 000000000..226a39568 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.6.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.6.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.6.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/.env new file mode 100644 index 000000000..188b46439 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.6.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Dockerfile index 6bbe2dff3..e86f8d3ce 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.6.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.6.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Dockerfile.jdk11 index def0245db..62332ebc5 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.6.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.6.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Makefile index c6dc6526c..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.6.3 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.6.3/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.3/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.6.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/docker-compose.yml new file mode 100644 index 000000000..5430a5b01 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.6.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.6.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.6.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.4/.env b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/.env new file mode 100644 index 000000000..e0f656c7b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/.env @@ -0,0 +1,2 @@ +RELEASE=6.6.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Dockerfile index 6abd26e1f..48f6f09d3 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.6.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.6.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Dockerfile.jdk11 index 43b21a29e..67f1ec009 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.6.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.6.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Makefile index c6dc6526c..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.6.3 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.6.4/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.6.4/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.6.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/docker-compose.yml new file mode 100644 index 000000000..5385530a9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.6.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.6.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.6.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.6.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.0/.env b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/.env new file mode 100644 index 000000000..2d86f5522 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/.env @@ -0,0 +1,2 @@ +RELEASE=6.7.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Dockerfile index 6e98b7727..1feb73dae 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.7.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.7.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Dockerfile.jdk11 index e37adf761..9a6aa3923 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.7.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.7.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Makefile index 307fa2b18..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.7.0 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.7.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.7.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/docker-compose.yml new file mode 100644 index 000000000..46f7ae28c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.7.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.7.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.7.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/.env new file mode 100644 index 000000000..010019062 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.7.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Dockerfile index a15458887..03922d748 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.7.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.7.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Dockerfile.jdk11 index b20ff577a..ac958b5d3 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.7.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.7.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Makefile index a1838c349..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.7.1 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.7.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.7.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/docker-compose.yml new file mode 100644 index 000000000..5bd71881d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.7.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.7.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.7.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/.env new file mode 100644 index 000000000..d3fa3fdfe --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.7.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Dockerfile index 643dffa9d..46d2f504a 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.7.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.7.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Dockerfile.jdk11 index d07fa321e..6c13b58f2 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.7.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.7.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Makefile index 4684e75dd..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.7.2 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.7.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.7.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/docker-compose.yml new file mode 100644 index 000000000..dec513abc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.7.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.7.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.7.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/.env new file mode 100644 index 000000000..b3a765c7d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.7.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Dockerfile index dd66c2e5c..9b7b663ea 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.7.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.7.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Dockerfile.jdk11 index 653d55754..68e8c759a 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.7.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.7.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Makefile index e58393db3..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.7.3 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.7.3/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.3/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.7.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/docker-compose.yml new file mode 100644 index 000000000..299d6236c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.7.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.7.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.7.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.4/.env b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/.env new file mode 100644 index 000000000..9ec7034ac --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/.env @@ -0,0 +1,2 @@ +RELEASE=6.7.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Dockerfile index 73aed3992..65f3e4f78 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.7.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.7.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Dockerfile.jdk11 index e5dc9cc0a..ae999de0b 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.7.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.7.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Makefile index e58393db3..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.7.3 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.7.4/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.7.4/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.7.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/docker-compose.yml new file mode 100644 index 000000000..39a802ece --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.7.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.7.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.7.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.5/.env b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/.env new file mode 100644 index 000000000..699e6583a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/.env @@ -0,0 +1,2 @@ +RELEASE=6.7.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/Dockerfile new file mode 100644 index 000000000..b62720462 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.7.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/Dockerfile.jdk11 new file mode 100644 index 000000000..7bf97dc14 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.7.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.5/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.7.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/docker-compose.yml new file mode 100644 index 000000000..43a0d49ad --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.7.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.7.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.7.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.7.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.7.5/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/6/6.8.0/.env b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/.env new file mode 100644 index 000000000..a7cb6b66a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/.env @@ -0,0 +1,2 @@ +RELEASE=6.8.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Dockerfile index fcc0af392..9b214edad 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.8.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.8.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Dockerfile.jdk11 index cd66d85c7..2746f29a4 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.8.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.8.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Makefile index aee4a4ef6..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.8.0 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.8.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.8.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/docker-compose.yml new file mode 100644 index 000000000..43ebdec88 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.8.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.8.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.8.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/.env new file mode 100644 index 000000000..433863e31 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.8.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Dockerfile index c52bf606c..8aa2d1ba2 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.8.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.8.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Dockerfile.jdk11 index 2de0e0085..b49cd67e2 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.8.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.8.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Makefile index 057b71828..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/Makefile @@ -1,5 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.8.1 . - docker push epicmorg/bitbucket:6.8.1 +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.8.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.8.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/docker-compose.yml new file mode 100644 index 000000000..020477df0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.8.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.8.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.8.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/.env new file mode 100644 index 000000000..d31c73af3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.8.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Dockerfile index ed53da7e3..931bd53cb 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.8.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.8.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Dockerfile.jdk11 index 8d588d3a0..c99702d4f 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.8.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.8.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Makefile index e21467742..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/Makefile @@ -1,5 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.8.2 . - docker push epicmorg/bitbucket:6.8.2 +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.8.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.8.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/docker-compose.yml new file mode 100644 index 000000000..0e0b9dd2a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.8.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.8.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.8.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/.env new file mode 100644 index 000000000..3819e1db4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.8.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Dockerfile index 9957d7127..dea364a74 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.8.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.8.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Dockerfile.jdk11 index d69488aa5..d75e5b572 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.8.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.8.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Makefile index e21467742..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/Makefile @@ -1,5 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.8.2 . - docker push epicmorg/bitbucket:6.8.2 +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.8.3/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.8.3/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.8.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/docker-compose.yml new file mode 100644 index 000000000..3d3267cd3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.8.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.8.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.8.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.4/.env b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/.env new file mode 100644 index 000000000..881cb3d58 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/.env @@ -0,0 +1,2 @@ +RELEASE=6.8.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/Dockerfile new file mode 100644 index 000000000..459b1e0ad --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.8.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/Dockerfile.jdk11 new file mode 100644 index 000000000..6e69be34d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.8.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.4/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.8.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/docker-compose.yml new file mode 100644 index 000000000..3ac9cad32 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.8.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.8.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.8.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.8.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.8.4/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/6/6.9.0/.env b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/.env new file mode 100644 index 000000000..630bc13e4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/.env @@ -0,0 +1,2 @@ +RELEASE=6.9.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Dockerfile index b94c5064f..c66a29332 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.9.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.9.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Dockerfile.jdk11 index 3b65dc587..3ce13dca0 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.9.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.9.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Makefile index 1c0261703..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/Makefile @@ -1,5 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.9.0 . - docker push epicmorg/bitbucket:6.9.0 +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.9.0/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.0/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.9.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/docker-compose.yml new file mode 100644 index 000000000..d6d3ec075 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.9.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.9.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.9.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.1/.env b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/.env new file mode 100644 index 000000000..43b3d10fe --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/.env @@ -0,0 +1,2 @@ +RELEASE=6.9.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Dockerfile index bdd12a42f..b0feb9c04 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.9.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Dockerfile.jdk11 index ecce32725..5b66f01d8 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.9.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Makefile index 2b6a57639..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/Makefile @@ -1,5 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.9.1 . - docker push epicmorg/bitbucket:6.9.1 +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.9.1/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.1/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.9.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/docker-compose.yml new file mode 100644 index 000000000..15eda11a1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.9.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.9.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.9.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.2/.env b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/.env new file mode 100644 index 000000000..6d4a9a4ea --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/.env @@ -0,0 +1,2 @@ +RELEASE=6.9.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Dockerfile index ecd03d6cb..265025df3 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.9.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.9.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Dockerfile.jdk11 index 9f255bba9..8a956d549 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=6.9.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=6.9.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Makefile index 2b6a57639..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/Makefile @@ -1,5 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:6.9.1 . - docker push epicmorg/bitbucket:6.9.1 +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.9.2/README.md b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/README.md deleted file mode 100644 index b60c42068..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/6.9.2/README.md +++ /dev/null @@ -1,216 +0,0 @@ -![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/6/6.9.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/docker-compose.yml new file mode 100644 index 000000000..9498603ef --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.9.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.9.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.9.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.3/.env b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/.env new file mode 100644 index 000000000..3f9ec5718 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/.env @@ -0,0 +1,2 @@ +RELEASE=6.9.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/Dockerfile new file mode 100644 index 000000000..7a6006f39 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.9.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/Dockerfile.jdk11 new file mode 100644 index 000000000..8c20a7a30 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=6.9.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.3/Makefile b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/6/6.9.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/docker-compose.yml new file mode 100644 index 000000000..8db9d0d67 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:6.9.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:6.9.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:6.9.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/6/6.9.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/6/6.9.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/6/6.9.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/6/README.md b/linux/ecosystem/atlassian/bitbucket/6/README.md deleted file mode 100644 index 617599287..000000000 --- a/linux/ecosystem/atlassian/bitbucket/6/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# [Atlassian Enterprise releases](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html) -## Build info - -All presented images avalible on our repo in docker hub. - -------- - -*Some old versions of Bitbucket may fail health check with [AdoptOpenJDK](https://github.com/AdoptOpenJDK) (open source, prebuilt OpenJDK binaries). But it will be works.* \ No newline at end of file diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.0.0/.env new file mode 100644 index 000000000..b4317da57 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.0.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Dockerfile index cd4b7f3b3..dbb9c6930 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.0.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.0.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Dockerfile.jdk11 index a9143021b..2eedfd000 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.0.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.0.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Makefile index c42a0518f..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.0/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.0.0 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.0.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.0.0/docker-compose.yml new file mode 100644 index 000000000..8661ccd62 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.0.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.0.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.0.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/.env new file mode 100644 index 000000000..af1cb607a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.0.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Dockerfile index 81bd2b58d..d39a342a0 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.0.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.0.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Dockerfile.jdk11 index eb90f882c..eb0b57542 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.0.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.0.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Makefile index b294c1bfa..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/Makefile @@ -1,4 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.0.1 . +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.0.1/atlassian-bitbucket-7.0.0.tar.gz b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/atlassian-bitbucket-7.0.0.tar.gz new file mode 100644 index 000000000..beb05120f Binary files /dev/null and b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/atlassian-bitbucket-7.0.0.tar.gz differ diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/docker-compose.yml new file mode 100644 index 000000000..ddf05551e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.0.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.0.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.0.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.0.2/.env new file mode 100644 index 000000000..7aca9accc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.0.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Dockerfile index b09fe7b32..f0696cfc5 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.0.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.0.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Dockerfile.jdk11 index a1c71cc28..74cfe6c77 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.0.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.0.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Makefile index 16ba80505..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.2/Makefile @@ -1,6 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.0.2 . - docker push epicmorg/bitbucket:7.0.2 +all: app +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.0.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.0.2/docker-compose.yml new file mode 100644 index 000000000..4fba4da43 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.0.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.0.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.0.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.0.3/.env new file mode 100644 index 000000000..9cf7d1ee8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.0.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Dockerfile index 07c945889..8b6e91f60 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.0.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.0.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Dockerfile.jdk11 index a7847051e..54f4e87eb 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.0.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.0.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Makefile index 68e806623..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.3/Makefile @@ -1,6 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.0.3 . - docker push epicmorg/bitbucket:7.0.3 +all: app +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.0.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.0.3/docker-compose.yml new file mode 100644 index 000000000..eea203806 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.0.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.0.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.0.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.4/.env b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/.env new file mode 100644 index 000000000..f6fae4192 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/.env @@ -0,0 +1,2 @@ +RELEASE=7.0.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/Dockerfile new file mode 100644 index 000000000..a6911132c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.0.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/Dockerfile.jdk11 new file mode 100644 index 000000000..84265a01d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.0.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.4/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.0.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/docker-compose.yml new file mode 100644 index 000000000..8ab68a87f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.0.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.0.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.0.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.4/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/7/7.0.5/.env b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/.env new file mode 100644 index 000000000..41a36f815 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/.env @@ -0,0 +1,2 @@ +RELEASE=7.0.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/Dockerfile new file mode 100644 index 000000000..d578f4527 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.0.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/Dockerfile.jdk11 new file mode 100644 index 000000000..30be4065a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.0.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.5/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.0.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/docker-compose.yml new file mode 100644 index 000000000..9cf26398a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.0.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.0.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.0.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.0.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.0.5/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/7/7.1.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.1.0/.env new file mode 100644 index 000000000..d242a4e47 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.1.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Dockerfile index 544768602..4bbb21561 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.1.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.1.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Dockerfile.jdk11 index 934c10524..347403126 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.1.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.1.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Makefile index 0b4cff3ba..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.0/Makefile @@ -1,6 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.1.0 . - docker push epicmorg/bitbucket:7.1.0 +all: app +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.1.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.1.0/docker-compose.yml new file mode 100644 index 000000000..9a1596d65 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.1.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.1.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.1.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.1.1/.env new file mode 100644 index 000000000..7f20f7a67 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.1.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Dockerfile index 33426d796..222d26c54 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.1.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.1.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Dockerfile.jdk11 index 9d67d8ae9..72b0b80dc 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.1.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.1.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Makefile index 941bf2f3a..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.1/Makefile @@ -1,6 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.1.1 . - docker push epicmorg/bitbucket:7.1.1 +all: app +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.1.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.1.1/docker-compose.yml new file mode 100644 index 000000000..576d198d0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.1.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.1.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.1.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.1.2/.env new file mode 100644 index 000000000..dae416bc0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.1.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Dockerfile index d5275100d..bb1d0b9a9 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.1.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.1.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Dockerfile.jdk11 index f243847b4..a7e9054c6 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.1.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.1.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Makefile index ff88e2bec..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.2/Makefile @@ -1,6 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.1.2 . - docker push epicmorg/bitbucket:7.1.2 +all: app +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.1.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.1.2/docker-compose.yml new file mode 100644 index 000000000..605c10281 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.1.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.1.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.1.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.1.3/.env new file mode 100644 index 000000000..72513ba53 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.1.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Dockerfile index b5cdb3dce..02fdd84cf 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.1.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.1.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Dockerfile.jdk11 index b59c47727..288271546 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.1.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.1.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Makefile index ff88e2bec..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.3/Makefile @@ -1,6 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.1.2 . - docker push epicmorg/bitbucket:7.1.2 +all: app +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.1.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.1.3/docker-compose.yml new file mode 100644 index 000000000..402106ebe --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.1.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.1.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.1.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.4/.env b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/.env new file mode 100644 index 000000000..93f9bf6c2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/.env @@ -0,0 +1,2 @@ +RELEASE=7.1.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/Dockerfile new file mode 100644 index 000000000..51aa87c1f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.1.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/Dockerfile.jdk11 new file mode 100644 index 000000000..22ebf64e5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.1.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.4/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.1.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/docker-compose.yml new file mode 100644 index 000000000..9ffc70397 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.1.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.1.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.1.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.1.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.1.4/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/7/7.10.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/.env new file mode 100644 index 000000000..09e98d329 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.10.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.10.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/Dockerfile new file mode 100644 index 000000000..ae424787a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.10.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/Dockerfile.jdk11 new file mode 100644 index 000000000..c56c1cc2f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.10.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.10.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/docker-compose.yml new file mode 100644 index 000000000..a477c8b20 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.10.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.10.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.10.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.10.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.10.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.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/7/7.10.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/.env new file mode 100644 index 000000000..e67cf4863 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.10.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.10.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/Dockerfile new file mode 100644 index 000000000..c0c6ebc21 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.10.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.10.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/Dockerfile.jdk11 new file mode 100644 index 000000000..32658da2a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.10.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.10.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.10.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/docker-compose.yml new file mode 100644 index 000000000..66d11189e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.10.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.10.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.10.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.10.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.10.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.10.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/7/7.11.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/.env new file mode 100644 index 000000000..7f31ceca0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.11.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.11.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/Dockerfile new file mode 100644 index 000000000..ab9410656 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.11.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.11.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/Dockerfile.jdk11 new file mode 100644 index 000000000..21f1800f4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.11.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.11.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.11.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/docker-compose.yml new file mode 100644 index 000000000..96f53af2f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.11.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.11.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.11.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.11.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.11.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.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/7/7.11.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/.env new file mode 100644 index 000000000..a9a14344f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.11.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.11.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/Dockerfile new file mode 100644 index 000000000..14058cd0b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.11.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.11.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/Dockerfile.jdk11 new file mode 100644 index 000000000..2ffdb448e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.11.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.11.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.11.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/docker-compose.yml new file mode 100644 index 000000000..59ead8926 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.11.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.11.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.11.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.11.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.11.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.11.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/7/7.12.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/.env new file mode 100644 index 000000000..0a1d33b2a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.12.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.12.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/Dockerfile new file mode 100644 index 000000000..fbb4e49fe --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.12.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.12.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/Dockerfile.jdk11 new file mode 100644 index 000000000..c1e3f3d7e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.12.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.12.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.12.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/docker-compose.yml new file mode 100644 index 000000000..6e398d016 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.12.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.12.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.12.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.12.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.12.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.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/7/7.12.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/.env new file mode 100644 index 000000000..66dffa5e0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.12.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.12.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/Dockerfile new file mode 100644 index 000000000..97d737842 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.12.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.12.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/Dockerfile.jdk11 new file mode 100644 index 000000000..6b6e49cdf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.12.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.12.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.12.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/docker-compose.yml new file mode 100644 index 000000000..6d24e9d75 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.12.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.12.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.12.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.12.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.12.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.12.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/7/7.13.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/.env new file mode 100644 index 000000000..a943d2a08 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.13.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.13.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/Dockerfile new file mode 100644 index 000000000..ce97d4a08 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.13.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.13.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/Dockerfile.jdk11 new file mode 100644 index 000000000..c235063f0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.13.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.13.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.13.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/docker-compose.yml new file mode 100644 index 000000000..b20180891 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.13.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.13.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.13.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.13.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.13.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.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/7/7.13.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/.env new file mode 100644 index 000000000..7a5cb1abe --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.13.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.13.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/Dockerfile new file mode 100644 index 000000000..6a93c5ae6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.13.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.13.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/Dockerfile.jdk11 new file mode 100644 index 000000000..a07d83ac8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.13.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.13.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.13.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/docker-compose.yml new file mode 100644 index 000000000..8b5694942 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.13.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.13.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.13.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.13.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.13.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.13.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/7/7.14.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/.env new file mode 100644 index 000000000..e355065e4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.14.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/Dockerfile new file mode 100644 index 000000000..004146054 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.14.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/Dockerfile.jdk11 new file mode 100644 index 000000000..a2f961704 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.14.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.14.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/docker-compose.yml new file mode 100644 index 000000000..7c1f8c40d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.14.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.14.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.14.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.14.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.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/7/7.14.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/.env new file mode 100644 index 000000000..61bfe781b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.14.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/Dockerfile new file mode 100644 index 000000000..72b14c530 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.14.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/Dockerfile.jdk11 new file mode 100644 index 000000000..89aa3eb51 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.14.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.14.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/docker-compose.yml new file mode 100644 index 000000000..935bfafe4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.14.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.14.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.14.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.14.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.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/7/7.14.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/.env new file mode 100644 index 000000000..062a119b6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.14.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/Dockerfile new file mode 100644 index 000000000..f7c87a1a4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.14.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/Dockerfile.jdk11 new file mode 100644 index 000000000..f093f6804 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.14.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.14.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/docker-compose.yml new file mode 100644 index 000000000..390d1e22d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.14.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.14.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.14.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.14.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.14.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.14.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/7/7.15.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/.env new file mode 100644 index 000000000..62a3ab519 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.15.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/Dockerfile new file mode 100644 index 000000000..b5c8b24b3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.15.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/Dockerfile.jdk11 new file mode 100644 index 000000000..bfe3d7cd7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.15.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.15.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/docker-compose.yml new file mode 100644 index 000000000..f965f1050 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.15.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.15.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.15.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.15.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.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/7/7.15.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/.env new file mode 100644 index 000000000..3d80ece92 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.15.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/Dockerfile new file mode 100644 index 000000000..98c3f3593 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.15.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/Dockerfile.jdk11 new file mode 100644 index 000000000..e03d848a7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.15.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.15.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/docker-compose.yml new file mode 100644 index 000000000..5f8c0b761 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.15.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.15.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.15.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.15.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.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/7/7.15.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/.env new file mode 100644 index 000000000..4fa0e097d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.15.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/Dockerfile new file mode 100644 index 000000000..a53f39ee2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.15.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/Dockerfile.jdk11 new file mode 100644 index 000000000..3d50b94a1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.15.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.15.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/docker-compose.yml new file mode 100644 index 000000000..ee831525b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.15.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.15.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.15.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.15.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.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/7/7.15.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/.env new file mode 100644 index 000000000..70c84be8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.15.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/Dockerfile new file mode 100644 index 000000000..dbfd622ba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.15.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/Dockerfile.jdk11 new file mode 100644 index 000000000..12c4786b8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.15.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.15.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/docker-compose.yml new file mode 100644 index 000000000..f2b398d94 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.15.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.15.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.15.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.15.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.15.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.15.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/7/7.16.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/.env new file mode 100644 index 000000000..4680b4bb2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.16.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/Dockerfile new file mode 100644 index 000000000..3940392c1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.16.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/Dockerfile.jdk11 new file mode 100644 index 000000000..df29c75ed --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.16.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.16.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/docker-compose.yml new file mode 100644 index 000000000..2728e0615 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.16.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.16.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.16.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.16.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.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/7/7.16.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/.env new file mode 100644 index 000000000..8f2d45d99 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.16.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/Dockerfile new file mode 100644 index 000000000..c781607da --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.16.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/Dockerfile.jdk11 new file mode 100644 index 000000000..1d713bcba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.16.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.16.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/docker-compose.yml new file mode 100644 index 000000000..ef906d266 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.16.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.16.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.16.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.16.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.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/7/7.16.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/.env new file mode 100644 index 000000000..c5cd9eae7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.16.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/Dockerfile new file mode 100644 index 000000000..d91970192 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.16.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/Dockerfile.jdk11 new file mode 100644 index 000000000..5f45a5e68 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.16.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.16.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/docker-compose.yml new file mode 100644 index 000000000..ce9cafaf9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.16.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.16.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.16.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.16.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.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/7/7.16.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/.env new file mode 100644 index 000000000..65241848d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.16.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/Dockerfile new file mode 100644 index 000000000..eefedba9d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.16.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/Dockerfile.jdk11 new file mode 100644 index 000000000..c2262670f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.16.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.16.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/docker-compose.yml new file mode 100644 index 000000000..de3370637 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.16.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.16.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.16.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.16.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.16.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.16.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/7/7.17.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/.env new file mode 100644 index 000000000..332c9acfa --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/Dockerfile new file mode 100644 index 000000000..838065920 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/Dockerfile.jdk11 new file mode 100644 index 000000000..75ae57c0e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/docker-compose.yml new file mode 100644 index 000000000..2ce76834d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.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/7/7.17.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/.env new file mode 100644 index 000000000..8509fb10b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/Dockerfile new file mode 100644 index 000000000..c78fffcec --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/Dockerfile.jdk11 new file mode 100644 index 000000000..22387cf16 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/docker-compose.yml new file mode 100644 index 000000000..0bb4ff6c8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.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/7/7.17.10/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/.env new file mode 100644 index 000000000..f16ee0786 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.10 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.10/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/Dockerfile new file mode 100644 index 000000000..ca1a4e04a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.10/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/Dockerfile.jdk11 new file mode 100644 index 000000000..cc21b5b5d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.10/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.10/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/docker-compose.yml new file mode 100644 index 000000000..37dd1bc43 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.10" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.10-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.10-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.10/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.10/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/7/7.17.11/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/.env new file mode 100644 index 000000000..db2376dbe --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.11 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.11/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/Dockerfile new file mode 100644 index 000000000..d80b04615 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.11/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/Dockerfile.jdk11 new file mode 100644 index 000000000..f1d4f1a7c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.11/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.11/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/docker-compose.yml new file mode 100644 index 000000000..435377970 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.11" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.11-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.11-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.11/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.11/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/7/7.17.12/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/.env new file mode 100644 index 000000000..b3e500a9e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.12 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.12/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/Dockerfile new file mode 100644 index 000000000..fabfbdafb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.12/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/Dockerfile.jdk11 new file mode 100644 index 000000000..92e6845f9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.12/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.12/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/docker-compose.yml new file mode 100644 index 000000000..e8ab71505 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.12" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.12-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.12-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.12/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.12/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/7/7.17.13/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/.env new file mode 100644 index 000000000..57704d2cb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.13 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.13/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/Dockerfile new file mode 100644 index 000000000..053ff9ab5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.13/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/Dockerfile.jdk11 new file mode 100644 index 000000000..7916ac6a9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.13/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.13/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/docker-compose.yml new file mode 100644 index 000000000..d06e33bba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.13" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.13-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.13-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.13/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.13/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/7/7.17.14/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/.env new file mode 100644 index 000000000..ade753de9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.14 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.14/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/Dockerfile new file mode 100644 index 000000000..d12f28ba0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.14/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/Dockerfile.jdk11 new file mode 100644 index 000000000..c1d39db12 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.14/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.14/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/docker-compose.yml new file mode 100644 index 000000000..08476f285 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.14" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.14-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.14-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.14/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.14/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/7/7.17.15/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/.env new file mode 100644 index 000000000..550a2f526 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.15 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.15/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/Dockerfile new file mode 100644 index 000000000..06510344f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.15/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/Dockerfile.jdk11 new file mode 100644 index 000000000..b01e6c0df --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.15/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.15/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/docker-compose.yml new file mode 100644 index 000000000..e5ba84337 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.15" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.15-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.15-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.15/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.15/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/7/7.17.16/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/.env new file mode 100644 index 000000000..9f8920dfd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.16 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.16/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/Dockerfile new file mode 100644 index 000000000..f5b29d0b4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.16/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/Dockerfile.jdk11 new file mode 100644 index 000000000..76bc606fc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.16/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.16/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/docker-compose.yml new file mode 100644 index 000000000..ee66b5e13 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.16" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.16-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.16-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.16/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.16/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/7/7.17.17/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/.env new file mode 100644 index 000000000..ff2521e7a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.17 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.17/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/Dockerfile new file mode 100644 index 000000000..c2333f65f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.17/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/Dockerfile.jdk11 new file mode 100644 index 000000000..8fb1db1b4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.17/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.17/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/docker-compose.yml new file mode 100644 index 000000000..656bc35a4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.17" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.17-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.17-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.17/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.17/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/7/7.17.18/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/.env new file mode 100644 index 000000000..1ca32e0ae --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.18 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.18/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/Dockerfile new file mode 100644 index 000000000..cdc8ee845 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.18 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.18/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/Dockerfile.jdk11 new file mode 100644 index 000000000..a4139b268 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.18 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.18/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.18/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/docker-compose.yml new file mode 100644 index 000000000..ef2cf8ab8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.18" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.18-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.18-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.18/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.18/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/7/7.17.19/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/.env new file mode 100644 index 000000000..bf5d84eaf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.19 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.19/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/Dockerfile new file mode 100644 index 000000000..eef761879 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.19 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.19/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/Dockerfile.jdk11 new file mode 100644 index 000000000..cb66fee43 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.19 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.19/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.19/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/docker-compose.yml new file mode 100644 index 000000000..6a1de52cc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.19" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.19-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.19-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.19/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.19/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/7/7.17.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/.env new file mode 100644 index 000000000..e7696db04 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/Dockerfile new file mode 100644 index 000000000..cbf579e03 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/Dockerfile.jdk11 new file mode 100644 index 000000000..96ef7c9c6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/docker-compose.yml new file mode 100644 index 000000000..24a519af7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.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/7/7.17.20/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/.env new file mode 100644 index 000000000..b7183285e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.20 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.20/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/Dockerfile new file mode 100644 index 000000000..c3df92fb7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.20 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.20/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/Dockerfile.jdk11 new file mode 100644 index 000000000..b84e0ec0d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.20 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.20/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.20/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/docker-compose.yml new file mode 100644 index 000000000..264c48088 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.20" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.20-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.20-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.20/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.20/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/7/7.17.21/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/.env new file mode 100644 index 000000000..930befac9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.21 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.21/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/Dockerfile new file mode 100644 index 000000000..07098338a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.21 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.21/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/Dockerfile.jdk11 new file mode 100644 index 000000000..a7ffbada4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.21 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.21/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.21/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/docker-compose.yml new file mode 100644 index 000000000..4e93453fb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.21" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.21-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.21-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.21/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.21/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/7/7.17.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/.env new file mode 100644 index 000000000..539f10c76 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/Dockerfile new file mode 100644 index 000000000..725866163 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/Dockerfile.jdk11 new file mode 100644 index 000000000..3f3517daa --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/docker-compose.yml new file mode 100644 index 000000000..91c642558 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.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/7/7.17.4/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/.env new file mode 100644 index 000000000..b2dca34f6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/Dockerfile new file mode 100644 index 000000000..3c4580044 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/Dockerfile.jdk11 new file mode 100644 index 000000000..9b4aad122 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.4/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/docker-compose.yml new file mode 100644 index 000000000..5b115ebd3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.4/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/7/7.17.5/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/.env new file mode 100644 index 000000000..23e65d7ed --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/Dockerfile new file mode 100644 index 000000000..9910f8ef9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/Dockerfile.jdk11 new file mode 100644 index 000000000..98d6e1339 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.5/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/docker-compose.yml new file mode 100644 index 000000000..7e4839c82 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.5/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/7/7.17.6/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/.env new file mode 100644 index 000000000..21aa85775 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/Dockerfile new file mode 100644 index 000000000..7a8a94321 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/Dockerfile.jdk11 new file mode 100644 index 000000000..f487338d0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.6/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/docker-compose.yml new file mode 100644 index 000000000..620606ec7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.6/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/7/7.17.7/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/.env new file mode 100644 index 000000000..0182295b9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/Dockerfile new file mode 100644 index 000000000..6fa4ff5b4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.7/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/Dockerfile.jdk11 new file mode 100644 index 000000000..a60b81ffd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.7/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/docker-compose.yml new file mode 100644 index 000000000..56e05abef --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.7-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.7-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.7/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/7/7.17.8/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/.env new file mode 100644 index 000000000..f32652c1c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/Dockerfile new file mode 100644 index 000000000..7908adb16 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.8/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/Dockerfile.jdk11 new file mode 100644 index 000000000..11f9aeba9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.8/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/docker-compose.yml new file mode 100644 index 000000000..b3b6da1d4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.8-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.8-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.8/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/7/7.17.9/.env b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/.env new file mode 100644 index 000000000..3c021aab0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/.env @@ -0,0 +1,2 @@ +RELEASE=7.17.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/Dockerfile new file mode 100644 index 000000000..09cf5f4ed --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.9/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/Dockerfile.jdk11 new file mode 100644 index 000000000..f4ab13fa8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.17.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.9/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.17.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/docker-compose.yml new file mode 100644 index 000000000..8ba2211b7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.17.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.17.9-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.17.9-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.17.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.17.9/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/7/7.18.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/.env new file mode 100644 index 000000000..f6fb3f0a0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.18.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/Dockerfile new file mode 100644 index 000000000..9de95e5d6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.18.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/Dockerfile.jdk11 new file mode 100644 index 000000000..518f129c7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.18.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.18.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/docker-compose.yml new file mode 100644 index 000000000..6eb647e6c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.18.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.18.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.18.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.18.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.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/7/7.18.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/.env new file mode 100644 index 000000000..981652e6e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.18.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/Dockerfile new file mode 100644 index 000000000..f5fcd0fe5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.18.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/Dockerfile.jdk11 new file mode 100644 index 000000000..e7d273edc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.18.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.18.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/docker-compose.yml new file mode 100644 index 000000000..ac5772eec --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.18.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.18.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.18.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.18.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.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/7/7.18.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/.env new file mode 100644 index 000000000..8d5a9a87b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.18.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/Dockerfile new file mode 100644 index 000000000..0a583a9ab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.18.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/Dockerfile.jdk11 new file mode 100644 index 000000000..10b50c38d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.18.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.18.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/docker-compose.yml new file mode 100644 index 000000000..b934eaa28 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.18.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.18.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.18.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.18.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.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/7/7.18.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/.env new file mode 100644 index 000000000..3b15fa89b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.18.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/Dockerfile new file mode 100644 index 000000000..328c6e975 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.18.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/Dockerfile.jdk11 new file mode 100644 index 000000000..1bfb657c3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.18.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.18.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/docker-compose.yml new file mode 100644 index 000000000..bea810b7a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.18.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.18.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.18.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.18.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.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/7/7.18.4/.env b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/.env new file mode 100644 index 000000000..3e782346a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/.env @@ -0,0 +1,2 @@ +RELEASE=7.18.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/Dockerfile new file mode 100644 index 000000000..84576ace9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.18.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/Dockerfile.jdk11 new file mode 100644 index 000000000..ff260c9bc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.18.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.4/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.18.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/docker-compose.yml new file mode 100644 index 000000000..9fb45e786 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.18.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.18.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.18.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.18.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.18.4/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/7/7.19.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/.env new file mode 100644 index 000000000..a02369ca2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.19.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/Dockerfile new file mode 100644 index 000000000..09ae3feb4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.19.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/Dockerfile.jdk11 new file mode 100644 index 000000000..5692a814c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.19.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.19.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/docker-compose.yml new file mode 100644 index 000000000..8cf568016 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.19.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.19.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.19.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.19.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.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/7/7.19.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/.env new file mode 100644 index 000000000..945b21b68 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.19.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/Dockerfile new file mode 100644 index 000000000..b0ddbda51 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.19.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/Dockerfile.jdk11 new file mode 100644 index 000000000..ae97b329b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.19.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.19.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/docker-compose.yml new file mode 100644 index 000000000..89d732195 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.19.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.19.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.19.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.19.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.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/7/7.19.4/.env b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/.env new file mode 100644 index 000000000..874d899c3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/.env @@ -0,0 +1,2 @@ +RELEASE=7.19.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/Dockerfile new file mode 100644 index 000000000..7b80bb94f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.19.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/Dockerfile.jdk11 new file mode 100644 index 000000000..d8314c15b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.19.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.4/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.19.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/docker-compose.yml new file mode 100644 index 000000000..d449f5709 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.19.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.19.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.19.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.4/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/7/7.19.5/.env b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/.env new file mode 100644 index 000000000..d0c2644e0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/.env @@ -0,0 +1,2 @@ +RELEASE=7.19.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/Dockerfile new file mode 100644 index 000000000..6080cef81 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.19.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/Dockerfile.jdk11 new file mode 100644 index 000000000..4b4cf1c68 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.19.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.5/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.19.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/docker-compose.yml new file mode 100644 index 000000000..bb13da54a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.19.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.19.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.19.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.19.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.19.5/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/7/7.2.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.2.0/.env new file mode 100644 index 000000000..731f7b0a7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.2.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Dockerfile index 0cf96fbff..640541512 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.2.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Dockerfile.jdk11 index 903606ddb..76bd77776 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.2.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Makefile index 30f216ed9..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.0/Makefile @@ -1,6 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.2.0 . - docker push epicmorg/bitbucket:7.2.0 +all: app +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.2.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.2.0/docker-compose.yml new file mode 100644 index 000000000..8a0c5bd94 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.2.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.2.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.2.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.2.1/.env new file mode 100644 index 000000000..899108ca0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.2.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Dockerfile index 2455c83db..dde855f25 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.2.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.2.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Dockerfile.jdk11 index 272cfa1ad..ed7bcd785 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.2.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.2.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Makefile index a8b72cfe8..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.1/Makefile @@ -1,6 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.2.1 . - docker push epicmorg/bitbucket:7.2.1 +all: app +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.2.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.2.1/docker-compose.yml new file mode 100644 index 000000000..736b9fe34 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.2.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.2.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.2.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.2.2/.env new file mode 100644 index 000000000..9e2fe1f81 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.2.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Dockerfile index 358294b2a..faff659ae 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.2.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.2.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Dockerfile.jdk11 index 82612d800..217421821 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.2.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.2.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Makefile index c7c34991d..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.2/Makefile @@ -1,6 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.2.2 . - docker push epicmorg/bitbucket:7.2.2 +all: app +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.2.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.2.2/docker-compose.yml new file mode 100644 index 000000000..64dcb8160 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.2.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.2.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.2.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.2.3/.env new file mode 100644 index 000000000..c25c3826e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.2.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Dockerfile index 2dffbbd68..e856e8d4a 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk8 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.2.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.2.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Dockerfile.jdk11 index 50a3db121..5ec482974 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.2.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.2.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Makefile index ec9c53ca7..06e855b50 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Makefile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.3/Makefile @@ -1,6 +1,36 @@ -all: bitbucket +PIP_BREAK_SYSTEM_PACKAGES=1 -bitbucket: - docker build --compress -t epicmorg/bitbucket:7.2.3 . - docker push epicmorg/bitbucket:7.2.3 +all: app +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.2.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.2.3/docker-compose.yml new file mode 100644 index 000000000..3e6da9533 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.2.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.2.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.2.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.4/.env b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/.env new file mode 100644 index 000000000..1537a64fb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/.env @@ -0,0 +1,2 @@ +RELEASE=7.2.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/Dockerfile new file mode 100644 index 000000000..f7d4bea50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.2.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/Dockerfile.jdk11 new file mode 100644 index 000000000..bf0184ed8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.2.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.4/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.2.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/docker-compose.yml new file mode 100644 index 000000000..faafd7846 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.2.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.2.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.2.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.4/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/7/7.2.5/.env b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/.env new file mode 100644 index 000000000..56426665d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/.env @@ -0,0 +1,2 @@ +RELEASE=7.2.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/Dockerfile new file mode 100644 index 000000000..23a0cbebf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.2.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/Dockerfile.jdk11 new file mode 100644 index 000000000..8fcec3c0e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.2.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.5/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.2.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/docker-compose.yml new file mode 100644 index 000000000..a31efbb27 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.2.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.2.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.2.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.5/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/7/7.2.6/.env b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/.env new file mode 100644 index 000000000..db704ab97 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/.env @@ -0,0 +1,2 @@ +RELEASE=7.2.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/Dockerfile new file mode 100644 index 000000000..1d0e0e91f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.2.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/Dockerfile.jdk11 new file mode 100644 index 000000000..5a8b3d198 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.2.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.6/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.2.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/docker-compose.yml new file mode 100644 index 000000000..a879d0310 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.2.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.2.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.2.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.2.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.2.6/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/7/7.20.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/.env new file mode 100644 index 000000000..9b5775077 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.20.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/Dockerfile new file mode 100644 index 000000000..ab343fa91 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.20.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/Dockerfile.jdk11 new file mode 100644 index 000000000..28d5149d7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.20.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.20.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/docker-compose.yml new file mode 100644 index 000000000..4077c300e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.20.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.20.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.20.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.20.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.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/7/7.20.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/.env new file mode 100644 index 000000000..7619109eb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.20.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/Dockerfile new file mode 100644 index 000000000..b3a6a61a5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.20.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/Dockerfile.jdk11 new file mode 100644 index 000000000..cd8b06700 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.20.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.20.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/docker-compose.yml new file mode 100644 index 000000000..1f1ed7077 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.20.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.20.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.20.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.20.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.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/7/7.20.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/.env new file mode 100644 index 000000000..fae2a7387 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.20.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/Dockerfile new file mode 100644 index 000000000..be4885f39 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.20.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/Dockerfile.jdk11 new file mode 100644 index 000000000..32d796602 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.20.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.20.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/docker-compose.yml new file mode 100644 index 000000000..b7b7f6c3a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.20.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.20.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.20.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.20.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.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/7/7.20.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/.env new file mode 100644 index 000000000..7ef81d350 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.20.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/Dockerfile new file mode 100644 index 000000000..f64a1dee9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.20.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/Dockerfile.jdk11 new file mode 100644 index 000000000..defb4f5b0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.20.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.20.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/docker-compose.yml new file mode 100644 index 000000000..7b9dd2769 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.20.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.20.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.20.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.20.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.20.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.20.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/7/7.21.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/.env new file mode 100644 index 000000000..1c1de666f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/Dockerfile new file mode 100644 index 000000000..4c82b6e3a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/Dockerfile.jdk11 new file mode 100644 index 000000000..72800c032 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/docker-compose.yml new file mode 100644 index 000000000..0c6704d1a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.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/7/7.21.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/.env new file mode 100644 index 000000000..ca96b2ef2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/Dockerfile new file mode 100644 index 000000000..6792aa96d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/Dockerfile.jdk11 new file mode 100644 index 000000000..b81ae520d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/docker-compose.yml new file mode 100644 index 000000000..8bf4b4c25 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.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/7/7.21.10/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/.env new file mode 100644 index 000000000..f52d06b28 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.10 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.10/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/Dockerfile new file mode 100644 index 000000000..cd4a973de --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.10/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/Dockerfile.jdk11 new file mode 100644 index 000000000..d6e0762ac --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.10/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.10/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/docker-compose.yml new file mode 100644 index 000000000..f461fdca3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.10" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.10-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.10-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.10/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.10/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/7/7.21.11/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/.env new file mode 100644 index 000000000..42dc7cfc1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.11 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.11/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/Dockerfile new file mode 100644 index 000000000..a14d118b1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.11/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/Dockerfile.jdk11 new file mode 100644 index 000000000..b019441b5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.11/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.11/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/docker-compose.yml new file mode 100644 index 000000000..eba3ff57f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.11" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.11-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.11-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.11/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.11/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/7/7.21.12/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/.env new file mode 100644 index 000000000..083b4a267 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.12 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.12/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/Dockerfile new file mode 100644 index 000000000..6351ef565 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.12/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/Dockerfile.jdk11 new file mode 100644 index 000000000..85963ab55 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.12/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.12/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/docker-compose.yml new file mode 100644 index 000000000..69b4539e5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.12" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.12-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.12-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.12/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.12/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/7/7.21.13/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/.env new file mode 100644 index 000000000..ed945b106 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.13 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.13/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/Dockerfile new file mode 100644 index 000000000..69f9ee415 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.13/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/Dockerfile.jdk11 new file mode 100644 index 000000000..c77f86247 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.13/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.13/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/docker-compose.yml new file mode 100644 index 000000000..fbf9ef2bb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.13" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.13-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.13-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.13/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.13/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/7/7.21.14/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/.env new file mode 100644 index 000000000..4a1090218 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.14 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.14/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/Dockerfile new file mode 100644 index 000000000..c5ee45ecf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.14/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/Dockerfile.jdk11 new file mode 100644 index 000000000..8dd6b6361 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.14/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.14/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/docker-compose.yml new file mode 100644 index 000000000..7c0b97243 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.14" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.14-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.14-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.14/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.14/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/7/7.21.15/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/.env new file mode 100644 index 000000000..ee3418ed1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.15 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.15/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/Dockerfile new file mode 100644 index 000000000..473a0429f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.15/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/Dockerfile.jdk11 new file mode 100644 index 000000000..8e934f03f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.15/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.15/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/docker-compose.yml new file mode 100644 index 000000000..6e599f2b8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.15" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.15-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.15-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.15/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.15/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/7/7.21.16/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/.env new file mode 100644 index 000000000..1cee8b5bc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.16 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.16/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/Dockerfile new file mode 100644 index 000000000..02b4bca15 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.16/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/Dockerfile.jdk11 new file mode 100644 index 000000000..24d67e0dd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.16/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.16/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/docker-compose.yml new file mode 100644 index 000000000..e5eb84d82 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.16" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.16-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.16-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.16/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.16/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/7/7.21.17/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/.env new file mode 100644 index 000000000..87d4955cc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.17 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.17/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/Dockerfile new file mode 100644 index 000000000..72d07dff8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.17/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/Dockerfile.jdk11 new file mode 100644 index 000000000..5c9e227fb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.17/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.17/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/docker-compose.yml new file mode 100644 index 000000000..2439d58e4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.17" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.17-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.17-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.17/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.17/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/7/7.21.18/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/.env new file mode 100644 index 000000000..9681a9038 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.18 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.18/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/Dockerfile new file mode 100644 index 000000000..1fcbdbf1d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.18 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.18/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/Dockerfile.jdk11 new file mode 100644 index 000000000..4a6787e37 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.18 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.18/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.18/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/docker-compose.yml new file mode 100644 index 000000000..c4e86d9a3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.18" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.18-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.18-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.18/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.18/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/7/7.21.19/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/.env new file mode 100644 index 000000000..c0140e117 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.19 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.19/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/Dockerfile new file mode 100644 index 000000000..47bbad595 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.19 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.19/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/Dockerfile.jdk11 new file mode 100644 index 000000000..7191d1db5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.19 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.19/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.19/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/docker-compose.yml new file mode 100644 index 000000000..1c980380e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.19" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.19-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.19-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.19/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.19/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/7/7.21.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/.env new file mode 100644 index 000000000..46bd5f4ef --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/Dockerfile new file mode 100644 index 000000000..0625ab59b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/Dockerfile.jdk11 new file mode 100644 index 000000000..73a9afc63 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/docker-compose.yml new file mode 100644 index 000000000..c5fe9d919 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.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/7/7.21.20/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/.env new file mode 100644 index 000000000..f10cb1023 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.20 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.20/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/Dockerfile new file mode 100644 index 000000000..f1346c4a2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.20 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.20/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/Dockerfile.jdk11 new file mode 100644 index 000000000..2bb2a6af0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.20 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.20/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.20/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/docker-compose.yml new file mode 100644 index 000000000..55c902659 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.20" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.20-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.20-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.20/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.20/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/7/7.21.21/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/.env new file mode 100644 index 000000000..e53199424 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.21 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.21/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/Dockerfile new file mode 100644 index 000000000..0c54791fc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.21 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.21/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/Dockerfile.jdk11 new file mode 100644 index 000000000..f67a69c8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.21 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.21/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.21/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/docker-compose.yml new file mode 100644 index 000000000..1215fe68a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.21" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.21-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.21-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.21/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.21/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/7/7.21.22/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/.env new file mode 100644 index 000000000..dacc57575 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.22 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.22/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/Dockerfile new file mode 100644 index 000000000..206d5edd1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.22 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.22/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/Dockerfile.jdk11 new file mode 100644 index 000000000..ebe5752f9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.22 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.22/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.22/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/docker-compose.yml new file mode 100644 index 000000000..3c536d27d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.22" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.22-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.22-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.22/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.22/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/7/7.21.23/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/.env new file mode 100644 index 000000000..743015f83 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.23 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.23/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/Dockerfile new file mode 100644 index 000000000..f13b7ce34 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.23 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.23/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/Dockerfile.jdk11 new file mode 100644 index 000000000..4c370d563 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.23 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.23/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.23/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/docker-compose.yml new file mode 100644 index 000000000..d43ade02f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.23" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.23-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.23-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.23/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.23/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/7/7.21.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/.env new file mode 100644 index 000000000..2c1a2ba46 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/Dockerfile new file mode 100644 index 000000000..32e71084c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/Dockerfile.jdk11 new file mode 100644 index 000000000..ff0a42ea9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/docker-compose.yml new file mode 100644 index 000000000..786cc4055 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.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/7/7.21.4/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.4/.env new file mode 100644 index 000000000..5e1fd569b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.4/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.4/Dockerfile index 3a07e69bc..f51cd6b2c 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.21.4/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.4/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.21.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.21.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.4/Dockerfile.jdk11 index 09c574181..2d68b5ea4 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.21.4/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.4/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=7.21.4 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=7.21.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.4/docker-compose.yml index 683d87098..b2e919cae 100644 --- a/linux/ecosystem/atlassian/bitbucket/7/7.21.4/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.4/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:7.21.4" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.4-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:7.21.4-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.5/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/.env new file mode 100644 index 000000000..476db0c4c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/Dockerfile new file mode 100644 index 000000000..1d19a1a39 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/Dockerfile.jdk11 new file mode 100644 index 000000000..481cbd5c7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.5/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/docker-compose.yml new file mode 100644 index 000000000..1540c6a96 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.5/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/7/7.21.6/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/.env new file mode 100644 index 000000000..67a2e7d3e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/Dockerfile new file mode 100644 index 000000000..55af87bb2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/Dockerfile.jdk11 new file mode 100644 index 000000000..9e682c078 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.6/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/docker-compose.yml new file mode 100644 index 000000000..f03974857 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.6/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/7/7.21.7/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/.env new file mode 100644 index 000000000..e930f3ee5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/Dockerfile new file mode 100644 index 000000000..b81bc6fae --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.7/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/Dockerfile.jdk11 new file mode 100644 index 000000000..043794e3a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.7/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/docker-compose.yml new file mode 100644 index 000000000..946064653 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.7-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.7-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.7/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/7/7.21.8/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/.env new file mode 100644 index 000000000..9fc839f4b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/Dockerfile new file mode 100644 index 000000000..60421e8d4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.8/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/Dockerfile.jdk11 new file mode 100644 index 000000000..2373c7496 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.8/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/docker-compose.yml new file mode 100644 index 000000000..0a5a5b2a0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.8-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.8-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.8/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/7/7.21.9/.env b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/.env new file mode 100644 index 000000000..ec325272f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/.env @@ -0,0 +1,2 @@ +RELEASE=7.21.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/Dockerfile new file mode 100644 index 000000000..dfdf584eb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.9/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/Dockerfile.jdk11 new file mode 100644 index 000000000..6485045a5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.21.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.9/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.21.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/docker-compose.yml new file mode 100644 index 000000000..6b01f6295 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.21.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.21.9-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.21.9-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.21.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.21.9/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/7/7.3.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/.env new file mode 100644 index 000000000..73449420a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.3.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/Dockerfile new file mode 100644 index 000000000..fdb345bda --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/Dockerfile.jdk11 new file mode 100644 index 000000000..f2f85bd6e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.3.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/docker-compose.yml new file mode 100644 index 000000000..708d68c1f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.3.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.3.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.3.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.3.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.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/7/7.3.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/.env new file mode 100644 index 000000000..a51ff5d74 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.3.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/Dockerfile new file mode 100644 index 000000000..2f83b4f2b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/Dockerfile.jdk11 new file mode 100644 index 000000000..3eb33c6ab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.3.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/docker-compose.yml new file mode 100644 index 000000000..055e80082 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.3.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.3.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.3.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.3.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.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/7/7.3.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/.env new file mode 100644 index 000000000..825340de6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.3.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/Dockerfile new file mode 100644 index 000000000..46f0bb597 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/Dockerfile.jdk11 new file mode 100644 index 000000000..075350471 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.3.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/docker-compose.yml new file mode 100644 index 000000000..9e9040bd0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.3.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.3.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.3.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.3.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.3.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.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/7/7.4.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/.env new file mode 100644 index 000000000..c5fe48d72 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.4.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/Dockerfile new file mode 100644 index 000000000..17f948790 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/Dockerfile.jdk11 new file mode 100644 index 000000000..693a41d50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.4.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/docker-compose.yml new file mode 100644 index 000000000..98d7dcc83 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.4.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.4.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.4.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.4.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.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/7/7.4.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/.env new file mode 100644 index 000000000..4a7ad0f3a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.4.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/Dockerfile new file mode 100644 index 000000000..a14d6a9f0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.4.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/Dockerfile.jdk11 new file mode 100644 index 000000000..de93f497a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.4.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.4.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/docker-compose.yml new file mode 100644 index 000000000..0e5729b7c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.4.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.4.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.4.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.4.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.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/7/7.4.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/.env new file mode 100644 index 000000000..286304282 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.4.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/Dockerfile new file mode 100644 index 000000000..9f55487f2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.4.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/Dockerfile.jdk11 new file mode 100644 index 000000000..dc5ace198 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.4.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.4.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/docker-compose.yml new file mode 100644 index 000000000..d7ba73fe1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.4.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.4.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.4.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.4.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.4.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.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/7/7.5.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/.env new file mode 100644 index 000000000..b9f0e5bc9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.5.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/Dockerfile new file mode 100644 index 000000000..b811d254a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.5.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/Dockerfile.jdk11 new file mode 100644 index 000000000..9038d5f74 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.5.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.5.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/docker-compose.yml new file mode 100644 index 000000000..405e9967f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.5.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.5.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.5.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.5.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.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/7/7.5.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/.env new file mode 100644 index 000000000..c55ee8bdf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.5.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/Dockerfile new file mode 100644 index 000000000..5e884d0d4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.5.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/Dockerfile.jdk11 new file mode 100644 index 000000000..5c9841905 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.5.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.5.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/docker-compose.yml new file mode 100644 index 000000000..4b2ba561d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.5.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.5.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.5.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.5.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.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/7/7.5.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/.env new file mode 100644 index 000000000..c6ee20fd2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.5.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/Dockerfile new file mode 100644 index 000000000..7be282e4d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.5.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/Dockerfile.jdk11 new file mode 100644 index 000000000..e3880e0a7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.5.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.5.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/docker-compose.yml new file mode 100644 index 000000000..2da626102 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.5.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.5.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.5.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.5.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.5.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.5.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/7/7.6.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/.env new file mode 100644 index 000000000..854450ce2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/Dockerfile new file mode 100644 index 000000000..ca23607c6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/Dockerfile.jdk11 new file mode 100644 index 000000000..dacebf891 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/docker-compose.yml new file mode 100644 index 000000000..a31223ed3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.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/7/7.6.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/.env new file mode 100644 index 000000000..07704dd6f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/Dockerfile new file mode 100644 index 000000000..3d65ecb0f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/Dockerfile.jdk11 new file mode 100644 index 000000000..e7a5205ba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/docker-compose.yml new file mode 100644 index 000000000..45f8905df --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.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/7/7.6.10/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/.env new file mode 100644 index 000000000..68be80ff6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.10 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.10/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/Dockerfile new file mode 100644 index 000000000..e5276984f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.10/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/Dockerfile.jdk11 new file mode 100644 index 000000000..563e7fa16 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.10/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.10/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/docker-compose.yml new file mode 100644 index 000000000..56e27fb14 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.10" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.10-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.10-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.10/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.10/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/7/7.6.11/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/.env new file mode 100644 index 000000000..677b3b643 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.11 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.11/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/Dockerfile new file mode 100644 index 000000000..20c47d8aa --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.11/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/Dockerfile.jdk11 new file mode 100644 index 000000000..7f4dcef3c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.11/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.11/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/docker-compose.yml new file mode 100644 index 000000000..9cd94bec0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.11" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.11-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.11-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.11/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.11/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/7/7.6.12/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/.env new file mode 100644 index 000000000..883e809dc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.12 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.12/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/Dockerfile new file mode 100644 index 000000000..2300119e1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.12/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/Dockerfile.jdk11 new file mode 100644 index 000000000..fe25b06e1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.12/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.12/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/docker-compose.yml new file mode 100644 index 000000000..1f2daa7d0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.12" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.12-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.12-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.12/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.12/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/7/7.6.13/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/.env new file mode 100644 index 000000000..db0eff3de --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.13 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.13/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/Dockerfile new file mode 100644 index 000000000..5c5e188e5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.13/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/Dockerfile.jdk11 new file mode 100644 index 000000000..0cb64f3d0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.13/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.13/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/docker-compose.yml new file mode 100644 index 000000000..42719f601 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.13" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.13-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.13-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.13/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.13/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/7/7.6.14/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/.env new file mode 100644 index 000000000..81de091ba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.14 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.14/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/Dockerfile new file mode 100644 index 000000000..ec4d94bbb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.14/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/Dockerfile.jdk11 new file mode 100644 index 000000000..64152f08e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.14/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.14/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/docker-compose.yml new file mode 100644 index 000000000..269139df0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.14" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.14-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.14-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.14/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.14/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/7/7.6.15/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/.env new file mode 100644 index 000000000..456d607fc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.15 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.15/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/Dockerfile new file mode 100644 index 000000000..2b5f706de --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.15/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/Dockerfile.jdk11 new file mode 100644 index 000000000..119ab5708 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.15/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.15/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/docker-compose.yml new file mode 100644 index 000000000..4e187a2bd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.15" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.15-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.15-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.15/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.15/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/7/7.6.16/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/.env new file mode 100644 index 000000000..892ac1298 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.16 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.16/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/Dockerfile new file mode 100644 index 000000000..f75775414 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.16/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/Dockerfile.jdk11 new file mode 100644 index 000000000..035317b2f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.16/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.16/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/docker-compose.yml new file mode 100644 index 000000000..f8a81449f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.16" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.16-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.16-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.16/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.16/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/7/7.6.17/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/.env new file mode 100644 index 000000000..c688d2037 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.17 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.17/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/Dockerfile new file mode 100644 index 000000000..7bfa8fa68 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.17/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/Dockerfile.jdk11 new file mode 100644 index 000000000..e8ba79a0e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.17/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.17/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/docker-compose.yml new file mode 100644 index 000000000..0d2bc724c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.17" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.17-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.17-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.17/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.17/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/7/7.6.19/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/.env new file mode 100644 index 000000000..a95ead050 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.19 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.19/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/Dockerfile new file mode 100644 index 000000000..939e7175d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.19 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.19/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/Dockerfile.jdk11 new file mode 100644 index 000000000..a0ea9c78e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.19 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.19/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.19/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/docker-compose.yml new file mode 100644 index 000000000..581b8a315 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.19" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.19-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.19-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.19/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.19/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/7/7.6.2/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/.env new file mode 100644 index 000000000..060a26fc6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/Dockerfile new file mode 100644 index 000000000..349534391 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/Dockerfile.jdk11 new file mode 100644 index 000000000..4cec49d6b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.2/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/docker-compose.yml new file mode 100644 index 000000000..ae877d6d5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.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/7/7.6.20/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/.env new file mode 100644 index 000000000..e2a78c74a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.20 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.20/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/Dockerfile new file mode 100644 index 000000000..6c019e14f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.20 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.20/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/Dockerfile.jdk11 new file mode 100644 index 000000000..75d7d79d2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.20 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.20/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.20/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/docker-compose.yml new file mode 100644 index 000000000..f8f7ae26f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.20" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.20-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.20-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.20/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.20/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/7/7.6.21/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/.env new file mode 100644 index 000000000..8ccaf8236 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.21 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.21/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/Dockerfile new file mode 100644 index 000000000..1b3932880 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.21 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.21/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/Dockerfile.jdk11 new file mode 100644 index 000000000..3dd99fd3d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.21 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.21/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.21/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/docker-compose.yml new file mode 100644 index 000000000..8e8f3f25c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.21" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.21-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.21-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.21/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.21/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/7/7.6.22/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/.env new file mode 100644 index 000000000..211e4d859 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.22 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.22/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/Dockerfile new file mode 100644 index 000000000..0398dbe32 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.22 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.22/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/Dockerfile.jdk11 new file mode 100644 index 000000000..47f28c75f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.22 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.22/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.22/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/docker-compose.yml new file mode 100644 index 000000000..27cd9619d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.22" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.22-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.22-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.22/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.22/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/7/7.6.23/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/.env new file mode 100644 index 000000000..2e42f13ab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.23 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.23/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/Dockerfile new file mode 100644 index 000000000..57861ad3b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.23 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.23/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/Dockerfile.jdk11 new file mode 100644 index 000000000..537e08379 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.23 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.23/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.23/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/docker-compose.yml new file mode 100644 index 000000000..5a272885b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.23" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.23-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.23-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.23/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.23/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/7/7.6.3/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/.env new file mode 100644 index 000000000..465066c56 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/Dockerfile new file mode 100644 index 000000000..083ed7b22 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/Dockerfile.jdk11 new file mode 100644 index 000000000..9f18d1e5c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.3/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/docker-compose.yml new file mode 100644 index 000000000..afa08f7ca --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.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/7/7.6.4/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/.env new file mode 100644 index 000000000..6f614d804 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/Dockerfile new file mode 100644 index 000000000..7cf65fd76 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/Dockerfile.jdk11 new file mode 100644 index 000000000..625e5d917 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.4/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/docker-compose.yml new file mode 100644 index 000000000..9e14e07e4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.4/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/7/7.6.5/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/.env new file mode 100644 index 000000000..63d77c582 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/Dockerfile new file mode 100644 index 000000000..5cc4ad017 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/Dockerfile.jdk11 new file mode 100644 index 000000000..c7c207ec3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.5/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/docker-compose.yml new file mode 100644 index 000000000..64192d940 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.5/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/7/7.6.6/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/.env new file mode 100644 index 000000000..cc3a05588 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/Dockerfile new file mode 100644 index 000000000..a6ce7803c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/Dockerfile.jdk11 new file mode 100644 index 000000000..2a21de114 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.6/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/docker-compose.yml new file mode 100644 index 000000000..6b51242f3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.6/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/7/7.6.7/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/.env new file mode 100644 index 000000000..e2857bec1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/Dockerfile new file mode 100644 index 000000000..34629f189 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.7/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/Dockerfile.jdk11 new file mode 100644 index 000000000..3531091be --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.7/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/docker-compose.yml new file mode 100644 index 000000000..07dceadc8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.7-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.7-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.7/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/7/7.6.8/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/.env new file mode 100644 index 000000000..262eebedf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/Dockerfile new file mode 100644 index 000000000..a03ebbb40 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.8/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/Dockerfile.jdk11 new file mode 100644 index 000000000..067972773 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.8/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/docker-compose.yml new file mode 100644 index 000000000..09e18cdeb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.8-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.8-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.8/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/7/7.6.9/.env b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/.env new file mode 100644 index 000000000..4f04d1b61 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/.env @@ -0,0 +1,2 @@ +RELEASE=7.6.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/Dockerfile new file mode 100644 index 000000000..8fb992849 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.9/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/Dockerfile.jdk11 new file mode 100644 index 000000000..1a93d43b3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.6.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.9/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.6.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/docker-compose.yml new file mode 100644 index 000000000..771ce4edb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.6.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.6.9-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.6.9-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.6.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.6.9/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/7/7.7.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/.env new file mode 100644 index 000000000..4f8dafd96 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.7.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.7.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/Dockerfile new file mode 100644 index 000000000..8e8286520 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.7.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.7.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/Dockerfile.jdk11 new file mode 100644 index 000000000..35f70b0cd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.7.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.7.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.7.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/docker-compose.yml new file mode 100644 index 000000000..1d627a683 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.7.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.7.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.7.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.7.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.7.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.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/bitbucket/7/7.7.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/.env new file mode 100644 index 000000000..01d42b3b5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.7.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.7.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/Dockerfile new file mode 100644 index 000000000..b274e6a03 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.7.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.7.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/Dockerfile.jdk11 new file mode 100644 index 000000000..e9576aff5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.7.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.7.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.7.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/docker-compose.yml new file mode 100644 index 000000000..4624c5041 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.7.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.7.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.7.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.7.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.7.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.7.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/7/7.8.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/.env new file mode 100644 index 000000000..9afa2f16d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.8.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.8.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/Dockerfile new file mode 100644 index 000000000..351c50111 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.8.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.8.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/Dockerfile.jdk11 new file mode 100644 index 000000000..c87b7e39d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.8.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.8.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.8.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/docker-compose.yml new file mode 100644 index 000000000..3d81ca5f0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.8.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.8.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.8.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.8.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.8.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.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/7/7.8.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/.env new file mode 100644 index 000000000..84a3c15d8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.8.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.8.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/Dockerfile new file mode 100644 index 000000000..cfdd6dd0b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.8.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.8.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/Dockerfile.jdk11 new file mode 100644 index 000000000..524c45a41 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.8.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.8.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.8.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/docker-compose.yml new file mode 100644 index 000000000..b317f6a1b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.8.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.8.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.8.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.8.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.8.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.8.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/7/7.9.0/.env b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/.env new file mode 100644 index 000000000..aab77ccc4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/.env @@ -0,0 +1,2 @@ +RELEASE=7.9.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.9.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/Dockerfile new file mode 100644 index 000000000..2691b7258 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.9.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.9.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/Dockerfile.jdk11 new file mode 100644 index 000000000..82a2ef6bd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.9.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.9.0/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.9.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/docker-compose.yml new file mode 100644 index 000000000..70f6c6477 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.9.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.9.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.9.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.9.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.9.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.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/7/7.9.1/.env b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/.env new file mode 100644 index 000000000..ac890701b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/.env @@ -0,0 +1,2 @@ +RELEASE=7.9.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.9.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/Dockerfile new file mode 100644 index 000000000..f4ce6a4a5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.9.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/Dockerfile.jdk11 new file mode 100644 index 000000000..963907aab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=7.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.9.1/Makefile b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/7/7.9.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/docker-compose.yml new file mode 100644 index 000000000..139cce5d7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:7.9.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:7.9.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:7.9.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/7/7.9.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/7/7.9.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/7/7.9.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.0.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/.env new file mode 100644 index 000000000..b995c70e1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.0.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile index b9d94c7b1..e7cc40107 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.0.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.0.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 f4fc349ea..58b2b3be1 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.0.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.0.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/docker-compose.yml index 606778e68..9bea55746 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.0/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.0.0" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.0.0-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.0.0-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/.env new file mode 100644 index 000000000..fd125b640 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.0.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/Dockerfile new file mode 100644 index 000000000..8f86aecad --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.0.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/Dockerfile.jdk11 new file mode 100644 index 000000000..4f80712e4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.0.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.0.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/docker-compose.yml new file mode 100644 index 000000000..cbd7c864d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.0.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.0.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.0.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.0.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.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.0.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/.env new file mode 100644 index 000000000..6a086d460 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.0.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/Dockerfile new file mode 100644 index 000000000..334631d3d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.0.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/Dockerfile.jdk11 new file mode 100644 index 000000000..36878d484 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.0.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.0.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/docker-compose.yml new file mode 100644 index 000000000..68761dbf9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.0.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.0.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.0.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.0.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.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.0.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/.env new file mode 100644 index 000000000..7e0aecd1c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.0.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile index 64c8d8d0f..5ebd7cd79 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.0.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.0.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 08465b338..fd50ad07f 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.0.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.0.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/docker-compose.yml index da882056d..405a4474f 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.0.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.3/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.0.3" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.0.3-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.0.3-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/.env new file mode 100644 index 000000000..6eb831943 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.0.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/Dockerfile new file mode 100644 index 000000000..59e7e62df --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.0.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/Dockerfile.jdk11 new file mode 100644 index 000000000..6ce6efcd1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.0.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.0.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/docker-compose.yml new file mode 100644 index 000000000..c37a0badb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.0.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.0.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.0.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.4/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.0.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/.env new file mode 100644 index 000000000..fce55ec2e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.0.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/Dockerfile new file mode 100644 index 000000000..e14886440 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.0.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/Dockerfile.jdk11 new file mode 100644 index 000000000..c53fa6e32 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.0.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.0.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/docker-compose.yml new file mode 100644 index 000000000..d6743d79a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.0.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.0.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.0.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.0.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.0.5/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.1.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/.env new file mode 100644 index 000000000..fce52175c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.1.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile index b4e40e451..394af8b7b 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.1.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.1.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 2a129392b..4630c80ac 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.1.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.1.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/docker-compose.yml index 386a66038..4be91d6f1 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.0/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.1.0" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.1.0-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.1.0-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/.env new file mode 100644 index 000000000..5ec5b8ad7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.1.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/Dockerfile new file mode 100644 index 000000000..76a09faaa --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.1.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/Dockerfile.jdk11 new file mode 100644 index 000000000..947109a22 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.1.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.1.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/docker-compose.yml new file mode 100644 index 000000000..f590c1bf7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.1.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.1.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.1.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.1.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.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.1.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/.env new file mode 100644 index 000000000..114587f75 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.1.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/Dockerfile new file mode 100644 index 000000000..8c65a54cb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.1.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/Dockerfile.jdk11 new file mode 100644 index 000000000..1818ae824 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.1.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.1.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/docker-compose.yml new file mode 100644 index 000000000..346b4e624 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.1.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.1.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.1.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.1.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.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.1.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/.env new file mode 100644 index 000000000..9f4592586 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.1.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile index 5985928fd..92108f56b 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.1.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.1.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 94f16a8c3..852f005cd 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.1.3 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.1.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/docker-compose.yml index 7d66dd527..1dddc17c8 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.1.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.3/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.1.3" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.1.3-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.1.3-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/.env new file mode 100644 index 000000000..c1c26da76 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.1.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/Dockerfile new file mode 100644 index 000000000..173844746 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.1.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/Dockerfile.jdk11 new file mode 100644 index 000000000..4ee8f2103 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.1.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.1.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/docker-compose.yml new file mode 100644 index 000000000..088e04ab0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.1.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.1.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.1.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.4/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.1.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/.env new file mode 100644 index 000000000..5d79be1f2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.1.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/Dockerfile new file mode 100644 index 000000000..0d183f5a4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.1.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/Dockerfile.jdk11 new file mode 100644 index 000000000..a02d578ad --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.1.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.1.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/docker-compose.yml new file mode 100644 index 000000000..0fbee9cb8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.1.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.1.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.1.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.1.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.1.5/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.10.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/.env new file mode 100644 index 000000000..0db17ac96 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.10.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Dockerfile new file mode 100644 index 000000000..ef4a9855e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Dockerfile.jdk11 new file mode 100644 index 000000000..d69526a48 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Dockerfile.jdk17 similarity index 80% rename from bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.jdk17 rename to linux/ecosystem/atlassian/bitbucket/8/8.10.0/Dockerfile.jdk17 index 80185bdb7..b7db76528 100644 --- a/bin/ansible/roles/atlassian.bitbucket/files/Dockerfile.jdk17 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Dockerfile.jdk17 @@ -6,8 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL +ARG RELEASE=8.10.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -29,15 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## +ADD ${DOWNLOAD_URL} /tmp RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ - curl --user-agent "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -L ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "${BITBUCKET_INSTALL_DIR}" && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${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-get clean -y && \ apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.10.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/docker-compose.yml new file mode 100644 index 000000000..3de9dad85 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.10.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.10.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.10.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.10.0-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.10.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.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.10.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/.env new file mode 100644 index 000000000..c1b470193 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.10.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Dockerfile new file mode 100644 index 000000000..1f0125929 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Dockerfile.jdk11 new file mode 100644 index 000000000..04caa19a8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Dockerfile.jdk17 new file mode 100644 index 000000000..920d9467e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.10.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/docker-compose.yml new file mode 100644 index 000000000..e94cce486 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.10.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.10.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.10.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.10.1-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.10.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.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.10.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/.env new file mode 100644 index 000000000..ce22c51ef --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.10.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Dockerfile new file mode 100644 index 000000000..7dfcf4c87 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Dockerfile.jdk11 new file mode 100644 index 000000000..6d00ccdf5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Dockerfile.jdk17 new file mode 100644 index 000000000..8d4603f7e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.10.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/docker-compose.yml new file mode 100644 index 000000000..5a3f2711e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.10.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.10.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.10.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.10.2-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.10.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.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.10.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/.env new file mode 100644 index 000000000..c36b8e28f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.10.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Dockerfile new file mode 100644 index 000000000..9baad253f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Dockerfile.jdk11 new file mode 100644 index 000000000..183da3188 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Dockerfile.jdk17 new file mode 100644 index 000000000..3f01d058d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.10.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/docker-compose.yml new file mode 100644 index 000000000..df7942d9a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.10.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.10.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.10.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.10.3-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.10.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.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.10.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/.env new file mode 100644 index 000000000..cb6fdaaa6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.10.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Dockerfile new file mode 100644 index 000000000..7d3bf2eab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Dockerfile.jdk11 new file mode 100644 index 000000000..6b2555460 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Dockerfile.jdk17 new file mode 100644 index 000000000..d6d416717 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.10.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/docker-compose.yml new file mode 100644 index 000000000..971d0e15e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.10.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.10.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.10.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.10.4-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.4/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.10.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/.env new file mode 100644 index 000000000..7b8ea3575 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.10.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Dockerfile new file mode 100644 index 000000000..1a36488f9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Dockerfile.jdk11 new file mode 100644 index 000000000..88e3bebfd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Dockerfile.jdk17 new file mode 100644 index 000000000..c19d1a1c7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.10.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/docker-compose.yml new file mode 100644 index 000000000..1e34888be --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.10.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.10.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.10.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.10.5-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.5/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.10.6/.env b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/.env new file mode 100644 index 000000000..8468e0f4a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/.env @@ -0,0 +1,2 @@ +RELEASE=8.10.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Dockerfile new file mode 100644 index 000000000..3cffe5018 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Dockerfile.jdk11 new file mode 100644 index 000000000..d129fca30 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Dockerfile.jdk17 new file mode 100644 index 000000000..2b545a668 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.10.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.10.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/docker-compose.yml new file mode 100644 index 000000000..a7bcec66c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.10.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.10.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.10.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.10.6-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.10.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.10.6/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.11.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/.env new file mode 100644 index 000000000..4169baf69 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.11.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Dockerfile new file mode 100644 index 000000000..529ed95cf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Dockerfile.jdk11 new file mode 100644 index 000000000..a9821962d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Dockerfile.jdk17 new file mode 100644 index 000000000..a0f6e8121 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.11.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/docker-compose.yml new file mode 100644 index 000000000..ba9d0269c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.11.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.11.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.11.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.11.0-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.11.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.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.11.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/.env new file mode 100644 index 000000000..fab732e21 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.11.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Dockerfile new file mode 100644 index 000000000..6774fd5fc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Dockerfile.jdk11 new file mode 100644 index 000000000..9387c61d4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Dockerfile.jdk17 new file mode 100644 index 000000000..5cf4a9f58 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.11.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/docker-compose.yml new file mode 100644 index 000000000..ac5fc2e7f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.11.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.11.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.11.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.11.1-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.11.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.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.11.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/.env new file mode 100644 index 000000000..3746d52b4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.11.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Dockerfile new file mode 100644 index 000000000..175e7f8d5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Dockerfile.jdk11 new file mode 100644 index 000000000..b18db5666 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Dockerfile.jdk17 new file mode 100644 index 000000000..efae1eacf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.11.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/docker-compose.yml new file mode 100644 index 000000000..1111c0819 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.11.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.11.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.11.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.11.2-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.11.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.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.11.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/.env new file mode 100644 index 000000000..cdddfa5f3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.11.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Dockerfile new file mode 100644 index 000000000..b5940a86b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Dockerfile.jdk11 new file mode 100644 index 000000000..27eeac734 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Dockerfile.jdk17 new file mode 100644 index 000000000..bc678bc88 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.11.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/docker-compose.yml new file mode 100644 index 000000000..ed76f2da2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.11.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.11.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.11.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.11.3-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.11.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.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.11.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/.env new file mode 100644 index 000000000..f65df6174 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.11.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Dockerfile new file mode 100644 index 000000000..504354c7c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Dockerfile.jdk11 new file mode 100644 index 000000000..479f804b8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Dockerfile.jdk17 new file mode 100644 index 000000000..2916c03b7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.11.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/docker-compose.yml new file mode 100644 index 000000000..29fd24b13 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.11.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.11.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.11.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.11.4-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.4/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.11.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/.env new file mode 100644 index 000000000..009bae0fd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.11.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Dockerfile new file mode 100644 index 000000000..5a4915e76 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Dockerfile.jdk11 new file mode 100644 index 000000000..2a2e54b0d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Dockerfile.jdk17 new file mode 100644 index 000000000..fcb729fea --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.11.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/docker-compose.yml new file mode 100644 index 000000000..0b784f2cf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.11.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.11.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.11.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.11.5-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.5/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.11.6/.env b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/.env new file mode 100644 index 000000000..f9d2db456 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/.env @@ -0,0 +1,2 @@ +RELEASE=8.11.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Dockerfile new file mode 100644 index 000000000..a0f020e8f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Dockerfile.jdk11 new file mode 100644 index 000000000..2847e7fa9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Dockerfile.jdk17 new file mode 100644 index 000000000..5b676502c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.11.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.11.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/docker-compose.yml new file mode 100644 index 000000000..4152b202c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.11.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.11.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.11.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.11.6-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.11.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.11.6/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.12.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/.env new file mode 100644 index 000000000..ac3269559 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.12.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile index aaf4631dd..bcbfa6823 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.12.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.12.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,18 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## -RUN apt-get update && \ - apt-get install -y --allow-downgrades git/bullseye-backports - -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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile.jdk11 index 2797acabe..e389bcf65 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.12.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.12.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,19 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## -RUN apt-get update && \ - apt-get install -y --allow-downgrades git/bullseye-backports - -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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile.jdk17 index 3bcc61b7a..cd5b6b570 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile.jdk17 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/Dockerfile.jdk17 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk17 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.12.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.12.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,19 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## -RUN apt-get update && \ - apt-get install -y --allow-downgrades git/bullseye-backports - -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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/docker-compose.yml index c94df29af..7df696223 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.12.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.0/docker-compose.yml @@ -1,16 +1,19 @@ -#version: '3' services: app: image: "epicmorg/bitbucket:8.12.0" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.12.0-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.12.0-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 app-jdk17: image: "epicmorg/bitbucket:8.12.0-jdk17" build: context: . - dockerfile: ./Dockerfile.jdk17 + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/.env new file mode 100644 index 000000000..28a907028 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.12.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Dockerfile new file mode 100644 index 000000000..834b44a76 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Dockerfile.jdk11 new file mode 100644 index 000000000..4e8a4f9d4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Dockerfile.jdk17 new file mode 100644 index 000000000..3024056d7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.12.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/docker-compose.yml new file mode 100644 index 000000000..9786ab6ff --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.12.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.12.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.12.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.12.1-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.12.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.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.12.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/.env new file mode 100644 index 000000000..dfee44037 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.12.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Dockerfile new file mode 100644 index 000000000..f2822e818 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Dockerfile.jdk11 new file mode 100644 index 000000000..c0cd03c89 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Dockerfile.jdk17 new file mode 100644 index 000000000..31fcea1b2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.12.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/docker-compose.yml new file mode 100644 index 000000000..c9de3521f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.12.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.12.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.12.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.12.2-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.12.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.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.12.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/.env new file mode 100644 index 000000000..8c444a1c8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.12.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Dockerfile new file mode 100644 index 000000000..60788e1fd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Dockerfile.jdk11 new file mode 100644 index 000000000..c0adfeb58 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Dockerfile.jdk17 new file mode 100644 index 000000000..2e8186436 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.12.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/docker-compose.yml new file mode 100644 index 000000000..9c5533c29 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.12.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.12.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.12.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.12.3-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.12.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.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.12.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/.env new file mode 100644 index 000000000..229ef0010 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.12.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Dockerfile new file mode 100644 index 000000000..1ccfd114a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Dockerfile.jdk11 new file mode 100644 index 000000000..dc943898c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Dockerfile.jdk17 new file mode 100644 index 000000000..f35f77595 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.12.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/docker-compose.yml new file mode 100644 index 000000000..79ecbdde1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.12.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.12.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.12.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.12.4-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.4/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.12.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/.env new file mode 100644 index 000000000..5e60d55ad --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.12.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Dockerfile new file mode 100644 index 000000000..b98877afd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Dockerfile.jdk11 new file mode 100644 index 000000000..6761dfa8b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Dockerfile.jdk17 new file mode 100644 index 000000000..37c3984db --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.12.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/docker-compose.yml new file mode 100644 index 000000000..f504fc85e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.12.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.12.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.12.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.12.5-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.5/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.12.6/.env b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/.env new file mode 100644 index 000000000..2f0177e9f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/.env @@ -0,0 +1,2 @@ +RELEASE=8.12.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Dockerfile new file mode 100644 index 000000000..5dfb9f6e4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Dockerfile.jdk11 new file mode 100644 index 000000000..1864e1f0a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Dockerfile.jdk17 new file mode 100644 index 000000000..c72c1bb1e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.12.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.12.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/docker-compose.yml new file mode 100644 index 000000000..fbf5bec11 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.12.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.12.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.12.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.12.6-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.12.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.12.6/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.13.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/.env new file mode 100644 index 000000000..17c81badb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.13.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Dockerfile new file mode 100644 index 000000000..a81964be9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Dockerfile.jdk11 new file mode 100644 index 000000000..427130d96 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Dockerfile.jdk17 new file mode 100644 index 000000000..71a85eeb8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.13.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/docker-compose.yml new file mode 100644 index 000000000..52e1eda72 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.13.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.13.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.13.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.13.0-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.13.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.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.13.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/.env new file mode 100644 index 000000000..5a1e70c6a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.13.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Dockerfile new file mode 100644 index 000000000..89c8e0a3c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Dockerfile.jdk11 new file mode 100644 index 000000000..a94fd0ae6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Dockerfile.jdk17 new file mode 100644 index 000000000..aac933da4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.13.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/docker-compose.yml new file mode 100644 index 000000000..d52d7359d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.13.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.13.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.13.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.13.1-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.13.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.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.13.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/.env new file mode 100644 index 000000000..b991fd73e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.13.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Dockerfile new file mode 100644 index 000000000..023ca6bd1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Dockerfile.jdk11 new file mode 100644 index 000000000..7c1857c34 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Dockerfile.jdk17 new file mode 100644 index 000000000..3532c15ca --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.13.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/docker-compose.yml new file mode 100644 index 000000000..ea59ce2c9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.13.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.13.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.13.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.13.2-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.13.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.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.13.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/.env new file mode 100644 index 000000000..46408a6ca --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.13.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Dockerfile new file mode 100644 index 000000000..f804f1a4e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Dockerfile.jdk11 new file mode 100644 index 000000000..6c94ce33f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Dockerfile.jdk17 new file mode 100644 index 000000000..3cbd1282d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.13.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/docker-compose.yml new file mode 100644 index 000000000..dbe35ee75 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.13.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.13.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.13.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.13.3-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.13.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.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.13.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/.env new file mode 100644 index 000000000..b7eae982b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.13.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Dockerfile new file mode 100644 index 000000000..7cba00510 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Dockerfile.jdk11 new file mode 100644 index 000000000..d05a4cb12 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Dockerfile.jdk17 new file mode 100644 index 000000000..813357300 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.13.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/docker-compose.yml new file mode 100644 index 000000000..42331e560 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.13.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.13.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.13.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.13.4-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.4/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.13.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/.env new file mode 100644 index 000000000..5c1f81127 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.13.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Dockerfile new file mode 100644 index 000000000..f154fd3d3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Dockerfile.jdk11 new file mode 100644 index 000000000..17e3b46e9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Dockerfile.jdk17 new file mode 100644 index 000000000..d09a057ae --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.13.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/docker-compose.yml new file mode 100644 index 000000000..03a32f4a3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.13.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.13.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.13.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.13.5-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.5/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.13.6/.env b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/.env new file mode 100644 index 000000000..2304dc909 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/.env @@ -0,0 +1,2 @@ +RELEASE=8.13.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Dockerfile new file mode 100644 index 000000000..023c42a88 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Dockerfile.jdk11 new file mode 100644 index 000000000..387774e98 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Dockerfile.jdk17 new file mode 100644 index 000000000..505c07533 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.13.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.13.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/docker-compose.yml new file mode 100644 index 000000000..6473e98fd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.13.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.13.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.13.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.13.6-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.13.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.13.6/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.14.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/.env new file mode 100644 index 000000000..fc86f53b3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.14.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Dockerfile new file mode 100644 index 000000000..d3e17d391 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Dockerfile.jdk11 new file mode 100644 index 000000000..25add2219 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Dockerfile.jdk17 new file mode 100644 index 000000000..5197f538b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.14.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/docker-compose.yml new file mode 100644 index 000000000..e4cc8e967 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.14.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.14.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.14.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.14.0-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.14.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.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.14.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/.env new file mode 100644 index 000000000..d625d7e98 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.14.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Dockerfile new file mode 100644 index 000000000..e812a8400 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Dockerfile.jdk11 new file mode 100644 index 000000000..4e7224847 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Dockerfile.jdk17 new file mode 100644 index 000000000..d7708f322 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.14.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/docker-compose.yml new file mode 100644 index 000000000..e02888b97 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.14.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.14.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.14.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.14.1-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.14.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.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.14.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/.env new file mode 100644 index 000000000..6fa9e73dd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.14.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Dockerfile new file mode 100644 index 000000000..4889ee551 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Dockerfile.jdk11 new file mode 100644 index 000000000..8af9ad71d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Dockerfile.jdk17 new file mode 100644 index 000000000..2ba1abd5d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.14.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/docker-compose.yml new file mode 100644 index 000000000..467c5a81e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.14.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.14.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.14.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.14.2-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.14.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.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.14.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/.env new file mode 100644 index 000000000..0ad23e5f6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.14.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Dockerfile new file mode 100644 index 000000000..8cf6d4b99 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Dockerfile.jdk11 new file mode 100644 index 000000000..34dee9e12 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Dockerfile.jdk17 new file mode 100644 index 000000000..8f9018bc9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.14.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/docker-compose.yml new file mode 100644 index 000000000..df1b63339 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.14.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.14.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.14.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.14.3-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.14.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.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.14.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/.env new file mode 100644 index 000000000..8e5a19ccd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.14.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Dockerfile new file mode 100644 index 000000000..5b7a54cae --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Dockerfile.jdk11 new file mode 100644 index 000000000..694cf060c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Dockerfile.jdk17 new file mode 100644 index 000000000..03c599895 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.14.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/docker-compose.yml new file mode 100644 index 000000000..9878de1dc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.14.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.14.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.14.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.14.4-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.4/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.14.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/.env new file mode 100644 index 000000000..212aedf77 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.14.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Dockerfile new file mode 100644 index 000000000..7b4740259 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Dockerfile.jdk11 new file mode 100644 index 000000000..a06e7338c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Dockerfile.jdk17 new file mode 100644 index 000000000..4f675e507 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.14.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/docker-compose.yml new file mode 100644 index 000000000..2b6af9dec --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.14.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.14.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.14.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.14.5-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.5/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.14.6/.env b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/.env new file mode 100644 index 000000000..4b6c7d8d9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/.env @@ -0,0 +1,2 @@ +RELEASE=8.14.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Dockerfile new file mode 100644 index 000000000..abd05db0a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Dockerfile.jdk11 new file mode 100644 index 000000000..19d7729a0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Dockerfile.jdk17 new file mode 100644 index 000000000..820e33acb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.14.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.14.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/docker-compose.yml new file mode 100644 index 000000000..a571215f2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.14.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.14.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.14.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.14.6-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.14.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.14.6/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.15.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/.env new file mode 100644 index 000000000..87f695659 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.15.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Dockerfile new file mode 100644 index 000000000..1e63cc48e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Dockerfile.jdk11 new file mode 100644 index 000000000..7b20daf7f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Dockerfile.jdk17 new file mode 100644 index 000000000..f6b578e96 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.15.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/docker-compose.yml new file mode 100644 index 000000000..66a140650 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.15.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.15.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.15.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.15.0-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.15.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.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.15.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/.env new file mode 100644 index 000000000..18b9210b7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.15.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Dockerfile new file mode 100644 index 000000000..d4c40075a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Dockerfile.jdk11 new file mode 100644 index 000000000..7f28d9515 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Dockerfile.jdk17 new file mode 100644 index 000000000..a9d939f21 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.15.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/docker-compose.yml new file mode 100644 index 000000000..d851f8c2b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.15.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.15.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.15.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.15.1-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.15.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.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.15.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/.env new file mode 100644 index 000000000..947b9e411 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.15.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Dockerfile new file mode 100644 index 000000000..f61f5855d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Dockerfile.jdk11 new file mode 100644 index 000000000..fdf72f254 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Dockerfile.jdk17 new file mode 100644 index 000000000..5bbb87444 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.15.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/docker-compose.yml new file mode 100644 index 000000000..c98e12185 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.15.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.15.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.15.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.15.2-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.15.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.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.15.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/.env new file mode 100644 index 000000000..787c136ff --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.15.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Dockerfile new file mode 100644 index 000000000..96d2ea369 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Dockerfile.jdk11 new file mode 100644 index 000000000..31ef2c2b7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Dockerfile.jdk17 new file mode 100644 index 000000000..3daa435cc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.15.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/docker-compose.yml new file mode 100644 index 000000000..62aa9309f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.15.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.15.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.15.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.15.3-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.15.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.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.15.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/.env new file mode 100644 index 000000000..27628fc13 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.15.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Dockerfile new file mode 100644 index 000000000..81c7d299a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Dockerfile.jdk11 new file mode 100644 index 000000000..2729e7935 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Dockerfile.jdk17 new file mode 100644 index 000000000..a9ef5dad5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.15.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/docker-compose.yml new file mode 100644 index 000000000..22473ffed --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.15.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.15.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.15.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.15.4-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.4/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.15.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/.env new file mode 100644 index 000000000..5ecf4931b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.15.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Dockerfile new file mode 100644 index 000000000..814ad9225 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Dockerfile.jdk11 new file mode 100644 index 000000000..6fc918887 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Dockerfile.jdk17 new file mode 100644 index 000000000..1219651ef --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.15.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.15.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/docker-compose.yml new file mode 100644 index 000000000..ea336d865 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.15.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.15.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.15.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.15.5-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.15.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.15.5/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.16.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/.env new file mode 100644 index 000000000..f951ae25f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.16.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Dockerfile new file mode 100644 index 000000000..4e5f5db4f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Dockerfile.jdk11 new file mode 100644 index 000000000..cf4827f2c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Dockerfile.jdk17 new file mode 100644 index 000000000..7a3b94f24 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.16.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/docker-compose.yml new file mode 100644 index 000000000..67288bec7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.16.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.16.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.16.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.16.0-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.16.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.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.16.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/.env new file mode 100644 index 000000000..e2100e8ed --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.16.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Dockerfile new file mode 100644 index 000000000..fc588f918 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Dockerfile.jdk11 new file mode 100644 index 000000000..a6fecfae4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Dockerfile.jdk17 new file mode 100644 index 000000000..9130b2c8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.16.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/docker-compose.yml new file mode 100644 index 000000000..59ccddcd4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.16.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.16.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.16.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.16.1-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.16.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.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.16.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/.env new file mode 100644 index 000000000..95462e943 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.16.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Dockerfile new file mode 100644 index 000000000..5e9e1f6c8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Dockerfile.jdk11 new file mode 100644 index 000000000..956d938e8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Dockerfile.jdk17 new file mode 100644 index 000000000..fa6ff0ee9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.16.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/docker-compose.yml new file mode 100644 index 000000000..0d5565cdb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.16.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.16.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.16.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.16.2-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.16.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.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.16.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/.env new file mode 100644 index 000000000..4cb90a3fb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.16.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Dockerfile new file mode 100644 index 000000000..82ce998e9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Dockerfile.jdk11 new file mode 100644 index 000000000..580ff1ead --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Dockerfile.jdk17 new file mode 100644 index 000000000..b3efca5ac --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.16.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/docker-compose.yml new file mode 100644 index 000000000..b1c1541f0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.16.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.16.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.16.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.16.3-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.16.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.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.16.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/.env new file mode 100644 index 000000000..6263b145a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.16.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Dockerfile new file mode 100644 index 000000000..1401d7ef5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Dockerfile.jdk11 new file mode 100644 index 000000000..658563a97 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Dockerfile.jdk17 new file mode 100644 index 000000000..8369d1d4a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.16.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.16.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/docker-compose.yml new file mode 100644 index 000000000..f2fd8ca90 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.16.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.16.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.16.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.16.4-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.16.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.16.4/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.17.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.17.0/.env new file mode 100644 index 000000000..79a210228 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.17.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.17.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.17.0/Dockerfile index 19b277c3b..2800e0da3 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.17.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.17.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.17.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,18 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## -RUN apt-get update && \ - apt-get install -y --allow-downgrades git/bullseye-backports - -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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.17.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.17.0/docker-compose.yml index adbdeb52e..bbeceebca 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.17.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.0/docker-compose.yml @@ -4,13 +4,7 @@ services: image: "epicmorg/bitbucket:8.17.0" build: context: . - app-jdk11: - image: "epicmorg/bitbucket:8.17.0-jdk11" - build: - context: . - dockerfile: ./Dockerfile.jdk11 app-jdk17: image: "epicmorg/bitbucket:8.17.0-jdk17" build: context: . - dockerfile: ./Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.17.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.17.1/.env new file mode 100644 index 000000000..012544168 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.17.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.17.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.17.1/Dockerfile new file mode 100644 index 000000000..1a3b58b1a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.17.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.17.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.17.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.17.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.17.1/docker-compose.yml new file mode 100644 index 000000000..b7587257c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.17.1" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.17.1-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.17.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.17.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.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.17.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.17.2/.env new file mode 100644 index 000000000..f4007c97c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.17.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.17.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.17.2/Dockerfile new file mode 100644 index 000000000..ee3100f8b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.17.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.17.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.17.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.17.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.17.2/docker-compose.yml new file mode 100644 index 000000000..ba7f6c1f3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.17.2" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.17.2-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.17.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.17.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.17.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.18.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.18.0/.env new file mode 100644 index 000000000..efc2a6a57 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.18.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.18.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.18.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.18.0/Dockerfile new file mode 100644 index 000000000..e9a902ae8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.18.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.18.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.18.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.18.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.18.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.18.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.18.0/docker-compose.yml new file mode 100644 index 000000000..4b226ff23 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.18.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.18.0" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.18.0-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.18.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.18.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.18.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.18.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.18.1/.env new file mode 100644 index 000000000..2cd6a3999 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.18.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.18.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.18.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.18.1/Dockerfile new file mode 100644 index 000000000..851a05178 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.18.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.18.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.18.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.18.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.18.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.18.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.18.1/docker-compose.yml new file mode 100644 index 000000000..28c9e9c70 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.18.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.18.1" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.18.1-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.18.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.18.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.18.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.19.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.0/.env new file mode 100644 index 000000000..366e37996 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.0/Dockerfile new file mode 100644 index 000000000..25fa1ba07 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.0/docker-compose.yml new file mode 100644 index 000000000..65fdaec6a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.0" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.0-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.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.19.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.1/.env new file mode 100644 index 000000000..1a319f9dc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.1/Dockerfile new file mode 100644 index 000000000..8559a53e4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.1/docker-compose.yml new file mode 100644 index 000000000..013fad4ba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.1" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.1-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.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.19.10/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.10/.env new file mode 100644 index 000000000..3aec0438a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.10/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.10 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.10/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.10/Dockerfile new file mode 100644 index 000000000..80b918067 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.10/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.10/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.10/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.10/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.10/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.10/docker-compose.yml new file mode 100644 index 000000000..2b420c5e8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.10/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.10" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.10-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.10/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.10/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.10/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.19.11/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.11/.env new file mode 100644 index 000000000..9f9eaafd5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.11/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.11 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.11/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.11/Dockerfile new file mode 100644 index 000000000..ed57c78a2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.11/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.11/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.11/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.11/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.11/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.11/docker-compose.yml new file mode 100644 index 000000000..0d539d2ce --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.11/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.11" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.11-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.11/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.11/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.11/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.19.12/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.12/.env new file mode 100644 index 000000000..250408c75 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.12/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.12 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.12/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.12/Dockerfile new file mode 100644 index 000000000..966bc3994 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.12/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.12/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.12/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.12/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.12/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.12/docker-compose.yml new file mode 100644 index 000000000..643dd4d1c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.12/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.12" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.12-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.12/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.12/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.12/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.19.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.2/.env new file mode 100644 index 000000000..30ef1b8c3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.2/Dockerfile new file mode 100644 index 000000000..b08bf5900 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.2/docker-compose.yml new file mode 100644 index 000000000..10ecbbfa0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.2/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.2" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.2-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.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.19.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.3/.env new file mode 100644 index 000000000..f6adb1a4e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.3/Dockerfile new file mode 100644 index 000000000..20f23d3e3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.3/docker-compose.yml new file mode 100644 index 000000000..5028b8d22 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.3/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.3" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.3-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.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.19.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.4/.env new file mode 100644 index 000000000..544d5cab2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.4/Dockerfile new file mode 100644 index 000000000..6e71de078 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.4/docker-compose.yml new file mode 100644 index 000000000..0123a2563 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.4/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.4" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.4-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.4/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.19.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.5/.env new file mode 100644 index 000000000..8a6c33573 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.5/Dockerfile new file mode 100644 index 000000000..8aad521f6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.5/docker-compose.yml new file mode 100644 index 000000000..02de324aa --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.5/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.5" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.5-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.5/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.19.6/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.6/.env new file mode 100644 index 000000000..d729acbad --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.6/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.6/Dockerfile index 69335bafa..edafe5d9d 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.19.6/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.6/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bookworm-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.19.6 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.19.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,18 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## -RUN apt-get update && \ - apt-get install -y --allow-downgrades git/bookworm - -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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.6/docker-compose.yml index ce8e2b411..4e068160f 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.19.6/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.6/docker-compose.yml @@ -4,13 +4,7 @@ services: image: "epicmorg/bitbucket:8.19.6" build: context: . - app-jdk11: - image: "epicmorg/bitbucket:8.19.6-jdk11" - build: - context: . - dockerfile: ./Dockerfile.jdk11 app-jdk17: image: "epicmorg/bitbucket:8.19.6-jdk17" build: context: . - dockerfile: ./Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.7/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.7/.env new file mode 100644 index 000000000..d547024af --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.7/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.7/Dockerfile new file mode 100644 index 000000000..d13975021 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.7/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.7/docker-compose.yml new file mode 100644 index 000000000..80e21329e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.7/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.7" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.7-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.7/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.19.8/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.8/.env new file mode 100644 index 000000000..51f4339c6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.8/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.8/Dockerfile new file mode 100644 index 000000000..6f63024ca --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.8/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.8/docker-compose.yml new file mode 100644 index 000000000..5910980f2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.8/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.8" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.8-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.8/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.19.9/.env b/linux/ecosystem/atlassian/bitbucket/8/8.19.9/.env new file mode 100644 index 000000000..3a11bbde7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.9/.env @@ -0,0 +1,2 @@ +RELEASE=8.19.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.19.9/Dockerfile new file mode 100644 index 000000000..65efb284d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.19.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.9/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.19.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.19.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.19.9/docker-compose.yml new file mode 100644 index 000000000..b4c331178 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.9/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.19.9" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:8.19.9-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.19.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.19.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.19.9/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.2.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/.env new file mode 100644 index 000000000..0221dc70b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.2.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile index 4a7d23da9..ade454228 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.2.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 37fbad1d7..9c57addde 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.2.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/docker-compose.yml index bf23ca2e0..1340087be 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.0/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.2.0" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.2.0-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.2.0-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/.env new file mode 100644 index 000000000..32fb4739c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.2.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/Dockerfile new file mode 100644 index 000000000..2255a22bb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.2.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/Dockerfile.jdk11 new file mode 100644 index 000000000..03d3b0c0a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.2.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.2.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/docker-compose.yml new file mode 100644 index 000000000..5d7548cfa --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.2.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.2.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.2.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.2.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.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.2.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/.env new file mode 100644 index 000000000..00cc697b9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.2.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile index 4ebead065..89857778b 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.2.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.2.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 e731a34f8..a6ae4df79 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.2.2 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.2.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/docker-compose.yml index d604b1aee..a8fab9833 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.2.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.2/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.2.2" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.2.2-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.2.2-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/.env new file mode 100644 index 000000000..32eaf5c91 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.2.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/Dockerfile new file mode 100644 index 000000000..249d31a65 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.2.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/Dockerfile.jdk11 new file mode 100644 index 000000000..8ea5b348e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.2.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.2.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/docker-compose.yml new file mode 100644 index 000000000..545699a25 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.2.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.2.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.2.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.2.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.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.2.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/.env new file mode 100644 index 000000000..67cad35d4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.2.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/Dockerfile new file mode 100644 index 000000000..d3ee2625e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.2.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/Dockerfile.jdk11 new file mode 100644 index 000000000..1a7c77c59 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.2.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.2.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/docker-compose.yml new file mode 100644 index 000000000..3911cc6f7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.2.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.2.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.2.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.2.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.2.4/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.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/.env new file mode 100644 index 000000000..e6c12c3ac --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.3.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile index abbf96021..0f32ab9df 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.3.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 b1f0211a0..ff085177d 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.3.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/docker-compose.yml index 9353af574..de9a3a937 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.0/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.3.0" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.3.0-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.3.0-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/.env new file mode 100644 index 000000000..8fed23bf5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.3.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile index 4e54c6921..c62b55e9a 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.3.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 a474f0d8b..7d27332ef 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=8.3.1 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=8.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/docker-compose.yml index b4bdc88e8..6248fc70c 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.1/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.3.1" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.3.1-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.3.1-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/.env new file mode 100644 index 000000000..0e84a11d2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.3.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile index fee6035d6..d973699d7 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile.jdk11 index 70f3cd7d8..304550850 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 index 7e54b22ac..6c56e3112 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.2/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.3.2" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.3.2-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.3.2-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/.env new file mode 100644 index 000000000..2e030161c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.3.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile index f05dfc303..ad8b613d3 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.3.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile.jdk11 index d0b1068e2..dd8a3bfb8 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.3.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 index 108ba9fdb..646ceaff1 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.3.3/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.3/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.3.3" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.3.3-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.3.3-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/.env new file mode 100644 index 000000000..40a329fd4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.3.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/Dockerfile new file mode 100644 index 000000000..a33cd3d08 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.3.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/Dockerfile.jdk11 new file mode 100644 index 000000000..f77e527d8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.3.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/docker-compose.yml new file mode 100644 index 000000000..08a72a73c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.3.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.3.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.3.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.3.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.3.4/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/.env b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/.env new file mode 100644 index 000000000..642b71a8d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.4.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile index 286199885..9e06f4cca 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile.jdk11 index 57135c49a..94aafc91c 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 index 61868183b..1a3d19169 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.0/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.4.0" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.4.0-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.4.0-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/.env new file mode 100644 index 000000000..8a41c9559 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.4.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile index 0cca10338..39b15eb4b 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.4.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile.jdk11 index b7dec5eb1..aa2cfcb8a 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.4.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 index 1884811c2..1c30044ae 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.1/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.4.1" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.4.1-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.4.1-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/.env new file mode 100644 index 000000000..8187c0e5b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.4.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile index 3d287faec..7579dcc04 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.4.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile.jdk11 index 93e999c38..4f538bb80 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.4.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 index 8fbf8d412..b5edee1f3 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.4.2/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.2/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.4.2" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.4.2-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.4.2-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/.env new file mode 100644 index 000000000..bf206ff20 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.4.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/Dockerfile new file mode 100644 index 000000000..912b1ecab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.4.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/Dockerfile.jdk11 new file mode 100644 index 000000000..dec0ffaa7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.4.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/docker-compose.yml new file mode 100644 index 000000000..81d540d74 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.4.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.4.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.4.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.4.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.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.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/.env new file mode 100644 index 000000000..2d8f28e4e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.4.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/Dockerfile new file mode 100644 index 000000000..8262e3d10 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.4.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/Dockerfile.jdk11 new file mode 100644 index 000000000..d474c3340 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.4.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/docker-compose.yml new file mode 100644 index 000000000..f10f48e83 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.4.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.4.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.4.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.4.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.4.4/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/.env b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/.env new file mode 100644 index 000000000..efda4b2a3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.5.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile index 04cf911ef..d9216d487 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.5.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile.jdk11 index babf05fb4..8a77a44a7 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.5.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 index a5829ce53..62a37d209 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.5.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.0/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.5.0" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.5.0-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.5.0-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/.env new file mode 100644 index 000000000..0a2b6aab5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.5.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile index 65c77cb8d..d7caa0fe6 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.5.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile.jdk11 index 2324dcb9e..c7b198288 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.5.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 index eafe0748c..829812778 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.5.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.1/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.5.1" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.5.1-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.5.1-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/.env new file mode 100644 index 000000000..5743ad903 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.5.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/Dockerfile new file mode 100644 index 000000000..bda19a781 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.5.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/Dockerfile.jdk11 new file mode 100644 index 000000000..f505321c8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.5.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/docker-compose.yml new file mode 100644 index 000000000..5e010b621 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.5.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.5.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.5.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.5.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.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.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/.env new file mode 100644 index 000000000..b4ef15fab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.5.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/Dockerfile new file mode 100644 index 000000000..765b0a409 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.5.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/Dockerfile.jdk11 new file mode 100644 index 000000000..152b7de04 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.5.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/docker-compose.yml new file mode 100644 index 000000000..13e89faad --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.5.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.5.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.5.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.5.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.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.5.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/.env new file mode 100644 index 000000000..98efd95a4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.5.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/Dockerfile new file mode 100644 index 000000000..9a049b4ba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.5.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/Dockerfile.jdk11 new file mode 100644 index 000000000..f4918c471 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.5.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/docker-compose.yml new file mode 100644 index 000000000..69c747812 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.5.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.5.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.5.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.5.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.5.4/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/.env b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/.env new file mode 100644 index 000000000..3c5574bd7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.6.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile index 6f9aa4a83..5d041a20a 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.6.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile.jdk11 index cf6e67a85..b3e547986 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.6.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 index 60d6abaaa..a5fa8bfb6 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.6.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.0/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.6.0" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.6.0-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.6.0-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/.env new file mode 100644 index 000000000..2f292f1d3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.6.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile index 12ce0fe9e..8a5779680 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.6.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,15 +29,16 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile.jdk11 index fc8256426..b1943f2cd 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.6.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,16 +29,16 @@ 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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 index 7ce844c5f..685e329a1 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.6.1/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.1/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.6.1" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.6.1-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.6.1-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/.env new file mode 100644 index 000000000..e8752b2c5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.6.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/Dockerfile new file mode 100644 index 000000000..1e1cce8e6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.6.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/Dockerfile.jdk11 new file mode 100644 index 000000000..1ce071c2a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.6.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/docker-compose.yml new file mode 100644 index 000000000..178767f93 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.6.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.6.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.6.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.6.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.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.6.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/.env new file mode 100644 index 000000000..9ea9b06e5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.6.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/Dockerfile new file mode 100644 index 000000000..5ebdca273 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.6.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/Dockerfile.jdk11 new file mode 100644 index 000000000..26f944c2f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.6.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/docker-compose.yml new file mode 100644 index 000000000..a9bede63b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.6.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.6.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.6.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.6.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.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.6.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/.env new file mode 100644 index 000000000..e8cd4a34d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.6.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/Dockerfile new file mode 100644 index 000000000..be4cd9f8b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.6.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/Dockerfile.jdk11 new file mode 100644 index 000000000..40432161c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.6.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/docker-compose.yml new file mode 100644 index 000000000..996f2d588 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.6.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.6.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.6.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.6.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.6.4/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/.env b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/.env new file mode 100644 index 000000000..abd9b8752 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.7.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile index b41877b0f..df9d3bc31 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.7.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,18 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## -RUN apt-get update && \ - apt-get install -y --allow-downgrades git/bullseye-backports - -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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile.jdk11 index 6406a27fc..f3cab2610 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket 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 + +ARG RELEASE=8.7.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,19 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## -RUN apt-get update && \ - apt-get install -y --allow-downgrades git/bullseye-backports - -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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] 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 index 1a4f52529..42bfe2c31 100644 --- a/linux/ecosystem/atlassian/bitbucket/8/8.7.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.0/docker-compose.yml @@ -4,8 +4,12 @@ services: image: "epicmorg/bitbucket:8.7.0" build: context: . + app-jdk8: + image: "epicmorg/bitbucket:8.7.0-jdk8" + build: + context: . app-jdk11: image: "epicmorg/bitbucket:8.7.0-jdk11" build: context: . - dockerfile: ./Dockerfile.jdk11 + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/.env new file mode 100644 index 000000000..5faffa303 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.7.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/Dockerfile new file mode 100644 index 000000000..fe307cbbd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.7.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/Dockerfile.jdk11 new file mode 100644 index 000000000..9d94e96f7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.7.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/docker-compose.yml new file mode 100644 index 000000000..80fef63a9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.7.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.7.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.7.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.7.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.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.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/.env new file mode 100644 index 000000000..cd36bfe6b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.7.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/Dockerfile new file mode 100644 index 000000000..d01c98c4b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.7.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/Dockerfile.jdk11 new file mode 100644 index 000000000..29cd3cfa6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.7.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/docker-compose.yml new file mode 100644 index 000000000..f0278fb84 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.7.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.7.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.7.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.7.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.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.7.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/.env new file mode 100644 index 000000000..f5cd11ca0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.7.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/Dockerfile new file mode 100644 index 000000000..6d5c4949d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.7.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/Dockerfile.jdk11 new file mode 100644 index 000000000..74cef3b42 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.7.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/docker-compose.yml new file mode 100644 index 000000000..42c757a84 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.7.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.7.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.7.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.7.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.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.7.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/.env new file mode 100644 index 000000000..9142db993 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.7.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/Dockerfile new file mode 100644 index 000000000..a901b36a5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.7.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/Dockerfile.jdk11 new file mode 100644 index 000000000..69b087dc1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.7.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/docker-compose.yml new file mode 100644 index 000000000..340c55dcf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.7.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.7.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.7.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.4/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.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/.env new file mode 100644 index 000000000..6f8a3096e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.7.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/Dockerfile new file mode 100644 index 000000000..bfa0fde93 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.7.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/Dockerfile.jdk11 new file mode 100644 index 000000000..97d728d76 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.7.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/docker-compose.yml new file mode 100644 index 000000000..e320cb581 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:8.7.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.7.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.7.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.7.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.7.5/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.8.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/.env new file mode 100644 index 000000000..f67575849 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.8.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Dockerfile new file mode 100644 index 000000000..d7f5b12a7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Dockerfile.jdk11 new file mode 100644 index 000000000..2aae97080 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Dockerfile.jdk17 new file mode 100644 index 000000000..fdbd18e85 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.8.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/docker-compose.yml new file mode 100644 index 000000000..9e81016fa --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.8.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.8.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.8.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.8.0-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.8.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.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.8.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/.env new file mode 100644 index 000000000..17aa987a7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.8.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Dockerfile new file mode 100644 index 000000000..42c7667c9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Dockerfile.jdk11 new file mode 100644 index 000000000..0d4ff11b4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Dockerfile.jdk17 new file mode 100644 index 000000000..ddae223c3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.8.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/docker-compose.yml new file mode 100644 index 000000000..508730155 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.8.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.8.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.8.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.8.1-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.8.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.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.8.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/.env new file mode 100644 index 000000000..17d00056d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.8.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Dockerfile new file mode 100644 index 000000000..2afbdd373 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Dockerfile.jdk11 new file mode 100644 index 000000000..83620dfdc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Dockerfile.jdk17 new file mode 100644 index 000000000..7c320e0ba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.8.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/docker-compose.yml new file mode 100644 index 000000000..37db09a17 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.8.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.8.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.8.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.8.2-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.8.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.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.8.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/.env new file mode 100644 index 000000000..13124a916 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.8.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Dockerfile new file mode 100644 index 000000000..9b408f2fe --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Dockerfile.jdk11 new file mode 100644 index 000000000..87dda73a2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Dockerfile.jdk17 new file mode 100644 index 000000000..376fd5f18 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.8.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/docker-compose.yml new file mode 100644 index 000000000..bb2a1016b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.8.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.8.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.8.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.8.3-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.8.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.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.8.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/.env new file mode 100644 index 000000000..5f6ac6fe8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.8.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Dockerfile new file mode 100644 index 000000000..3ffa0cc7e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Dockerfile.jdk11 new file mode 100644 index 000000000..756081718 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Dockerfile.jdk17 new file mode 100644 index 000000000..27fb3d5e3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.8.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/docker-compose.yml new file mode 100644 index 000000000..383b883bd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.8.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.8.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.8.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.8.4-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.4/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.8.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/.env new file mode 100644 index 000000000..398036dd8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.8.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Dockerfile new file mode 100644 index 000000000..3ba995a65 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Dockerfile.jdk11 new file mode 100644 index 000000000..e3f4529b3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Dockerfile.jdk17 new file mode 100644 index 000000000..aac6fcff5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.8.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/docker-compose.yml new file mode 100644 index 000000000..4da35e919 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.8.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.8.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.8.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.8.5-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.5/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.8.6/.env b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/.env new file mode 100644 index 000000000..42fa899e0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/.env @@ -0,0 +1,2 @@ +RELEASE=8.8.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Dockerfile new file mode 100644 index 000000000..9b94577fc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Dockerfile.jdk11 new file mode 100644 index 000000000..e825a3a56 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Dockerfile.jdk17 new file mode 100644 index 000000000..d1828e7df --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.8.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/docker-compose.yml new file mode 100644 index 000000000..333055fa6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.8.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.8.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.8.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.8.6-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.6/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.8.7/.env b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/.env new file mode 100644 index 000000000..9f039bfba --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/.env @@ -0,0 +1,2 @@ +RELEASE=8.8.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Dockerfile new file mode 100644 index 000000000..a039ef6f4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Dockerfile.jdk11 new file mode 100644 index 000000000..1c27520f3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Dockerfile.jdk17 new file mode 100644 index 000000000..3ba498e80 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.8.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.8.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/docker-compose.yml new file mode 100644 index 000000000..4a592c0c6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.8.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.8.7-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.8.7-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.8.7-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.8.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.8.7/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.9.0/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/.env new file mode 100644 index 000000000..520a87265 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Dockerfile new file mode 100644 index 000000000..5cd3eba13 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Dockerfile.jdk11 new file mode 100644 index 000000000..39c385a0d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Dockerfile.jdk17 new file mode 100644 index 000000000..376f35bdf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/docker-compose.yml new file mode 100644 index 000000000..bb048f525 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.0" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.0-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.0-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.0-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.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.9.1/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/.env new file mode 100644 index 000000000..be60e67bf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Dockerfile new file mode 100644 index 000000000..0a920629d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Dockerfile.jdk11 new file mode 100644 index 000000000..1e1d51270 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Dockerfile.jdk17 new file mode 100644 index 000000000..28ead6756 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/docker-compose.yml new file mode 100644 index 000000000..3395141ea --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.1" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.1-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.1-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.1-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.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.9.10/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/.env new file mode 100644 index 000000000..691c68b91 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.10 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Dockerfile new file mode 100644 index 000000000..20bc50901 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Dockerfile.jdk11 new file mode 100644 index 000000000..43a686cf0 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Dockerfile.jdk17 new file mode 100644 index 000000000..36984d5f8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.10 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.10/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/docker-compose.yml new file mode 100644 index 000000000..7f6deae22 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.10" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.10-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.10-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.10-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.10/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.10/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.9.11/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/.env new file mode 100644 index 000000000..5fa26cbff --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.11 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Dockerfile new file mode 100644 index 000000000..66720a313 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Dockerfile.jdk11 new file mode 100644 index 000000000..3cd87550f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Dockerfile.jdk17 new file mode 100644 index 000000000..4b6d50eb1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.11 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.11/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/docker-compose.yml new file mode 100644 index 000000000..9ff8c4ca1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.11" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.11-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.11-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.11-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.11/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.11/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.9.12/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/.env new file mode 100644 index 000000000..8eb49eebf --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.12 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Dockerfile new file mode 100644 index 000000000..9e47d69ca --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Dockerfile.jdk11 new file mode 100644 index 000000000..4fd644151 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Dockerfile.jdk17 new file mode 100644 index 000000000..3dc83b3b4 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.12 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.12/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/docker-compose.yml new file mode 100644 index 000000000..f4992fc68 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.12" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.12-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.12-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.12-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.12/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.12/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.9.13/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/.env new file mode 100644 index 000000000..6b212f3cc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.13 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Dockerfile new file mode 100644 index 000000000..5fd31f04f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Dockerfile.jdk11 new file mode 100644 index 000000000..c791476c9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Dockerfile.jdk17 new file mode 100644 index 000000000..abbb13d5c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.13 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.13/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/docker-compose.yml new file mode 100644 index 000000000..ea9e626a3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.13" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.13-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.13-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.13-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.13/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.13/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.9.14/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/.env new file mode 100644 index 000000000..7e55cc30e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.14 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Dockerfile new file mode 100644 index 000000000..a92df1f00 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Dockerfile.jdk11 new file mode 100644 index 000000000..0da8c1061 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Dockerfile.jdk17 new file mode 100644 index 000000000..b7359a4ab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.14 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.14/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/docker-compose.yml new file mode 100644 index 000000000..114a13409 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.14" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.14-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.14-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.14-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.14/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.14/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.9.15/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/.env new file mode 100644 index 000000000..4ea3d9b85 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.15 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Dockerfile new file mode 100644 index 000000000..a32c7401d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Dockerfile.jdk11 new file mode 100644 index 000000000..930996a95 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Dockerfile.jdk17 new file mode 100644 index 000000000..b9ea54668 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.15 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.15/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/docker-compose.yml new file mode 100644 index 000000000..aefb168cd --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.15" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.15-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.15-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.15-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.15/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.15/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.9.16/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/.env new file mode 100644 index 000000000..3352b7c8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.16 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Dockerfile new file mode 100644 index 000000000..6049611fc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Dockerfile.jdk11 new file mode 100644 index 000000000..10ee9fd55 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Dockerfile.jdk17 new file mode 100644 index 000000000..98b3dfb0f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.16 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.16/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/docker-compose.yml new file mode 100644 index 000000000..dbe75c2f9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.16" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.16-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.16-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.16-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.16/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.16/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.9.17/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/.env new file mode 100644 index 000000000..39db775df --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.17 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Dockerfile new file mode 100644 index 000000000..2fa9eecb7 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Dockerfile.jdk11 new file mode 100644 index 000000000..640d9f31f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Dockerfile.jdk17 new file mode 100644 index 000000000..7bfc1e04b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.17 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.17/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/docker-compose.yml new file mode 100644 index 000000000..c61246593 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.17" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.17-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.17-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.17-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.17/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.17/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.9.18/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/.env new file mode 100644 index 000000000..14ff0ad33 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.18 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Dockerfile new file mode 100644 index 000000000..ab4641dd6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.18 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Dockerfile.jdk11 new file mode 100644 index 000000000..55f47a570 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.18 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Dockerfile.jdk17 new file mode 100644 index 000000000..af313ae2e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.18 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.18/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/docker-compose.yml new file mode 100644 index 000000000..377112e00 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.18" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.18-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.18-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.18-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.18/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.18/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.9.19/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/.env new file mode 100644 index 000000000..c8559c3af --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.19 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Dockerfile new file mode 100644 index 000000000..f4e11058b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.19 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Dockerfile.jdk11 new file mode 100644 index 000000000..2dc7fe817 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.19 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Dockerfile.jdk17 new file mode 100644 index 000000000..4b22f6b20 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.19 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.19/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/docker-compose.yml new file mode 100644 index 000000000..c49b34046 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.19" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.19-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.19-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.19-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.19/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.19/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.9.2/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/.env new file mode 100644 index 000000000..925bee192 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Dockerfile new file mode 100644 index 000000000..b5c1383c5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Dockerfile.jdk11 new file mode 100644 index 000000000..7a06e2805 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Dockerfile.jdk17 new file mode 100644 index 000000000..14eb3da02 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/docker-compose.yml new file mode 100644 index 000000000..6a628d1f8 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.2" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.2-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.2-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.2-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.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.9.20/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/.env new file mode 100644 index 000000000..a71f35294 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.20 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Dockerfile new file mode 100644 index 000000000..4d6a5caef --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.20 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Dockerfile.jdk11 new file mode 100644 index 000000000..7c87d0f95 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.20 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Dockerfile.jdk17 new file mode 100644 index 000000000..50ebbbd0f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.20 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.20/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/docker-compose.yml new file mode 100644 index 000000000..60f22c351 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.20" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.20-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.20-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.20-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.20/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.20/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.9.21/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/.env new file mode 100644 index 000000000..7d29bf21c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.21 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Dockerfile new file mode 100644 index 000000000..f06456774 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.21 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Dockerfile.jdk11 new file mode 100644 index 000000000..5adf1d921 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.21 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Dockerfile.jdk17 new file mode 100644 index 000000000..68e69c759 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.21 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.21/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/docker-compose.yml new file mode 100644 index 000000000..e0421408f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.21" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.21-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.21-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.21-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.21/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.21/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.9.22/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/.env new file mode 100644 index 000000000..bed726d98 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.22 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Dockerfile new file mode 100644 index 000000000..8a2657622 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.22 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Dockerfile.jdk11 new file mode 100644 index 000000000..5aee8ca4b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.22 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Dockerfile.jdk17 new file mode 100644 index 000000000..3a79cdac6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.22 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.22/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/docker-compose.yml new file mode 100644 index 000000000..64185fe7c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.22" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.22-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.22-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.22-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.22/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.22/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.9.3/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/.env new file mode 100644 index 000000000..e62e29911 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.3 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Dockerfile new file mode 100644 index 000000000..34773f9d2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Dockerfile.jdk11 new file mode 100644 index 000000000..4ee91fa07 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Dockerfile.jdk17 new file mode 100644 index 000000000..fac3786be --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.3 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.3/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/docker-compose.yml new file mode 100644 index 000000000..85fd8dd19 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.3" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.3-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.3-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.3-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.3/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.3/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.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.9.4/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/.env new file mode 100644 index 000000000..bb8a857c6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.4 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Dockerfile new file mode 100644 index 000000000..496c70c6d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Dockerfile.jdk11 new file mode 100644 index 000000000..73651b952 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Dockerfile.jdk17 new file mode 100644 index 000000000..376e8c382 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.4 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.4/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/docker-compose.yml new file mode 100644 index 000000000..a010b2a62 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.4" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.4-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.4-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.4-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.4/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.4/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.9.5/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/.env new file mode 100644 index 000000000..12f7f48ae --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.5 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Dockerfile new file mode 100644 index 000000000..979267f7a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Dockerfile.jdk11 new file mode 100644 index 000000000..22570f497 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Dockerfile.jdk17 new file mode 100644 index 000000000..957644379 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.5/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/docker-compose.yml new file mode 100644 index 000000000..c3bef030c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.5" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.5-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.5-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.5-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.5/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.5/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.9.6/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/.env new file mode 100644 index 000000000..f33574938 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.6 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Dockerfile new file mode 100644 index 000000000..4f2ead97e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Dockerfile.jdk11 new file mode 100644 index 000000000..0e9d39044 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Dockerfile.jdk17 new file mode 100644 index 000000000..a770a342c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.6 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.6/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/docker-compose.yml new file mode 100644 index 000000000..26b0a7ee5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.6" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.6-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.6-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.6-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.6/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.6/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.9.7/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/.env new file mode 100644 index 000000000..38820eeee --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.7 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Dockerfile new file mode 100644 index 000000000..e2174840b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Dockerfile.jdk11 new file mode 100644 index 000000000..478b0e1d2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Dockerfile.jdk17 new file mode 100644 index 000000000..396d66024 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.7 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.7/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/docker-compose.yml new file mode 100644 index 000000000..5b1839367 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.7" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.7-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.7-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.7-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.7/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.7/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.9.8/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/.env new file mode 100644 index 000000000..5762e268d --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.8 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Dockerfile new file mode 100644 index 000000000..a03308cc3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Dockerfile.jdk11 new file mode 100644 index 000000000..a75ba0018 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Dockerfile.jdk17 new file mode 100644 index 000000000..8d7ebabe9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.8 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.8/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/docker-compose.yml new file mode 100644 index 000000000..0935b13bc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.8" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.8-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.8-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.8-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.8/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.8/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.9.9/.env b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/.env new file mode 100644 index 000000000..8ddbaa3ff --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/.env @@ -0,0 +1,2 @@ +RELEASE=8.9.9 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Dockerfile b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Dockerfile new file mode 100644 index 000000000..02d2c9603 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk8 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Dockerfile.jdk11 new file mode 100644 index 000000000..730dc365c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Dockerfile.jdk11 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Dockerfile.jdk17 new file mode 100644 index 000000000..310497d5f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Dockerfile.jdk17 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=8.9.9 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Makefile b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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.9.9/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/docker-compose.yml new file mode 100644 index 000000000..dd30061ee --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/docker-compose.yml @@ -0,0 +1,19 @@ +services: + app: + image: "epicmorg/bitbucket:8.9.9" + build: + context: . + app-jdk8: + image: "epicmorg/bitbucket:8.9.9-jdk8" + build: + context: . + app-jdk11: + image: "epicmorg/bitbucket:8.9.9-jdk11" + build: + context: . + dockerfile: Dockerfile.jdk11 + app-jdk17: + image: "epicmorg/bitbucket:8.9.9-jdk17" + build: + context: . + dockerfile: Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/8/8.9.9/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/8/8.9.9/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/9/9.0.0/.env b/linux/ecosystem/atlassian/bitbucket/9/9.0.0/.env new file mode 100644 index 000000000..af02090ec --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.0.0/.env @@ -0,0 +1,2 @@ +RELEASE=9.0.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.0.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/9/9.0.0/Dockerfile index 96896ed42..6b7d3d5c2 100644 --- a/linux/ecosystem/atlassian/bitbucket/9/9.0.0/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/9/9.0.0/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bookworm-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG BITBUCKET_VERSION=9.0.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz + +ARG RELEASE=9.0.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,18 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## -RUN apt-get update && \ - apt-get install -y --allow-downgrades git/bookworm - -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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.0.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/9/9.0.0/docker-compose.yml index 8f9542bab..84396854f 100644 --- a/linux/ecosystem/atlassian/bitbucket/9/9.0.0/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/9/9.0.0/docker-compose.yml @@ -4,13 +4,7 @@ services: image: "epicmorg/bitbucket:9.0.0" build: context: . - app-jdk11: - image: "epicmorg/bitbucket:9.0.0-jdk11" - build: - context: . - dockerfile: ./Dockerfile.jdk11 app-jdk17: image: "epicmorg/bitbucket:9.0.0-jdk17" build: context: . - dockerfile: ./Dockerfile.jdk17 diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.0.1/.env b/linux/ecosystem/atlassian/bitbucket/9/9.0.1/.env new file mode 100644 index 000000000..18b5312b9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.0.1/.env @@ -0,0 +1,2 @@ +RELEASE=9.0.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.0.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/9/9.0.1/Dockerfile new file mode 100644 index 000000000..448f7fa8e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.0.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.0.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.0.1/Makefile b/linux/ecosystem/atlassian/bitbucket/9/9.0.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.0.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/9/9.0.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/9/9.0.1/docker-compose.yml new file mode 100644 index 000000000..0cdd023ab --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.0.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:9.0.1" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:9.0.1-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.0.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/9/9.0.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.0.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/9/9.1.0/.env b/linux/ecosystem/atlassian/bitbucket/9/9.1.0/.env new file mode 100644 index 000000000..9ab3e1802 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.1.0/.env @@ -0,0 +1,2 @@ +RELEASE=9.1.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.1.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/9/9.1.0/Dockerfile new file mode 100644 index 000000000..afda2f1ac --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.1.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.1.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.1.0/Makefile b/linux/ecosystem/atlassian/bitbucket/9/9.1.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.1.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/9/9.1.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/9/9.1.0/docker-compose.yml new file mode 100644 index 000000000..ea14b917f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.1.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:9.1.0" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:9.1.0-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.1.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/9/9.1.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.1.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/9/9.1.1/.env b/linux/ecosystem/atlassian/bitbucket/9/9.1.1/.env new file mode 100644 index 000000000..8427a12e5 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.1.1/.env @@ -0,0 +1,2 @@ +RELEASE=9.1.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.1.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/9/9.1.1/Dockerfile new file mode 100644 index 000000000..0d30dc9b6 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.1.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.1.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.1.1/Makefile b/linux/ecosystem/atlassian/bitbucket/9/9.1.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.1.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/9/9.1.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/9/9.1.1/docker-compose.yml new file mode 100644 index 000000000..789b07495 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.1.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:9.1.1" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:9.1.1-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.1.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/9/9.1.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.1.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/9/9.2.0/.env b/linux/ecosystem/atlassian/bitbucket/9/9.2.0/.env new file mode 100644 index 000000000..d913092dc --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.2.0/.env @@ -0,0 +1,2 @@ +RELEASE=9.2.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.2.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/9/9.2.0/Dockerfile new file mode 100644 index 000000000..5d59fea19 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.2.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.2.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.2.0/Makefile b/linux/ecosystem/atlassian/bitbucket/9/9.2.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.2.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/9/9.2.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/9/9.2.0/docker-compose.yml new file mode 100644 index 000000000..a81e633eb --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.2.0/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:9.2.0" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:9.2.0-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.2.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/9/9.2.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.2.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/9/9.2.1/.env b/linux/ecosystem/atlassian/bitbucket/9/9.2.1/.env new file mode 100644 index 000000000..68f41388a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.2.1/.env @@ -0,0 +1,2 @@ +RELEASE=9.2.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.2.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/9/9.2.1/Dockerfile new file mode 100644 index 000000000..3356135db --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.2.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.2.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.2.1/Makefile b/linux/ecosystem/atlassian/bitbucket/9/9.2.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.2.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/9/9.2.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/9/9.2.1/docker-compose.yml new file mode 100644 index 000000000..8161c5bb3 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.2.1/docker-compose.yml @@ -0,0 +1,10 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:9.2.1" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:9.2.1-jdk17" + build: + context: . diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.2.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/9/9.2.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.2.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/9/9.3.0/.env b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/.env new file mode 100644 index 000000000..81e22eaa2 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/.env @@ -0,0 +1,2 @@ +RELEASE=9.3.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/Dockerfile new file mode 100644 index 000000000..91645b24f --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.0/Dockerfile.jdk21 b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/Dockerfile.jdk21 new file mode 100644 index 000000000..9bf3b9f10 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/Dockerfile.jdk21 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk21 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.3.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.0/Makefile b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/9/9.3.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/docker-compose.yml new file mode 100644 index 000000000..bbc1dbdca --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:9.3.0" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:9.3.0-jdk17" + build: + context: . + app-jdk21: + image: "epicmorg/bitbucket:9.3.0-jdk21" + build: + context: . + dockerfile: Dockerfile.jdk21 diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/9/9.3.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.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/9/9.3.1/.env b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/.env new file mode 100644 index 000000000..e355f1c7b --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/.env @@ -0,0 +1,2 @@ +RELEASE=9.3.1 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.1/Dockerfile b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/Dockerfile new file mode 100644 index 000000000..8b9d6c5d9 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.1/Dockerfile.jdk21 b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/Dockerfile.jdk21 new file mode 100644 index 000000000..0b0dd5114 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/Dockerfile.jdk21 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk21 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.3.1 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.1/Makefile b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/9/9.3.1/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/docker-compose.yml new file mode 100644 index 000000000..be7009ca1 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:9.3.1" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:9.3.1-jdk17" + build: + context: . + app-jdk21: + image: "epicmorg/bitbucket:9.3.1-jdk21" + build: + context: . + dockerfile: Dockerfile.jdk21 diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.1/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/9/9.3.1/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.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/9/9.3.2/.env b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/.env new file mode 100644 index 000000000..6c3ebdd47 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/.env @@ -0,0 +1,2 @@ +RELEASE=9.3.2 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.2/Dockerfile b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/Dockerfile new file mode 100644 index 000000000..77ced4853 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.2/Dockerfile.jdk21 b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/Dockerfile.jdk21 new file mode 100644 index 000000000..1032851da --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/Dockerfile.jdk21 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk21 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.3.2 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.2/Makefile b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/9/9.3.2/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/docker-compose.yml new file mode 100644 index 000000000..5e5f889be --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:9.3.2" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:9.3.2-jdk17" + build: + context: . + app-jdk21: + image: "epicmorg/bitbucket:9.3.2-jdk21" + build: + context: . + dockerfile: Dockerfile.jdk21 diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.3.2/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/9/9.3.2/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.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/9/9.4.0/.env b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/.env new file mode 100644 index 000000000..e3360c41a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/.env @@ -0,0 +1,2 @@ +RELEASE=9.4.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.4.0/Dockerfile b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/Dockerfile new file mode 100644 index 000000000..71624618e --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.4.0/Dockerfile.jdk21 b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/Dockerfile.jdk21 new file mode 100644 index 000000000..603ad9b87 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/Dockerfile.jdk21 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk21 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.4.0/Makefile b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/Makefile new file mode 100644 index 000000000..06e855b50 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/Makefile @@ -0,0 +1,36 @@ +PIP_BREAK_SYSTEM_PACKAGES=1 + +all: app + +app: + make build + make deploy + make clean + +build: + kaniko-wrapper --version + +dry: + make dry-run + +test: + make dry-run + +dry-run: + kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug --dry-run + +build-compose: + docker-compose build --compress --parallel --progress plain + +deploy: + kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:v1.23.2-debug + +deploy-compose: + 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/9/9.4.0/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/docker-compose.yml new file mode 100644 index 000000000..d2c215f08 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/docker-compose.yml @@ -0,0 +1,15 @@ +#version: '3' +services: + app: + image: "epicmorg/bitbucket:9.4.0" + build: + context: . + app-jdk17: + image: "epicmorg/bitbucket:9.4.0-jdk17" + build: + context: . + app-jdk21: + image: "epicmorg/bitbucket:9.4.0-jdk21" + build: + context: . + dockerfile: Dockerfile.jdk21 diff --git a/linux/ecosystem/atlassian/bitbucket/9/9.4.0/entrypoint.sh b/linux/ecosystem/atlassian/bitbucket/9/9.4.0/entrypoint.sh new file mode 100755 index 000000000..842224a8c --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/9/9.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/latest/.env b/linux/ecosystem/atlassian/bitbucket/latest/.env new file mode 100644 index 000000000..e3360c41a --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/latest/.env @@ -0,0 +1,2 @@ +RELEASE=9.4.0 +DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz diff --git a/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile b/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile index 10f8e2563..71624618e 100644 --- a/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile +++ b/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk17 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk17 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG RELEASE=8.17.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${RELEASE}.tar.gz + +ARG RELEASE=9.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,18 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## -RUN apt-get update && \ - apt-get install --allow-downgrades -y git/bullseye-backports - -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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile.jdk11 b/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile.jdk11 index b948565aa..ea83075b1 100644 --- a/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile.jdk11 @@ -1,12 +1,13 @@ -FROM epicmorg/debian:bullseye-jdk11 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" +FROM epicmorg/debian:bookworm-jdk11 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive ################################################################## # ARGuments ################################################################## -ARG RELEASE=8.17.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${RELEASE}.tar.gz + +ARG RELEASE=9.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.tar.gz ################################################################## # Setup @@ -28,19 +29,16 @@ EXPOSE 7999 ################################################################## # Installing ################################################################## -RUN apt-get update && \ - apt-get install --allow-downgrades -y git/bullseye-backports - -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 && \ - +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ - apt clean -y && \ - apt autoclean -y && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* CMD ["/entrypoint.sh", "-fg"] ENTRYPOINT ["/usr/bin/tini", "--"] diff --git a/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile.jdk17 b/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile.jdk17 deleted file mode 100644 index 9c3a9ed6b..000000000 --- a/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile.jdk17 +++ /dev/null @@ -1,47 +0,0 @@ -FROM epicmorg/debian:bullseye-jdk17 -LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" -ARG DEBIAN_FRONTEND=noninteractive - -################################################################## -# ARGuments -################################################################## -ARG RELEASE=8.17.0 -ARG DOWNLOAD_URL=https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${RELEASE}.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 apt-get update && \ - apt-get install --allow-downgrades -y git/bullseye-backports - -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 diff --git a/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile.jdk21 b/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile.jdk21 new file mode 100644 index 000000000..603ad9b87 --- /dev/null +++ b/linux/ecosystem/atlassian/bitbucket/latest/Dockerfile.jdk21 @@ -0,0 +1,45 @@ +FROM epicmorg/debian:bookworm-jdk21 +LABEL maintainer="Atlassian Bitbucket Team; EpicMorg DevTeam, developer@epicm.org" +ARG DEBIAN_FRONTEND=noninteractive + +################################################################## +# ARGuments +################################################################## + +ARG RELEASE=9.4.0 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/stash/downloads/binary/atlassian-bitbucket-${RELEASE}.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 +################################################################## +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${BITBUCKET_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-bitbucket-${RELEASE}.tar.gz --strip-components=1 --directory "${BITBUCKET_INSTALL_DIR}" && \ + chown -R ${RUN_USER}:${RUN_GROUP} ${BITBUCKET_INSTALL_DIR} && \ + update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ + rm -rfv /var/lib/apt/lists/* && \ + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* + +CMD ["/entrypoint.sh", "-fg"] +ENTRYPOINT ["/usr/bin/tini", "--"] +COPY entrypoint.sh /entrypoint.sh diff --git a/linux/ecosystem/atlassian/bitbucket/latest/docker-compose.yml b/linux/ecosystem/atlassian/bitbucket/latest/docker-compose.yml index f4aae3c18..15a6b9970 100644 --- a/linux/ecosystem/atlassian/bitbucket/latest/docker-compose.yml +++ b/linux/ecosystem/atlassian/bitbucket/latest/docker-compose.yml @@ -10,7 +10,11 @@ services: context: . dockerfile: ./Dockerfile.jdk11 app-jdk17: - image: "epicmorg/bitbucket:latest-jdk7" + image: "epicmorg/bitbucket:latest-jdk17" build: context: . - dockerfile: ./Dockerfile.jdk17 + app-jdk21: + image: "epicmorg/bitbucket:latest-jdk21" + build: + context: . + dockerfile: ./Dockerfile.jdk21 diff --git a/linux/ecosystem/atlassian/jira/8/8.22.5/.env b/linux/ecosystem/atlassian/jira/8/8.22.5/.env index 21de4cf2a..02e7ad11f 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.5/.env +++ b/linux/ecosystem/atlassian/jira/8/8.22.5/.env @@ -1,3 +1,2 @@ - RELEASE=8.22.5 -DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-8.22.5.tar.gz +DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-${RELEASE}.tar.gz \ No newline at end of file diff --git a/linux/ecosystem/atlassian/jira/8/8.22.5/Dockerfile b/linux/ecosystem/atlassian/jira/8/8.22.5/Dockerfile index 2977bbd5b..3171f27f1 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.5/Dockerfile +++ b/linux/ecosystem/atlassian/jira/8/8.22.5/Dockerfile @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bullseye-jdk8 +FROM epicmorg/debian:bookworm-jdk8 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive @@ -6,9 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL - +ARG RELEASE=8.22.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-${RELEASE}.tar.gz ################################################################## # Setup @@ -29,18 +28,19 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${JIRA_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-jira-software-${RELEASE}.tar.gz --strip-components=1 --directory "${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/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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* RUN updatedb diff --git a/linux/ecosystem/atlassian/jira/8/8.22.5/Dockerfile.jdk11 b/linux/ecosystem/atlassian/jira/8/8.22.5/Dockerfile.jdk11 index 471e81258..6259ae6d0 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.5/Dockerfile.jdk11 +++ b/linux/ecosystem/atlassian/jira/8/8.22.5/Dockerfile.jdk11 @@ -1,4 +1,4 @@ -FROM epicmorg/debian:bullseye-jdk11 +FROM epicmorg/debian:bookworm-jdk11 LABEL maintainer="Atlassian Jira Server Team; EpicMorg DevTeam, developer@epicm.org" ARG DEBIAN_FRONTEND=noninteractive @@ -6,9 +6,8 @@ ARG DEBIAN_FRONTEND=noninteractive # ARGuments ################################################################## -ARG RELEASE -ARG DOWNLOAD_URL - +ARG RELEASE=8.22.5 +ARG DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-${RELEASE}.tar.gz ################################################################## # Setup @@ -29,18 +28,19 @@ 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 && \ +ADD ${DOWNLOAD_URL} /tmp +RUN mkdir -p ${JIRA_INSTALL_DIR} && \ + tar -xvzf /tmp/atlassian-jira-software-${RELEASE}.tar.gz --strip-components=1 --directory "${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/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 && \ + apt-get clean -y && \ + apt-get autoclean -y && \ rm -rfv /var/lib/apt/lists/* && \ - rm -rfv /var/cache/apt/archives/*.deb + rm -rfv /var/cache/apt/archives/*.deb && \ + rm -rfv /tmp/* RUN updatedb diff --git a/linux/ecosystem/atlassian/jira/8/8.22.5/docker-compose.yml b/linux/ecosystem/atlassian/jira/8/8.22.5/docker-compose.yml index b65684368..ab3931d9b 100644 --- a/linux/ecosystem/atlassian/jira/8/8.22.5/docker-compose.yml +++ b/linux/ecosystem/atlassian/jira/8/8.22.5/docker-compose.yml @@ -1,17 +1,15 @@ -#version: '3' +#version: '3.9' services: app: - image: "epicmorg/jira:${RELEASE}" + image: "epicmorg/jira:8.22.5" + build: + context: . + app-jdk8: + image: "epicmorg/jira:8.22.5-jdk8" build: context: . - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} app-jdk11: - image: "epicmorg/jira:${RELEASE}-jdk11" + image: "epicmorg/jira:8.22.5-jdk11" build: context: . dockerfile: Dockerfile.jdk11 - args: - RELEASE: ${RELEASE} - DOWNLOAD_URL: ${DOWNLOAD_URL} diff --git a/linux/ecosystem/atlassian/jira/8/8.22.5/entrypoint.sh b/linux/ecosystem/atlassian/jira/8/8.22.5/entrypoint.sh index 50ee4ecd1..d87fa3063 100755 --- a/linux/ecosystem/atlassian/jira/8/8.22.5/entrypoint.sh +++ b/linux/ecosystem/atlassian/jira/8/8.22.5/entrypoint.sh @@ -72,6 +72,20 @@ if [ "${CLUSTERED}" == "true" ]; then set_cluster_property "ehcache.multicast.hostName" "${EHCACHE_MULTICAST_HOSTNAME}" fi +function set_home { + echo "Setting up JIRA_HOME.." + + if [ -z "$JIRA_HOME" ]; then + echo "Variable JIRA_HOME is empty. Aborting" + exit 1 + fi + + echo "JIRA_HOME is: ${JIRA_HOME}" + + echo "Patchig jira-application.properties" + sed -i "s|^jira\.home *=.*|jira.home = ${JIRA_HOME}|" ${JIRA_INSTALL_DIR}/atlassian-jira/WEB-INF/classes/jira-application.properties + +} # Start Jira as the correct user if [ "${UID}" -eq 0 ]; then @@ -82,8 +96,18 @@ if [ "${UID}" -eq 0 ]; then chmod -R 700 "${JIRA_HOME}" && chown -R "${RUN_USER}:${RUN_GROUP}" "${JIRA_HOME}" fi + set_home # Now drop privileges - exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" + if [ -f "$JIRA_INSTALL_DIR/bin/start-jira.sh" ]; then + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/start-jira.sh $@" + else + exec su -s /bin/bash "${RUN_USER}" -c "$JIRA_INSTALL_DIR/bin/startup.sh $@" + fi else - exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" + set_home + if [ -f "$JIRA_INSTALL_DIR/bin/start-jira.sh" ]; then + exec "$JIRA_INSTALL_DIR/bin/start-jira.sh" "$@" + else + exec "$JIRA_INSTALL_DIR/bin/startup.sh" "$@" + fi fi