Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Blockshell in a docker
FROM python:2.7-wheezy
MAINTAINER agentcobra <agentcobra@free.fr>
LABEL maintainer="agentcobra@free.fr"

RUN apt-get update
RUN apt-get install -y git screen vim

WORKDIR /opt/

RUN git clone https://github.com/agentcobra/blockshell.git
WORKDIR /opt/blockshell
RUN virtualenv venv
CMD source venv/bin/activate
RUN pip install --editable .

RUN blockshell --help

EXPOSE 5000

RUN python web.py
#CMD script /dev/null
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
help: ## Écran d'aide
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-10s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
build: ## Construction de l'image
docker build -t agentcobra/blockshell .
run: build ## Lance la compilation et l'image docker (garde le conteneur à l'arret)
docker run -d --name blockshell -p 5000:5000 -v app:/var/www/html/app agentcobra/blockshell
shell: ## Lance bash dans le conteneur
docker exec -it blockshell bash
test: build ## Lance la compilation et l'image docker (supprime le conteneur à l'arret)
docker run --rm --name blockshell -p 5000:5000 agentcobra/blockshell