Skip to content

Commit

Permalink
Updating docker container with the new usage flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sekka1 authored and Silex committed Sep 6, 2016
1 parent 9bcc989 commit bce9f99
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:14.04.1
FROM ubuntu:14.04.4

RUN apt-get update -y
RUN apt-get install -y python-setuptools python-dev build-essential libffi-dev libssl-dev
Expand All @@ -15,4 +15,4 @@ RUN chmod 777 /opt/run.sh

EXPOSE 57575

CMD ["/opt/run.sh"]
ENTRYPOINT ["/opt/run.sh"]
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,28 @@ The js part is based on [term.js](https://github.com/chjj/term.js/) which is bas
along with this program. If not, see <http://www.gnu.org/licenses/>.
```

## Docker Usage
## Docker
There is a docker repository created for this project that is set to automatically rebuild when there is a push
into this repository: https://registry.hub.docker.com/u/garland/butterfly/

### Starting
### Example usage

docker run \
--env PASSWORD=password \
--env PORT=57575 \
-p 57575:57575 \
-d garland/butterfly
Starting with login and password

```
docker run \
--env PASSWORD=password \
--env PORT=57575 \
-p 57575:57575 \
-d garland/butterfly --unsecure --host=0.0.0.0 --port=57575 --login
```

Starting with no password

```
docker run \
--env PASSWORD=password \
--env PORT=57575 \
-p 57575:57575 \
-d garland/butterfly --unsecure --host=0.0.0.0 --port=57575 --login
```
11 changes: 2 additions & 9 deletions docker/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
#!/bin/sh
#!/bin/sh -x

# Set password
echo "root:${PASSWORD}" | chpasswd

if [ -z ${PORT} ]
then
echo "Starting on default port: 57575"
/opt/app/butterfly.server.py --unsecure --host=0.0.0.0
else
echo "Starting on port: ${PORT}"
/opt/app/butterfly.server.py --unsecure --host=0.0.0.0 --port=${PORT}
fi
/opt/app/butterfly.server.py $@

0 comments on commit bce9f99

Please sign in to comment.