Update Docker configuration and add metadata to Dockerfile

- Removed README.md and LICENSE from .dockerignore for inclusion in Docker image.
- Introduced a new docker-compose.yml file to define the application services and their configurations.
- Enhanced Dockerfile with build arguments and detailed image metadata for better documentation and version tracking.
This commit is contained in:
2025-12-27 11:34:06 -06:00
parent 50e636693c
commit c9c74c778e
3 changed files with 40 additions and 2 deletions

View File

@@ -1,7 +1,5 @@
.git
.gitignore
README.md
LICENSE
Dockerfile
.dockerignore

View File

@@ -26,10 +26,28 @@ RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o software-station main.go
FROM cgr.dev/chainguard/wolfi-base:latest
WORKDIR /app
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION="0.2.0"
LABEL org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.title="Software Station" \
org.opencontainers.image.description="A modern, high-performance software distribution platform for Gitea." \
org.opencontainers.image.url="https://quad4.io" \
org.opencontainers.image.documentation="https://github.com/Quad4-Software/software-station/blob/main/README.md" \
org.opencontainers.image.source="https://github.com/Quad4-Software/software-station" \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$VCS_REF \
org.opencontainers.image.vendor="Quad4" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.authors="Quad4" \
org.opencontainers.image.base.name="cgr.dev/chainguard/wolfi-base:latest"
RUN apk add --no-cache ca-certificates
COPY --from=go-builder /app/software-station .
COPY LICENSE README.md ./
COPY legal/ ./legal/
COPY software.txt /app/data/software.txt

22
docker-compose.yml Normal file
View File

@@ -0,0 +1,22 @@
services:
software-station:
build: .
container_name: software-station
ports:
- "8080:8080"
volumes:
- data:/app/data
- cache:/app/.cache
environment:
- GITEA_TOKEN=${GITEA_TOKEN}
- GITEA_SERVER=${GITEA_SERVER:-https://git.quad4.io}
- CONFIG_PATH=/app/data/software.txt
- UA_BLOCKLIST_PATH=/app/data/ua-blocklist.txt
security_opt:
- no-new-privileges:true
restart: unless-stopped
volumes:
data:
cache: