patchwire-api (sha256:aacd00dd65bdeb27d6b949546f6a9544cbd4a0ec753b68e372f311d394e79147)
Published 2026-04-19 11:36:29 +00:00 by ahmedanbar
Installation
docker pull git.ahmedanbar.dev/ahmedanbar/patchwire-api@sha256:aacd00dd65bdeb27d6b949546f6a9544cbd4a0ec753b68e372f311d394e79147sha256:aacd00dd65bdeb27d6b949546f6a9544cbd4a0ec753b68e372f311d394e79147Image layers
| # debian.sh --arch 'amd64' out/ 'bookworm' '@1775433600' |
| RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends ca-certificates libssl3 curl git python3 python3-pip python3-venv && rm -rf /var/lib/apt/lists/* && groupadd --system --gid 10001 patchwire && useradd --system --uid 10001 --gid 10001 --home-dir /app --shell /sbin/nologin patchwire # buildkit |
| RUN /bin/sh -c python3 -m venv /opt/semgrep && /opt/semgrep/bin/pip install --no-cache-dir semgrep && ln -s /opt/semgrep/bin/semgrep /usr/local/bin/semgrep # buildkit |
| RUN /bin/sh -c GITLEAKS_VERSION="8.21.2" && curl -sSL -o /tmp/gitleaks.tar.gz "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" && tar xzf /tmp/gitleaks.tar.gz -C /usr/local/bin gitleaks && chmod +x /usr/local/bin/gitleaks && rm /tmp/gitleaks.tar.gz # buildkit |
| WORKDIR /app |
| COPY /app/target/release/patchwire-api /app/patchwire-api # buildkit |
| COPY /app/target/release/patchwire /app/patchwire # buildkit |
| COPY /usr/local/cargo/bin/sqlx /usr/local/bin/sqlx # buildkit |
| COPY /app/migrations /app/migrations # buildkit |
| RUN /bin/sh -c mkdir -p /home/patchwire/.semgrep /home/patchwire/.cache && chown -R patchwire:patchwire /home/patchwire # buildkit |
| USER patchwire |
| ENV HOME=/home/patchwire |
| EXPOSE map[3001/tcp:{}] |
| HEALTHCHECK &{["CMD-SHELL" "curl -fsS http://127.0.0.1:3001/healthz || exit 1"] "30s" "3s" "10s" "0s" '\x03'} |
| ENTRYPOINT ["/app/patchwire-api"] |