-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: added different flavours of Dockerfiles
- Loading branch information
Showing
8 changed files
with
152 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM kalilinux/kali-linux-docker | ||
|
||
ENV DOCKER=kali | ||
|
||
COPY . /root/sdist | ||
|
||
RUN apt-get update && \ | ||
apt-get -y dist-upgrade && \ | ||
apt-get install -y \ | ||
ca-certificates \ | ||
build-essential \ | ||
python-lxml \ | ||
python-dev \ | ||
python-setuptools && \ | ||
cd /root/sdist && \ | ||
python setup.py install && \ | ||
cd /root && \ | ||
rm -rf sdist && \ | ||
apt-get purge --auto-remove -y \ | ||
build-essential \ | ||
python-dev && \ | ||
apt-get clean | ||
|
||
ENTRYPOINT ["canari"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM ubuntu:14.04 | ||
|
||
ENV DOCKER=ubuntu | ||
|
||
COPY . /root/sdist | ||
|
||
RUN apt-get update && \ | ||
apt-get -y dist-upgrade && \ | ||
apt-get install -y \ | ||
ca-certificates \ | ||
build-essential \ | ||
python-lxml \ | ||
python-dev \ | ||
python-setuptools && \ | ||
cd /root/sdist && \ | ||
python setup.py install && \ | ||
cd /root && \ | ||
rm -rf sdist && \ | ||
apt-get purge --auto-remove -y \ | ||
build-essential \ | ||
python-dev && \ | ||
apt-get clean | ||
|
||
ENTRYPOINT ["canari"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x | ||
|
||
echo "Make sure your Docker environment has been set" | ||
|
||
SOURCE_DIR=`dirname ${BASH_SOURCE[0]}` | ||
|
||
pushd src | ||
|
||
VERSION=`python -c 'import canari; print canari.__version__'` | ||
|
||
popd | ||
|
||
echo $SOURCE_DIR | ||
|
||
pushd $SOURCE_DIR | ||
|
||
docker build -t redcanari/canari:$VERSION-alpine -f Dockerfile-alpine . | ||
docker build -t redcanari/canari:$VERSION-ubuntu -f Dockerfile-ubuntu . | ||
docker build -t redcanari/canari:$VERSION-kalilinux -f Dockerfile-kalilinux . | ||
docker tag -f redcanari/canari:$VERSION-alpine redcanari/canari | ||
#docker push redcanari/canari | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/canari/resources/templates/dockerize_package/Dockerfile-kalilinux.bob
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM redcanari/canari:{{{ canari.version }}}-kalilinux | ||
|
||
ADD . /root/sdist | ||
|
||
RUN apk add --no-cache \ | ||
alpine-sdk \ | ||
python-dev && \ | ||
cd /root/sdist && \ | ||
python setup.py install && \ | ||
cd /root && \ | ||
rm -rf /root/sdist && \ | ||
mkdir -p /var/plume && \ | ||
cd /var/plume && \ | ||
canari install-plume -y && \ | ||
canari load-plume-package -y {{{ project.name }}} && \ | ||
apk del \ | ||
alpine-sdk \ | ||
python-dev | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT /etc/init.d/plume start-docker |
22 changes: 22 additions & 0 deletions
22
src/canari/resources/templates/dockerize_package/Dockerfile-ubuntu.bob
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM redcanari/canari:{{{ canari.version }}}-ubuntu | ||
|
||
ADD . /root/sdist | ||
|
||
RUN apk add --no-cache \ | ||
alpine-sdk \ | ||
python-dev && \ | ||
cd /root/sdist && \ | ||
python setup.py install && \ | ||
cd /root && \ | ||
rm -rf /root/sdist && \ | ||
mkdir -p /var/plume && \ | ||
cd /var/plume && \ | ||
canari install-plume -y && \ | ||
canari load-plume-package -y {{{ project.name }}} && \ | ||
apk del \ | ||
alpine-sdk \ | ||
python-dev | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT /etc/init.d/plume start-docker |