1
0

Changed root container to "eclipse-temurin:latest", Improved comments and readme

Update Dockerfile, docker-compose.yml, and readme.md
This commit is contained in:
Herwin Bozet (NibblePoker) 2021-11-29 06:09:35 +01:00
parent d1b7d64c6b
commit 18db8c1d07
3 changed files with 19 additions and 25 deletions

View File

@ -1,21 +1,16 @@
FROM bitnami/minideb:latest FROM eclipse-temurin:latest
# Preparing the folders and installing packages. # Preparing GitBucket's folder and installing packages.
RUN mkdir /gitbucket /java && apt-get update && apt-get -y install bash wget RUN mkdir /gitbucket && apt-get update
# Comment if you don't need a shell access via bash in the container.
# RUN apt-get -y install bash
# Uncomment if you are using a plugin that requires Git to be installed. # Uncomment if you are using a plugin that requires Git to be installed.
# RUN apt-get -y install git # RUN apt-get -y install git
# Downloading and extracting Temurin 17.0.1+12 from Adoptium.
RUN wget -q -O /java/openjdk.tar.gz "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.1_12.tar.gz"
RUN tar -xf /java/openjdk.tar.gz -C /java && mv /java/jdk-17.0.1+12 /java/jdk && rm -f /java/openjdk.tar.gz
# Setting up Java's environment variables
ENV JAVA_HOME /java/jdk
ENV PATH $PATH:/java/jdk/bin
# Downloading gitBucket 4.36.2 # Downloading gitBucket 4.36.2
RUN wget -q -O /gitbucket/gitbucket.war "https://github.com/gitbucket/gitbucket/releases/download/4.36.2/gitbucket.war" ADD https://github.com/gitbucket/gitbucket/releases/download/4.36.2/gitbucket.war /gitbucket/gitbucket.war
# Setting up required GitBucket's environment variables # Setting up required GitBucket's environment variables
ENV GITBUCKET_HOME /gitbucket/gitbucket_data ENV GITBUCKET_HOME /gitbucket/gitbucket_data

View File

@ -7,14 +7,13 @@ services:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
ports: ports:
- 30880:8080 - 8080:8080 # HTTP
#- 30022:8443 # HTTPS port ? - 8443:8443 # HTTPS (Optionnal)
- 30022:29418 - 29418:29418 # SSH (Optionnal, disabled by default)
volumes: volumes:
- ./data:/gitbucket/gitbucket_data - ./data:/gitbucket/gitbucket_data
environment:
# Does not work, for some reason.
GITBUCKET_MAXFILESIZE: 67108864
restart: unless-stopped restart: unless-stopped
tty: true # Can be commented if you don't intend to use a shell in the container.
stdin_open: true # Can also be commented for the same reason as above. # Both of these can be commented if you don't intend to use a shell in the container.
tty: true
stdin_open: true

View File

@ -2,15 +2,15 @@
A simple docker-compose file that can be used to create a *GitBucket* container on SBCs. A simple docker-compose file that can be used to create a *GitBucket* container on SBCs.
## Requirements ## Requirements
__CPU Architecture:__ ARM64 (Use the official image for AMD64)<br> __CPU Architecture:__ ARM64 <sub><sup>(Use the [official image](https://hub.docker.com/r/gitbucket/gitbucket/) for AMD64)</sup></sub><br>
__RAM:__ At least 256 MiB __RAM:__ Between 256 and 512 MiB
## Remarks ## Remarks
This container is not intended to be used with an external database and forces *GitBucket* to use a local DB.<br> This container is not intended to be used with an external database and forces GitBucket to use a local DB.<br>
However, it should be relatively easy to use an external one if you change the `DATABASE_URL` environment variable. However, it should be relatively easy to use an external one if you change the `DATABASE_URL` environment variable.
This container uses the Temurin OpenJDK distribution from [Adoptium](https://adoptium.net/).<br> This container also uses the Temurin OpenJDK distribution from [Adoptium](https://adoptium.net/).<br>
However, the `openjdk-11-jre-headless` and `openjdk-11-jdk-headless` packages from [bitnami/minideb](https://github.com/bitnami/minideb) can be used instead if you wish to. However, the `openjdk-11-jre-headless` and `openjdk-11-jdk-headless` packages from [bitnami/minideb](https://github.com/bitnami/minideb) can be used instead if you wish to use the latest version when building the container.
## Building ## Building
In order to build this container, all you have to do is to clone this repository and run `docker-compose up`. In order to build this container, all you have to do is to clone this repository and run `docker-compose up`.