Updating docker container with the new usage flag

This commit is contained in:
gar
2016-08-09 20:47:09 -07:00
committed by Philippe Vaucher
parent 9bcc989149
commit bce9f99b0b
3 changed files with 24 additions and 18 deletions

View File

@@ -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
@@ -15,4 +15,4 @@ RUN chmod 777 /opt/run.sh
EXPOSE 57575
CMD ["/opt/run.sh"]
ENTRYPOINT ["/opt/run.sh"]

View File

@@ -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
```

View File

@@ -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 $@