├── .github ├── dependabot.yml └── workflows │ ├── default.yml │ └── nightly.yml ├── Dockerfile ├── Dockerfile-nightly └── README.md /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/workflows/default.yml: -------------------------------------------------------------------------------- 1 | name: default build 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | tags: 8 | - '*' 9 | 10 | jobs: 11 | push_to_registry: 12 | name: Push Docker image to GitHub Container registry 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Check out the repo 16 | uses: actions/checkout@v4 17 | 18 | - name: Docker meta 19 | id: meta 20 | uses: docker/metadata-action@v5 21 | with: 22 | images: ghcr.io/gitbucket/gitbucket 23 | 24 | - name: Set up QEMU 25 | uses: docker/setup-qemu-action@v3 26 | 27 | - name: Set up Docker Buildx 28 | uses: docker/setup-buildx-action@v3 29 | 30 | - name: Login to DockerHub 31 | uses: docker/login-action@v3 32 | with: 33 | registry: ghcr.io 34 | username: ${{ github.actor }} 35 | password: ${{ secrets.GITHUB_TOKEN }} 36 | 37 | - name: Build and push 38 | uses: docker/build-push-action@v6 39 | with: 40 | context: . 41 | file: ./Dockerfile 42 | platforms: linux/amd64,linux/arm64 43 | push: true 44 | tags: ${{ steps.meta.outputs.tags }} 45 | -------------------------------------------------------------------------------- /.github/workflows/nightly.yml: -------------------------------------------------------------------------------- 1 | name: nightly build 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | strategy: 11 | matrix: 12 | java: [17] 13 | steps: 14 | - name: Checkout GitBucket repo 15 | uses: actions/checkout@v4 16 | with: 17 | repository: gitbucket/gitbucket 18 | path: gitbucket 19 | 20 | - name: Set up JDK 21 | uses: actions/setup-java@v4 22 | with: 23 | java-version: ${{ matrix.java }} 24 | distribution: adopt 25 | 26 | - name: Run tests 27 | run: | 28 | cd gitbucket 29 | sbt scalafmtSbtCheck scalafmtCheckAll test 30 | 31 | - name: Build executable 32 | run: | 33 | cd gitbucket 34 | sbt executable 35 | 36 | - name: Check out the repo 37 | uses: actions/checkout@v4 38 | with: 39 | path: docker 40 | 41 | - name: Copy war file 42 | run: | 43 | mv gitbucket/target/executable/gitbucket.war docker/gitbucket.war 44 | 45 | - name: Set up QEMU 46 | uses: docker/setup-qemu-action@v3 47 | 48 | - name: Set up Docker Buildx 49 | uses: docker/setup-buildx-action@v3 50 | 51 | - name: Login to GitHub Container registry 52 | uses: docker/login-action@v3 53 | with: 54 | registry: ghcr.io 55 | username: ${{ github.actor }} 56 | password: ${{ secrets.GITHUB_TOKEN }} 57 | 58 | - name: Build and push 59 | uses: docker/build-push-action@v6 60 | with: 61 | context: docker 62 | file: docker/Dockerfile-nightly 63 | platforms: linux/amd64,linux/arm64 64 | push: true 65 | tags: | 66 | ghcr.io/gitbucket/gitbucket:nightly 67 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM eclipse-temurin:17 2 | 3 | LABEL maintainer="Naoki Takezoe " 4 | 5 | ADD https://github.com/gitbucket/gitbucket/releases/download/4.42.1/gitbucket.war /opt/gitbucket.war 6 | 7 | RUN ln -s /gitbucket /root/.gitbucket 8 | 9 | VOLUME /gitbucket 10 | 11 | # Port for web page and Port for SSH access to git repository (Optional) 12 | EXPOSE 8080 29418 13 | 14 | CMD ["sh", "-c", "java -jar /opt/gitbucket.war"] 15 | -------------------------------------------------------------------------------- /Dockerfile-nightly: -------------------------------------------------------------------------------- 1 | FROM adoptopenjdk:8-jre-hotspot 2 | 3 | LABEL maintainer="Naoki Takezoe " 4 | 5 | ADD gitbucket.war /opt/gitbucket.war 6 | 7 | RUN ln -s /gitbucket /root/.gitbucket 8 | 9 | VOLUME /gitbucket 10 | 11 | # Port for web page and Port for SSH access to git repository (Optional) 12 | EXPOSE 8080 29418 13 | 14 | CMD ["sh", "-c", "java -jar /opt/gitbucket.war"] 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | gitbucket-docker [![default build](https://github.com/gitbucket/gitbucket-docker/actions/workflows/default.yml/badge.svg)](https://github.com/gitbucket/gitbucket-docker/actions/workflows/default.yml) [![nightly build](https://github.com/gitbucket/gitbucket-docker/actions/workflows/nightly.yml/badge.svg)](https://github.com/gitbucket/gitbucket-docker/actions/workflows/nightly.yml) 2 | ======== 3 | Docker image of GitBucket which is an open source GitHub server powered by Scala 4 | 5 | How to use this image 6 | -------- 7 | 8 | ``` 9 | docker run -d -p 8080:8080 ghcr.io/gitbucket/gitbucket 10 | ``` 11 | 12 | Add `-p 29418:29418` option if you would like to enable SSH for repository access: 13 | 14 | ``` 15 | docker run -d -p 8080:8080 -p 29418:29418 ghcr.io/gitbucket/gitbucket 16 | ``` 17 | 18 | You can also specify the data directory by `-v` option: 19 | 20 | ``` 21 | docker run -d -p 8080:8080 -v `pwd`/gitbucket:/gitbucket ghcr.io/gitbucket/gitbucket 22 | ``` 23 | 24 | You can configure GitBucket via environment variables. For example, the uploadable file size can be set to 10MB as follows: 25 | 26 | ``` 27 | docker run -d -p 8080:8080 -e GITBUCKET_MAXFILESIZE=10485760 ghcr.io/gitbucket/gitbucket 28 | ``` 29 | 30 | See more details about how to configure GitBucket at: https://github.com/gitbucket/gitbucket/wiki/Basic-configurations 31 | --------------------------------------------------------------------------------