├── .github ├── dependabot.yml └── workflows │ ├── default.yml │ └── nightly.yml ├── Dockerfile-nightly ├── Dockerfile └── README.md /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /Dockerfile-nightly: -------------------------------------------------------------------------------- 1 | FROM eclipse-temurin:17 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 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM eclipse-temurin:17 2 | 3 | LABEL maintainer="Naoki Takezoe " 4 | 5 | ADD https://github.com/gitbucket/gitbucket/releases/download/4.44.0/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 | -------------------------------------------------------------------------------- /.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@v6 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.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@v6 16 | with: 17 | repository: gitbucket/gitbucket 18 | path: gitbucket 19 | 20 | - name: Set up JDK 21 | uses: actions/setup-java@v5 22 | with: 23 | java-version: ${{ matrix.java }} 24 | distribution: adopt 25 | 26 | - name: Setup sbt launcher 27 | uses: sbt/setup-sbt@v1 28 | 29 | - name: Run tests 30 | run: | 31 | cd gitbucket 32 | sbt scalafmtSbtCheck scalafmtCheckAll test 33 | 34 | - name: Build executable 35 | run: | 36 | cd gitbucket 37 | sbt executable 38 | 39 | - name: Check out the repo 40 | uses: actions/checkout@v6 41 | with: 42 | path: docker 43 | 44 | - name: Copy war file 45 | run: | 46 | mv gitbucket/target/executable/gitbucket.war docker/gitbucket.war 47 | 48 | - name: Set up QEMU 49 | uses: docker/setup-qemu-action@v3 50 | 51 | - name: Set up Docker Buildx 52 | uses: docker/setup-buildx-action@v3 53 | 54 | - name: Login to GitHub Container registry 55 | uses: docker/login-action@v3 56 | with: 57 | registry: ghcr.io 58 | username: ${{ github.actor }} 59 | password: ${{ secrets.GITHUB_TOKEN }} 60 | 61 | - name: Build and push 62 | uses: docker/build-push-action@v6 63 | with: 64 | context: docker 65 | file: docker/Dockerfile-nightly 66 | platforms: linux/amd64,linux/arm64 67 | push: true 68 | tags: | 69 | ghcr.io/gitbucket/gitbucket:nightly 70 | --------------------------------------------------------------------------------