Skip to content

Commit

Permalink
Merge pull request #1582 from rossja/master
Browse files Browse the repository at this point in the history
Docker refactor
  • Loading branch information
fernando-gallego authored May 8, 2024
2 parents 6df2cfa + f165e94 commit de1b62c
Show file tree
Hide file tree
Showing 16 changed files with 385 additions and 101 deletions.
2 changes: 1 addition & 1 deletion docker/.env
55 changes: 0 additions & 55 deletions docker/Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions docker/Dockerfile
39 changes: 39 additions & 0 deletions docker/Dockerfile-aws
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM nccgroup/scoutsuite-base:5.13.0-01

LABEL maintainer="Jason Ross <algorythm@gmail.com>"

ARG BUILD_DATE
ARG NAME
ARG DESCRIPTION
ARG VCS_REF
ARG VCS_URL
ARG VENDOR
ARG VERSION
ARG IMAGE_NAME

ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND}
ENV TERM=${TERM}

# Build-time metadata as defined at http://label-schema.org
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.name="${NAME}" \
org.label-schema.description="${DESCRIPTION}" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${VCS_URL}" \
org.label-schema.vendor="${VENDOR}" \
org.label-schema.version="${VERSION}" \
org.label.image-name="${IMAGE_NAME}"

# Copy helper scripts to container
ADD bin /root/bin

# Install AWS CLI
RUN ["/bin/bash", "-c", "/root/bin/container-install-aws2.sh"]

# Remove scripts
RUN ["rm", "-rf", "/root/bin"]

# Command
CMD ["/bin/bash"]
39 changes: 39 additions & 0 deletions docker/Dockerfile-azure
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM nccgroup/scoutsuite-base:5.13.0-01

LABEL maintainer="Jason Ross <algorythm@gmail.com>"

ARG BUILD_DATE
ARG NAME
ARG DESCRIPTION
ARG VCS_REF
ARG VCS_URL
ARG VENDOR
ARG VERSION
ARG IMAGE_NAME

ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND}
ENV TERM=${TERM}

# Build-time metadata as defined at http://label-schema.org
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.name="${NAME}" \
org.label-schema.description="${DESCRIPTION}" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${VCS_URL}" \
org.label-schema.vendor="${VENDOR}" \
org.label-schema.version="${VERSION}" \
org.label.image-name="${IMAGE_NAME}"

# Copy helper scripts to container
ADD bin /root/bin

# Install Azure CLI
RUN ["/bin/bash", "-c", "/root/bin/container-install-azure.sh"]

# Remove scripts
RUN ["rm", "-rf", "/root/bin"]

# Command
CMD ["/bin/bash"]
45 changes: 45 additions & 0 deletions docker/Dockerfile-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM python:3.12

LABEL maintainer="Jason Ross <algorythm@gmail.com>"

ARG BUILD_DATE
ARG NAME
ARG DESCRIPTION
ARG VCS_REF
ARG VCS_URL
ARG VENDOR
ARG VERSION
ARG IMAGE_NAME

ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND}
ENV TERM=${TERM}

# Build-time metadata as defined at http://label-schema.org
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.name="${NAME}" \
org.label-schema.description="${DESCRIPTION}" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${VCS_URL}" \
org.label-schema.vendor="${VENDOR}" \
org.label-schema.version="${VERSION}" \
org.label.image-name="${IMAGE_NAME}"

# Copy helper scripts to container
ADD bin /root/bin

# Install required software
RUN ["/bin/bash", "-c", "/root/bin/container-install-prereqs.sh"]

# Install ScoutSuite
RUN ["/bin/bash", "-c", "/root/bin/container-install-scoutsuite.sh"]

# Set a nice message
RUN ["/bin/bash", "-c", "/root/bin/container-set-init.sh"]

# Remove scripts
RUN ["rm", "-rf", "/root/bin"]

# Command
CMD ["/bin/bash"]
39 changes: 39 additions & 0 deletions docker/Dockerfile-gcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM nccgroup/scoutsuite-base:5.13.0-01

LABEL maintainer="Jason Ross <algorythm@gmail.com>"

ARG BUILD_DATE
ARG NAME
ARG DESCRIPTION
ARG VCS_REF
ARG VCS_URL
ARG VENDOR
ARG VERSION
ARG IMAGE_NAME

ENV DEBIAN_FRONTEND=${DEBIAN_FRONTEND}
ENV TERM=${TERM}

# Build-time metadata as defined at http://label-schema.org
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.build-date="${BUILD_DATE}" \
org.label-schema.name="${NAME}" \
org.label-schema.description="${DESCRIPTION}" \
org.label-schema.vcs-ref="${VCS_REF}" \
org.label-schema.vcs-url="${VCS_URL}" \
org.label-schema.vendor="${VENDOR}" \
org.label-schema.version="${VERSION}" \
org.label.image-name="${IMAGE_NAME}"

# Copy helper scripts to container
ADD bin /root/bin

# Install gCloud SDK
RUN ["/bin/bash", "-c", "/root/bin/container-install-gcp.sh"]

# Remove scripts
RUN ["rm", "-rf", "/root/bin"]

# Command
CMD ["/bin/bash"]
8 changes: 4 additions & 4 deletions docker/bin/container-install-prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ apt-get install -qy \
less \
lsb-release \
nano \
python3 \
python3-pip \
# python3 \
# python3-pip \
tzdata \
unzip \
vim \
virtualenv \
virtualenvwrapper \
# virtualenv \
# virtualenvwrapper \
wget

echo -e "\n\nSoftware Pre-reqs Installation Complete!\n\n"
Loading

0 comments on commit de1b62c

Please sign in to comment.