mirror of
https://github.com/jtesta/ssh-audit.git
synced 2024-12-04 08:15:18 +01:00
848052df68
* Add cleanup for apt cache files Adding this command decreases the size of the image. ssh-audit-new latest 0c391ba567ee 39 minutes ago 157MB ssh-audit-old latest a425e0043125 40 minutes ago 176MB * Fix Dockerfile Forgot to add logical "and" (&&)
22 lines
505 B
Docker
22 lines
505 B
Docker
FROM python:3-slim
|
|
|
|
WORKDIR /
|
|
|
|
# Update the image to remediate any vulnerabilities.
|
|
RUN apt clean && apt update && apt -y dist-upgrade && apt clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Remove suid & sgid bits from all files.
|
|
RUN find / -xdev -perm /6000 -exec chmod ug-s {} \; 2> /dev/null || true
|
|
|
|
# Copy the ssh-audit code.
|
|
COPY ssh-audit.py .
|
|
COPY src/ .
|
|
|
|
# Allow listening on 2222/tcp for client auditing.
|
|
EXPOSE 2222
|
|
|
|
# Drop root privileges.
|
|
USER nobody:nogroup
|
|
|
|
ENTRYPOINT ["python3", "/ssh-audit.py"]
|