Dockerfile

This commit is contained in:
2022-10-18 10:29:17 -04:00
commit 970b53670d
3 changed files with 91 additions and 0 deletions

21
Docker/Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM fedora:36
LABEL name="Tracd Standalone Server"
LABEL project="tracd"
EXPOSE 8055
ENV USER_UID=2000
ENV USER_GID=2000
RUN dnf -y install trac httpd-tools ;\
dnf -y clean all
RUN useradd --shell /sbin/nologin --create-home --home-dir /home/trac --uid $USER_UID trac
WORKDIR /home/trac
USER trac
#htpasswd .htpasswd user
CMD /usr/sbin/tracd --port 8055 --basic-auth="*,.htpasswd,realm" $(ls -d */)

49
README.md Normal file
View File

@@ -0,0 +1,49 @@
# Intro
[Trac](https://trac.edgewall.org/) is a minimalistic approach to web-based management of software projects. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress.
Tracd running as a Standalone Server with [htpasswd](https://trac.edgewall.org/wiki/TracStandalone#BasicAuthorization:Usingahtpasswdpasswordfile) authentication enabled.
# Usage
The container run tracd service with UID=2000, expose 8055 port and mount /home/trac directory from host to tracd for projects.
Here are some example snippets to help you get started creating a container.
## docker-compose
```yaml
version: "3"
services:
server:
image: bitdeals/trac:latest
environment:
- USER_UID=2000
- USER_GID=2000
volumes:
- /home/trac:/home/trac
ports:
- "8055:8055"
```
## docker cli
```sh
docker run -d \
-e USER_UID=2000 \
-e USER_GID=2000 \
-v /home/trac:/home/trac \
-p 8055:8055 \
bitdeals/trac
```
# Parameters
Container images are configured using parameters passed at runtime.
|Parameter|Function|
|:--------|:-------|
|-p 8055|the port number to bind to|
|-e USER_UID=|tracd proccess UID|
|-e USER_GID=|tracd proccess GID|

21
docker-compose.yml Normal file
View File

@@ -0,0 +1,21 @@
version: "3"
networks:
trac:
external: false
services:
server:
image: bitdeals/trac:1.5.3-fedora36
build: ./Docker
container_name: trac
environment:
- USER_UID=2000
- USER_GID=2000
restart: always
networks:
- trac
volumes:
- /home/trac:/home/trac
ports:
- "8055:8055"