Skip to content

Commit

Permalink
Update the Dockerfile to receive the build version as a --build-arg
Browse files Browse the repository at this point in the history
  • Loading branch information
i3visio committed May 28, 2017
2 parents 8b28416 + 672816f commit d179dd0
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 7 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ RUN apt-get update -y
# Installing Pip from repositories
RUN apt-get install -y python-pip


# Install prelease version or stable version if requested
RUN pip install osrframework --upgrade $VERSION

Expand Down
3 changes: 3 additions & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ OSRFramework Changelog

For more information, check the README.Add some wrappers

0.16.7a, 2017/XX/XX -- Several fixes domainfy.py options.
- Fix Dockerfile by removing an unnecessary `sudo`.

0.16.6, 2017/05/28 -- Several fixes domainfy.py options.
- Add feature #255: Add Metasploit forums as a new usufy wrapper
- Add feature #254: Add Steemit.com as a new usufy platform
Expand Down
61 changes: 55 additions & 6 deletions doc/USAGE_WITH_DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,75 @@ This file will explain how to use the Docker images for OSRFramework. This will
1.- Verifying Your Docker Installation
--------------------------------------

TODO.
Docker is available for Mac, Windows and Linux and can be installed easily in Azure or AWS. We strongly recommend to follow the official guides to install and run Docker in your system. Some good starting points can be found [here](https://docs.docker.com/engine/installation/).

2.- Downloading the Latest OSRFramework Version
-----------------------------------------------

To run the latest OSRFramework isntallation from Docker you can use the following command:
```
docker run -it i3visio/osrframework:latest
> docker run -it i3visio/osrframework:latest
```

It will download our latest official image. Then, you will be able to login into the Docker image to interact as usual. E. g.:
It will download our latest official image. Then, you will be able to login into the Docker image to interact as usual without needing to redownload it again. E. g.:
```
> docker run -it osrframework:latest
root@c79505f6b915:/# usufy.py -n i3visio -p twitter facebook github
...
root@c79505f6b915:/# osrfconsole.py
```

If you want to map the port opened by `osrframework_server.py` you will need to specify it when launching Docker to map the ports and make them accesible. In the following example, we are mapping the 30230 port of the container to port 8080 outside it.

3.- Tips and Tricks
-------------------
```
> docker run -it -p 8080:30230 i3visio/osrframework:latest
```

Once launched `osrframework_server.py` we will be able to interact with the instance outside it using `curl`.

```
> curl http://localhost:8080/info
```

3.- Building Your Own Image Locally
-----------------------------------

As we also provide the Dockerfile, advanced users may opt to build the image themselves. This can be done by _cd-ing_ into the folder of a clones project and using:

```
> docker build -t osrframework ./
```

You will be able ro run the built image as usual:

```
> docker run -it osrframework
```

If by any circunstamce you prefer to rebuild the instance from scratch, you can always tell it to Docker:

```
> docker build --no-cache=true -t osrframework ./
```

### Example of a New Build

As an example, generally we build and push the Docker images as follows:
```
> docker login
> docker build -t osrframework:0.16.6 ./
> docker tag osrframework:0.16.6 i3visio/osrframework:latest
> docker push i3visio/osrframework:latest
> docker run -it i3visio/osrframework:latest
```

We can always opt to launch a beta vesion:

```
> docker login
> docker build -t osrframework:0.16.6 --build-arg VERSION=--pre ./
> docker tag osrframework:beta i3visio/osrframework:beta
> docker push i3visio/osrframework:beta
> docker run -it i3visio/osrframework:beta
```

TODO.

0 comments on commit d179dd0

Please sign in to comment.