diff --git a/.dockerignore b/.dockerignore index 3780c35..be6ab71 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,5 @@ .git .gitignore -README.md -LICENSE Dockerfile .dockerignore diff --git a/Dockerfile b/Dockerfile index 183a905..fe85c4e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..46055cc --- /dev/null +++ b/docker-compose.yml @@ -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: +