Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Stage 1: Build the tool
FROM golang:1.22-alpine AS builder

RUN apk add --no-cache git ca-certificates

WORKDIR /src
RUN git clone https://github.com/bitquark/shortscan.git .
# Build just the main command
RUN go build -o /shortscan ./cmd/shortscan

# Stage 2: Minimal runtime image
FROM alpine:3.20

# Copy CA certificates from builder (needed for HTTPS)
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /shortscan /usr/local/bin/shortscan

ENTRYPOINT ["shortscan"]