Skip to content

Commit

Permalink
fix: dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
GangGreenTemperTatum committed Dec 5, 2024
1 parent c23da9b commit 8d3097b
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions cybersecurity/offensive/information-gathering/ffufai.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
# ffufai.Dockerfile
# Git clone stage
FROM alpine:latest AS source
RUN apk add --no-cache git
WORKDIR /src
RUN git clone https://github.com/jthack/ffufai.git . || exit 1

# Build stage
FROM golang:1.21-alpine AS builder
WORKDIR /build
COPY --from=source /src .

# Set Go build flags
ENV CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64 \
GO111MODULE=on

# Build optimized binary
RUN go mod download && \
go build -ldflags="-w -s" -o ffufai main.go
RUN git clone https://github.com/GangGreenTemperTatum/ffufai.git . || exit 1

# Final stage
FROM gcr.io/distroless/static-debian12:nonroot
FROM python:3.9-slim
WORKDIR /app

# Copy binary and wordlists
COPY --from=builder /build/ffufai /app/
COPY --from=builder /build/wordlists /app/wordlists
# Copy from source
COPY --from=source /src /app/

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

USER nonroot:nonroot
USER nobody:nogroup
EXPOSE 8080

ENTRYPOINT ["/app/ffufai"]
ENTRYPOINT ["python", "ffufai.py"]

0 comments on commit 8d3097b

Please sign in to comment.