Initial commit
Update Dockerfile, docker-compose.yml, and readme.md
This commit is contained in:
commit
91205e913b
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
FROM bitnami/minideb:latest
|
||||||
|
|
||||||
|
# Preparing the folders and installing packages.
|
||||||
|
RUN mkdir /gitbucket /java && apt-get update && apt-get -y install bash wget
|
||||||
|
|
||||||
|
# Uncomment if you are using a plugin that requires Git to be installed.
|
||||||
|
# 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
|
||||||
|
RUN wget -q -O /gitbucket/gitbucket.war "https://github.com/gitbucket/gitbucket/releases/download/4.36.2/gitbucket.war"
|
||||||
|
|
||||||
|
# Setting up required GitBucket's environment variables
|
||||||
|
ENV GITBUCKET_HOME /gitbucket/gitbucket_data
|
||||||
|
ENV DATABASE_URL jdbc:h2:/gitbucket/gitbucket_daya/data;MVCC=true
|
||||||
|
|
||||||
|
# Exposing HTTP and SSH ports
|
||||||
|
EXPOSE 8080
|
||||||
|
EXPOSE 8443
|
||||||
|
|
||||||
|
# Running the application
|
||||||
|
# You can remove the "-Xms128m" and "-Xmx256m" arguments if you need to support more than a couple concurent users.
|
||||||
|
WORKDIR /gitbucket
|
||||||
|
CMD ["java", "-Xms128m", "-Xmx256m", "-jar", "/gitbucket/gitbucket.war"]
|
20
docker-compose.yml
Normal file
20
docker-compose.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
version: "3.3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
gitbucket:
|
||||||
|
container_name: gitbucket
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- 30880:8080
|
||||||
|
#- 30022:8443 # HTTPS port ?
|
||||||
|
- 30022:29418
|
||||||
|
volumes:
|
||||||
|
- ./data:/gitbucket/gitbucket_data
|
||||||
|
environment:
|
||||||
|
# Does not work, for some reason.
|
||||||
|
GITBUCKET_MAXFILESIZE: 67108864
|
||||||
|
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.
|
21
readme.md
Normal file
21
readme.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Docker - GitBucket
|
||||||
|
A simple docker-compose file that can be used to create a *GitBucket* container on SBCs.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
__CPU Architecture:__ ARM64 (Use the official image for AMD64)<br>
|
||||||
|
__RAM:__ At least 256 MiB
|
||||||
|
|
||||||
|
## Remarks
|
||||||
|
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.
|
||||||
|
|
||||||
|
## Building
|
||||||
|
In order to build this container, all you have to do is to clone this repository and run `docker-compose up`.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
TODO.
|
||||||
|
|
||||||
|
## License
|
||||||
|
[License](LICENSE)
|
||||||
|
|
||||||
|
This license does not apply to *GitBucket*, *Java* and any of the other applications used by this container.
|
Reference in New Issue
Block a user