diff --git a/.gitignore b/.gitignore index ae70ede..b72c215 100644 --- a/.gitignore +++ b/.gitignore @@ -2,52 +2,12 @@ ### JetBrains template # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm -*.iml +#*.iml ## Directory-based project format: .idea/ # if you remove the above rule, at least ignore the following: -# User-specific stuff: -# .idea/workspace.xml -# .idea/tasks.xml -# .idea/dictionaries - -# Sensitive or high-churn files: -# .idea/dataSources.ids -# .idea/dataSources.xml -# .idea/sqlDataSources.xml -# .idea/dynamic.xml -# .idea/uiDesigner.xml - -# Gradle: -# .idea/gradle.xml -# .idea/libraries - -# Mongo Explorer plugin: -# .idea/mongoSettings.xml - -## File-based project format: -*.ipr -*.iws - -## Plugin-specific files: - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties - - ### Python template # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/Dockerfile b/Dockerfile index c9cbe98..ba31013 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,3 +29,6 @@ RUN set -x \ && apt-get -yqq dist-upgrade \ && apt-get clean CMD ["bash"] +RUN apt-get -yqq install git make cmake +RUN git clone https://github.com/0x90/kali-scripts /tmp/kali-scripts +RUN cd /tmp/kali-scripts && git pull && make dev-all diff --git a/README.md b/README.md index 62f663b..0cbb234 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,15 @@ Every script can be launched separately except helper.sh which us just a functio New version of Kali scripts is beeing developeb. Try it! ``` make -make dev-mini``` +make dev-mini +``` + +## Docker +Docker build examople: +``` +docker build --squash --rm -t . +``` ## TODO diff --git a/build.sh b/build.sh deleted file mode 100755 index aa2296f..0000000 --- a/build.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# Install dependencies (debbootstrap) -sudo apt-get install -yqq debootstrap curl - -# ----------------------------------------------------------------------------- -# BUILD/LABEL VARIABLES -# ----------------------------------------------------------------------------- -BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") -VERSION="latest" -VCS_URL=$(git config --get remote.origin.url) -VCS_REF=$(git rev-parse --short HEAD) - -# Fetch the latest Kali debootstrap script from git -curl "http://git.kali.org/gitweb/?p=packages/debootstrap.git;a=blob_plain;f=scripts/kali;h=50d7ef5b4e9e905cc6da8655416cdf3ef559911e;hb=refs/heads/kali/master" > kali-debootstrap &&\ -sudo debootstrap kali-rolling ./kali-root http://repo.kali.org/kali ./kali-debootstrap &&\ -sudo tar -C kali-root -c . | sudo docker import - kalilinux/kali-linux-docker &&\ -sudo rm -rf ./kali-root &&\ -TAG=$(sudo docker run -t -i kalilinux/kali-linux-docker awk '{print $NF}' /etc/debian_version | sed 's/\r$//' ) &&\ -echo "Tagging kali with $TAG" &&\ -sudo docker tag kalilinux/kali-linux-docker:$VERSION kalilinux/kali-linux-docker:$TAG &&\ -echo "Labeling kali" &&\ -sudo docker build --squash --rm -t kalilinux/kali-linux-docker:$VERSION \ ---build-arg BUILD_DATE=$BUILD_DATE \ ---build-arg VERSION=$VERSION \ ---build-arg VCS_URL=$VCS_URL \ ---build-arg VCS_REF=$VCS_REF . &&\ -echo "Build OK" || echo "Build failed!"